@@ -8,12 +8,11 @@ import { getOuterHeight, getOuterWidth, setHeight } from '@js/core/utils/size';
88import { hasWindow } from '@js/core/utils/window' ;
99// NOTE: Renovation component import.
1010import { HeaderPanelTimelineComponent } from '@ts/scheduler/r1/components/index' ;
11- import { formatWeekdayAndDay , timelineWeekUtils } from '@ts/scheduler/r1/utils/index' ;
11+ import { timelineWeekUtils } from '@ts/scheduler/r1/utils/index' ;
1212
1313import {
1414 GROUP_HEADER_CONTENT_CLASS ,
1515 GROUP_ROW_CLASS ,
16- HEADER_CURRENT_TIME_CELL_CLASS ,
1716} from '../m_classes' ;
1817import tableCreatorModule from '../m_table_creator' ;
1918import timezoneUtils from '../m_utils_time_zone' ;
@@ -30,7 +29,6 @@ const HORIZONTAL_GROUPED_WORKSPACE_CLASS = 'dx-scheduler-work-space-horizontal-g
3029
3130const HEADER_PANEL_CELL_CLASS = 'dx-scheduler-header-panel-cell' ;
3231const HEADER_PANEL_WEEK_CELL_CLASS = 'dx-scheduler-header-panel-week-cell' ;
33- const HEADER_ROW_CLASS = 'dx-scheduler-header-row' ;
3432
3533const HORIZONTAL = 'horizontal' ;
3634const toMs = dateUtils . dateToMilliseconds ;
@@ -298,8 +296,6 @@ class SchedulerTimeline extends SchedulerWorkSpace {
298296
299297 renderRTimeTable ( ) { }
300298
301- protected override renderGroupAllDayPanel ( ) { }
302-
303299 // eslint-disable-next-line @typescript-eslint/no-unused-vars
304300 generateRenderOptions ( argument ?: any ) {
305301 const options = super . generateRenderOptions ( true ) ;
@@ -348,28 +344,18 @@ class SchedulerTimeline extends SchedulerWorkSpace {
348344 }
349345
350346 protected override renderView ( ) {
351- let groupCellTemplates ;
352- if ( ! this . isRenovatedRender ( ) ) {
353- groupCellTemplates = this . renderGroupHeader ( ) ;
354- }
355-
356347 this . renderWorkSpace ( ) ;
357-
358- if ( this . isRenovatedRender ( ) ) {
359- this . virtualScrollingDispatcher . updateDimensions ( ) ;
360- }
348+ this . virtualScrollingDispatcher . updateDimensions ( ) ;
361349
362350 this . _shader = new HorizontalShader ( this ) ;
363351
364352 this . $sidebarTable . appendTo ( this . _sidebarScrollable . $content ( ) ) ;
365353
366- if ( this . isRenovatedRender ( ) && this . isVerticalGroupedWorkSpace ( ) ) {
354+ if ( this . isVerticalGroupedWorkSpace ( ) ) {
367355 this . renderRGroupPanel ( ) ;
368356 }
369357
370358 this . updateHeaderEmptyCellWidth ( ) ;
371-
372- this . applyCellTemplates ( groupCellTemplates ) ;
373359 }
374360
375361 protected override setHorizontalGroupHeaderCellsHeight ( ) { return noop ( ) ; }
@@ -397,76 +383,6 @@ class SchedulerTimeline extends SchedulerWorkSpace {
397383 . map ( ( _ , groupIndex ) => columnCountPerGroup * groupIndex + currentTimeColumnIndex ) ;
398384 }
399385
400- // --------------
401- // These methods should be deleted when we get rid of old render
402- // --------------
403-
404- protected override renderTimePanel ( ) { return noop ( ) ; }
405-
406- protected override renderAllDayPanel ( ) { return noop ( ) ; }
407-
408- protected override createAllDayPanelElements ( ) { return noop ( ) ; }
409-
410- protected override renderDateHeader ( ) {
411- const $headerRow = super . renderDateHeader ( ) ;
412- if ( this . needRenderWeekHeader ( ) ) {
413- const firstViewDate = new Date ( this . getStartViewDate ( ) ) ;
414- let currentDate = new Date ( firstViewDate ) ;
415-
416- const $cells : any [ ] = [ ] ;
417- const groupCount = this . _getGroupCount ( ) ;
418- const cellCountInDay = this . getCellCountInDay ( ) ;
419- const colSpan = this . isGroupedByDate ( )
420- ? cellCountInDay * groupCount
421- : cellCountInDay ;
422- const cellTemplate : any = this . option ( 'dateCellTemplate' ) ;
423-
424- const horizontalGroupCount = this . _isHorizontalGroupedWorkSpace ( ) && ! this . isGroupedByDate ( )
425- ? groupCount
426- : 1 ;
427- const cellsInGroup = this . viewDataProvider . viewDataGenerator . daysInInterval * ( this . option ( 'intervalCount' ) as any ) ;
428-
429- const cellsCount = cellsInGroup * horizontalGroupCount ;
430-
431- for ( let templateIndex = 0 ; templateIndex < cellsCount ; templateIndex ++ ) {
432- const $th = $ ( '<th>' ) ;
433- const text = formatWeekdayAndDay ( currentDate ) ;
434-
435- if ( cellTemplate ) {
436- const templateOptions = {
437- model : {
438- text,
439- date : new Date ( currentDate ) ,
440- ...this . getGroupsForDateHeaderTemplate ( templateIndex , colSpan ) ,
441- } ,
442- container : $th ,
443- index : templateIndex ,
444- } ;
445-
446- cellTemplate . render ( templateOptions ) ;
447- } else {
448- $th . text ( text ) ;
449- }
450-
451- $th
452- . addClass ( HEADER_PANEL_CELL_CLASS )
453- . addClass ( HEADER_PANEL_WEEK_CELL_CLASS )
454- . attr ( 'colSpan' , colSpan ) ;
455-
456- $cells . push ( $th ) ;
457-
458- if ( ( templateIndex % cellsInGroup ) === ( cellsInGroup - 1 ) ) {
459- currentDate = new Date ( firstViewDate ) ;
460- } else {
461- this . incrementDate ( currentDate ) ;
462- }
463- }
464-
465- const $row = $ ( '<tr>' ) . addClass ( HEADER_ROW_CLASS ) . append ( $cells as any ) ;
466- $headerRow . before ( $row ) ;
467- }
468- }
469-
470386 protected override renderIndicator ( height , rtlOffset , $container , groupCount ) {
471387 let $indicator ;
472388 const width = this . getIndicationWidth ( ) ;
@@ -504,18 +420,6 @@ class SchedulerTimeline extends SchedulerWorkSpace {
504420 groupByDate ,
505421 ) ;
506422 }
507-
508- // Old render methods.
509- // TODO Old render: delete these methods with the old render.
510-
511- protected override setCurrentTimeCells ( ) : void {
512- const timePanelCells = this . getTimePanelCells ( ) ;
513- const currentTimeCellIndices = this . getCurrentTimePanelCellIndices ( ) ;
514- currentTimeCellIndices . forEach ( ( timePanelCellIndex ) => {
515- timePanelCells . eq ( timePanelCellIndex )
516- . addClass ( HEADER_CURRENT_TIME_CELL_CLASS ) ;
517- } ) ;
518- }
519423}
520424
521425registerComponent ( 'dxSchedulerTimeline' , SchedulerTimeline as any ) ;
0 commit comments