@@ -10,6 +10,7 @@ import {
1010import pointerEvents from '@js/common/core/events/pointer' ;
1111import { addNamespace , isMouseEvent } from '@js/common/core/events/utils/index' ;
1212import domAdapter from '@js/core/dom_adapter' ;
13+ import type { OptionChangedEventInfo } from '@js/core/dom_component' ;
1314import { getPublicElement } from '@js/core/element' ;
1415import type { dxElementWrapper } from '@js/core/renderer' ;
1516import $ from '@js/core/renderer' ;
@@ -28,6 +29,7 @@ import {
2829} from '@js/core/utils/size' ;
2930import { isDefined } from '@js/core/utils/type' ;
3031import { getWindow , hasWindow } from '@js/core/utils/window' ;
32+ import type { InitializedEventInfo } from '@js/events' ;
3133import type { ScrollEvent } from '@js/ui/scroll_view' ;
3234import errors from '@js/ui/widget/ui.errors' ;
3335import Widget from '@js/ui/widget/ui.widget' ;
@@ -127,9 +129,9 @@ export interface WorkspaceDateTableScrollableConfig {
127129 bounceEnabled : boolean ;
128130 updateManually : boolean ;
129131 onScroll : ( event : ScrollEvent ) => void ;
130- onInitialized : ( args : { component : Scrollable } ) => void ;
131- onOptionChanged : ( args : { fullName : string ; value : unknown ; component : Scrollable } ) => void ;
132- direction ?: 'both' ;
132+ onInitialized : ( args : InitializedEventInfo < Scrollable > ) => void ;
133+ onOptionChanged : ( args : OptionChangedEventInfo < Scrollable > ) => void ;
134+ direction ?: 'horizontal' | 'vertical' | ' both';
133135 onEnd ?: ( ) => void ;
134136}
135137
@@ -140,6 +142,7 @@ export interface WorkspaceHeaderScrollableConfig {
140142 useNative : false ;
141143 updateManually : true ;
142144 bounceEnabled : false ;
145+ scrollByContent ?: boolean ;
143146 onScroll : ( event : ScrollEvent ) => void ;
144147}
145148
@@ -254,7 +257,7 @@ export type WorkspaceOptionChangedOptions = WorkspaceOptionsInternal & {
254257 scrolling ?: unknown ;
255258 schedulerHeight ?: number ;
256259 schedulerWidth ?: number ;
257- agendaDuration ?: number | 'month' ;
260+ agendaDuration ?: number ;
258261 rowHeight ?: number ;
259262 noDataText ?: string ;
260263 showCurrentTimeIndicator ?: boolean ;
@@ -736,14 +739,14 @@ class SchedulerWorkSpace extends Widget<WorkspaceOptionsInternal> {
736739 // To prevent scroll container focus in native mode we set tabindex -1 to container
737740 // In simulated mode focusable behavior prevented by useKeyboard: false private option
738741 onInitialized : ( { component } ) => {
739- const useKeyboardDisabled = ! ( component . option ( 'useKeyboard' ) as unknown as boolean ) ;
740- const useNativeEnabled = component . option ( 'useNative' ) as unknown as boolean ;
742+ const useKeyboardDisabled = ( component ? .option ( 'useKeyboard' ) as unknown as boolean | undefined ) === false ;
743+ const useNativeEnabled = ( component ? .option ( 'useNative' ) as unknown as boolean | undefined ) === true ;
741744 if ( useKeyboardDisabled && useNativeEnabled ) {
742- $ ( component . container ( ) ) . attr ( 'tabindex' , - 1 ) ;
745+ $ ( component ? .container ( ) ) . attr ( 'tabindex' , - 1 ) ;
743746 }
744747 } ,
745748 onOptionChanged : ( { fullName, value, component } ) => {
746- const useKeyboardDisabled = ! ( component . option ( 'useKeyboard' ) as unknown as boolean ) ;
749+ const useKeyboardDisabled = ( component . option ( 'useKeyboard' ) as unknown as boolean | undefined ) === false ;
747750 if ( useKeyboardDisabled && fullName === 'useNative' && value === true ) {
748751 $ ( component . container ( ) ) . attr ( 'tabindex' , - 1 ) ;
749752 }
@@ -1320,7 +1323,7 @@ class SchedulerWorkSpace extends Widget<WorkspaceOptionsInternal> {
13201323 } ) ;
13211324 }
13221325
1323- protected getFormat ( ) { return abstract ( ) ; }
1326+ protected getFormat ( ) : string | ( ( date : Date ) => string ) { return abstract ( ) ; }
13241327
13251328 getWorkArea ( ) {
13261329 return this . $dateTableContainer ;
0 commit comments