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
16 changes: 0 additions & 16 deletions packages/devextreme/eslint-scheduler-allowlist.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -67,22 +67,6 @@ const schedulerR1Overrides = [

const schedulerLegacyMembers = [
// workspaces/m_work_space.ts
'_$allDayPanel',
'_$dateTable',
'_$dateTableScrollableContent',
'_$flexContainer',
'_$groupTable',
'_$headerPanel',
'_$headerPanelContainer',
'_$thead',
'_dateTableScrollable',
'_getCellCount',
'_getGroupCount',
'_groupedStrategy',
'_isHorizontalGroupedWorkSpace',
'_shader',
'_sidebarScrollable',

// m_scheduler.ts
'_appointments',
'_compactAppointmentsHelper',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ describe('scheduler workspace skipped days support', () => {
});

expect(workspace.getStartViewDate()).toEqual(new Date(2026, 2, 29));
expect((workspace as any)._getCellCount()).toBe(7);
expect((workspace as any).getCellCount()).toBe(7);
});

it('should use custom skippedDays in work week runtime layout', () => {
Expand All @@ -228,7 +228,7 @@ describe('scheduler workspace skipped days support', () => {
});

expect(workspace.getStartViewDate()).toEqual(new Date(2026, 2, 29));
expect((workspace as any)._getCellCount()).toBe(6);
expect((workspace as any).getCellCount()).toBe(6);
});

it('should skip configured hidden days when incrementing timeline header dates', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ const subscribes = {
},

getGroupCount() {
return this._workSpace._getGroupCount();
return this._workSpace.getGroupCount();
},

// TODO<Appointments>: delete this method when old impl is removed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type SchedulerWorkSpace from '../workspaces/m_work_space';
const DATE_TIME_SHADER_CLASS = 'dx-scheduler-date-time-shader';

class CurrentTimeShader {
protected $container = this.workSpace._dateTableScrollable.$content();
protected $container = this.workSpace.getScrollable().$content();

protected shader!: dxElementWrapper[];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import CurrentTimeShader from './current_time_shader';

class HorizontalCurrentTimeShader extends CurrentTimeShader {
renderShader(): void {
const groupCount = this.workSpace._isHorizontalGroupedWorkSpace()
? this.workSpace._getGroupCount()
const groupCount = this.workSpace.isHorizontalGroupedWorkSpace()
? this.workSpace.getGroupCount()
: 1;

for (let i = 0; i < groupCount; i += 1) {
Expand All @@ -34,7 +34,7 @@ class HorizontalCurrentTimeShader extends CurrentTimeShader {

if (groupIndex >= 1) {
const { workSpace } = this;
const indicationWidth = workSpace._getCellCount() * workSpace.getCellWidth();
const indicationWidth = workSpace.getCellCount() * workSpace.getCellWidth();
$shader.css('left', indicationWidth);
} else {
$shader.css('left', 0);
Expand Down Expand Up @@ -64,9 +64,9 @@ class HorizontalCurrentTimeShader extends CurrentTimeShader {
this.applyShaderWidth($shader, shaderWidth);

if (isFirstShaderPart) {
shaderLeft = workSpace._getCellCount() * workSpace.getCellWidth() * groupIndex;
shaderLeft = workSpace.getCellCount() * workSpace.getCellWidth() * groupIndex;
} else {
shaderLeft = workSpace.getCellWidth() * integerPart * workSpace._getGroupCount()
shaderLeft = workSpace.getCellWidth() * integerPart * workSpace.getGroupCount()
+ groupIndex * workSpace.getCellWidth();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import { setHeight, setWidth } from '@js/core/utils/size';

import CurrentTimeShader from './current_time_shader';

const DATE_TIME_SHADER_ALL_DAY_CLASS = 'dx-scheduler-date-time-shader-all-day';
export const DATE_TIME_SHADER_ALL_DAY_CLASS = 'dx-scheduler-date-time-shader-all-day';

const DATE_TIME_SHADER_TOP_CLASS = 'dx-scheduler-date-time-shader-top';
const DATE_TIME_SHADER_BOTTOM_CLASS = 'dx-scheduler-date-time-shader-bottom';

Expand All @@ -24,7 +25,7 @@ class VerticalCurrentTimeShader extends CurrentTimeShader {
}

setHeight(this.$shader, shaderHeight);
const groupCount = this.workSpace._getGroupCount() || 1;
const groupCount = this.workSpace.getGroupCount() || 1;

if (this.workSpace.isGroupedByDate()) {
this.renderGroupedByDateShaderParts(groupCount, shaderHeight, maxHeight, isSolidShader);
Expand Down Expand Up @@ -125,7 +126,7 @@ class VerticalCurrentTimeShader extends CurrentTimeShader {
setWidth(this.$allDayIndicator, shaderWidth);
this.$allDayIndicator.css('left', this.getShaderOffset(i, shaderWidth));

this.workSpace._$allDayPanel.prepend(this.$allDayIndicator);
this.workSpace.addAllDayShaderIndicator(this.$allDayIndicator);
}
}

Expand All @@ -152,9 +153,7 @@ class VerticalCurrentTimeShader extends CurrentTimeShader {
clean(): void {
super.clean();

if (this.workSpace?._$allDayPanel) {
this.workSpace._$allDayPanel.find(`.${DATE_TIME_SHADER_ALL_DAY_CLASS}`).remove();
}
this.workSpace?.removeAllDayShaderIndicator();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,14 @@ class SchedulerAgenda extends WorkSpace {
break;
case 'groups':
if (!value?.length) {
if (this._$groupTable) {
this._$groupTable.remove();
this._$groupTable = null;
if (this.$groupTable) {
this.$groupTable.remove();
this.$groupTable = null;
this.detachGroupCountClass();
}
} else if (!this._$groupTable) {
} else if (!this.$groupTable) {
this.initGroupTable();
this._dateTableScrollable.$content().prepend(this._$groupTable);
this.$dateTableScrollable.$content().prepend(this.$groupTable);
}
super._optionChanged(args);
break;
Expand Down Expand Up @@ -124,7 +124,7 @@ class SchedulerAgenda extends WorkSpace {
return this.option('agendaDuration') as number;
}

_getCellCount() {
getCellCount() {
return 1;
}

Expand All @@ -139,15 +139,15 @@ class SchedulerAgenda extends WorkSpace {
protected override initWorkSpaceUnits() {
this.initGroupTable();
this.$timePanel = $('<table>').attr('aria-hidden', true).addClass(TIME_PANEL_CLASS);
this._$dateTable = $('<table>').attr('aria-hidden', true).addClass(DATE_TABLE_CLASS);
this._$dateTableScrollableContent = $('<div>').addClass('dx-scheduler-date-table-scrollable-content');
this.$dateTable = $('<table>').attr('aria-hidden', true).addClass(DATE_TABLE_CLASS);
this.$dateTableScrollableContent = $('<div>').addClass('dx-scheduler-date-table-scrollable-content');
this.$dateTableContainer = $('<div>').addClass('dx-scheduler-date-table-container');
}

private initGroupTable() {
const groups = this.option('groups');
if (groups?.length) {
this._$groupTable = $('<table>').attr('aria-hidden', true).addClass(GROUP_TABLE_CLASS);
this.$groupTable = $('<table>').attr('aria-hidden', true).addClass(GROUP_TABLE_CLASS);
}
}

Expand All @@ -169,22 +169,22 @@ class SchedulerAgenda extends WorkSpace {
}
this.rows = rows;

if (this._$groupTable) {
if (this.$groupTable) {
cellTemplates = this.renderGroupHeader();
this.setGroupHeaderCellsHeight();
}

this.renderTimePanel();
this.renderDateTable();
this.applyCellTemplates(cellTemplates);
this._dateTableScrollable.update();
this.$dateTableScrollable.update();
}

private renderNoData() {
this.$noDataContainer = $('<div>').addClass(NODATA_CONTAINER_CLASS)
.html(this.option('noDataText') as any);

this._dateTableScrollable.$content().append(this.$noDataContainer);
this.$dateTableScrollable.$content().append(this.$noDataContainer);
}

protected override setTableSizes() { return noop(); }
Expand Down Expand Up @@ -246,7 +246,7 @@ class SchedulerAgenda extends WorkSpace {
}

protected override getGroupHeaderContainer() {
return this._$groupTable;
return this.$groupTable;
}

protected override makeGroupRows() {
Expand Down Expand Up @@ -306,11 +306,11 @@ class SchedulerAgenda extends WorkSpace {
}

protected override cleanView() {
this._$dateTable.empty();
this.$dateTable.empty();
this.$timePanel.empty();

if (this._$groupTable) {
this._$groupTable.empty();
if (this.$groupTable) {
this.$groupTable.empty();
}

if (this.$noDataContainer) {
Expand All @@ -326,20 +326,20 @@ class SchedulerAgenda extends WorkSpace {
}

protected override createWorkSpaceStaticElements() {
this.$dateTableContainer.append(this._$dateTable);
this._dateTableScrollable.$content().append(this._$dateTableScrollableContent);
this.$dateTableContainer.append(this.$dateTable);
this.$dateTableScrollable.$content().append(this.$dateTableScrollableContent);

if (this._$groupTable) {
this._$dateTableScrollableContent.prepend(this._$groupTable);
if (this.$groupTable) {
this.$dateTableScrollableContent.prepend(this.$groupTable);
}

this._$dateTableScrollableContent.append(this.$timePanel, this.$dateTableContainer);
this.$element().append(this._dateTableScrollable.$element());
this.$dateTableScrollableContent.append(this.$timePanel, this.$dateTableContainer);
this.$element().append(this.$dateTableScrollable.$element());
}

protected override renderDateTable() {
this.renderTableBody({
container: getPublicElement(this._$dateTable),
container: getPublicElement(this.$dateTable),
rowClass: DATE_TABLE_ROW_CLASS,
cellClass: this.getDateTableCellClass(),
});
Expand Down
Loading
Loading