').addClass(NODATA_CONTAINER_CLASS)
+ private renderNoData() {
+ this.$noDataContainer = $('
').addClass(NODATA_CONTAINER_CLASS)
.html(this.option('noDataText') as any);
- this._dateTableScrollable.$content().append(this._$noDataContainer);
+ this._dateTableScrollable.$content().append(this.$noDataContainer);
}
_setTableSizes() { return noop(); }
@@ -193,9 +193,9 @@ class SchedulerAgenda extends WorkSpace {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
_createCrossScrollingConfig(argument?: any) { return noop(); }
- _setGroupHeaderCellsHeight() {
+ private setGroupHeaderCellsHeight() {
const $cells = this._getGroupHeaderCells().filter((_, element) => !element.getAttribute('rowSpan'));
- const rows = this._removeEmptyRows(this._rows);
+ const rows = this.removeEmptyRows(this.rows);
if (!rows.length) {
return;
@@ -203,11 +203,11 @@ class SchedulerAgenda extends WorkSpace {
for (let i = 0; i < $cells.length; i++) {
const $cellContent = $cells.eq(i).find('.dx-scheduler-group-header-content');
- setOuterHeight($cellContent, this._getGroupRowHeight(rows[i]));
+ setOuterHeight($cellContent, this.getGroupRowHeight(rows[i]));
}
}
- _rowsIsEmpty(rows) {
+ private rowsIsEmpty(rows) {
let result = true;
for (let i = 0; i < rows.length; i++) {
@@ -229,7 +229,7 @@ class SchedulerAgenda extends WorkSpace {
(this.$element() as any).addClass(className);
}
- _removeEmptyRows(rows) {
+ private removeEmptyRows(rows) {
const result: any[] = [];
const isEmpty = function (data) {
return !data.some((value) => value > 0);
@@ -312,11 +312,11 @@ class SchedulerAgenda extends WorkSpace {
this._$groupTable.empty();
}
- if (this._$noDataContainer) {
- this._$noDataContainer.empty();
- this._$noDataContainer.remove();
+ if (this.$noDataContainer) {
+ this.$noDataContainer.empty();
+ this.$noDataContainer.remove();
- delete this._$noDataContainer;
+ delete this.$noDataContainer;
}
}
@@ -348,13 +348,13 @@ class SchedulerAgenda extends WorkSpace {
_attachEvents() { return noop(); }
- _cleanCellDataCache() { return noop(); }
+ private cleanCellDataCache() { return noop(); }
isIndicationAvailable() {
return false;
}
- _prepareCellTemplateOptions(text, date, rowIndex, $cell) {
+ private prepareCellTemplateOptions(text, date, rowIndex, $cell) {
const leaf = this.resourceManager.groupsLeafs[rowIndex];
const groups = leaf?.grouped ?? {};
const groupIndex = leaf?.groupIndex;
@@ -376,7 +376,7 @@ class SchedulerAgenda extends WorkSpace {
const cellTemplates: any[] = [];
const cellTemplateOpt = options.cellTemplate;
- this._$rows = [];
+ this.$rows = [];
let i;
const fillTableBody = function (rowIndex, rowSize) {
@@ -386,7 +386,7 @@ class SchedulerAgenda extends WorkSpace {
let cellDayName;
const $row = $('
');
const $td = $('| ');
- setHeight($td, this._getRowHeight(rowSize));
+ setHeight($td, this.getRowHeight(rowSize));
if (options.getStartDate) {
date = options.getStartDate?.(rowIndex);
@@ -395,7 +395,7 @@ class SchedulerAgenda extends WorkSpace {
}
if (cellTemplateOpt?.render) {
- const templateOptions = this._prepareCellTemplateOptions(`${cellDateNumber} ${cellDayName}`, date, i, $td);
+ const templateOptions = this.prepareCellTemplateOptions(`${cellDateNumber} ${cellDayName}`, date, i, $td);
cellTemplates.push(cellTemplateOpt.render.bind(cellTemplateOpt, templateOptions));
} else if (cellDateNumber && cellDayName) {
@@ -411,22 +411,22 @@ class SchedulerAgenda extends WorkSpace {
}
$row.append($td);
- this._$rows.push($row);
+ this.$rows.push($row);
}
}.bind(this);
- for (i = 0; i < this._rows.length; i++) {
- each(this._rows[i], fillTableBody);
- this._setLastRowClass();
+ for (i = 0; i < this.rows.length; i++) {
+ each(this.rows[i], fillTableBody);
+ this.setLastRowClass();
}
- $(options.container).append($(' |
').append(this._$rows));
+ $(options.container).append($('').append(this.$rows));
this._applyCellTemplates(cellTemplates);
}
- _setLastRowClass() {
- if (this._rows.length > 1 && this._$rows.length) {
- const $lastRow = this._$rows[this._$rows.length - 1];
+ private setLastRowClass() {
+ if (this.rows.length > 1 && this.$rows.length) {
+ const $lastRow = this.$rows[this.$rows.length - 1];
$lastRow.addClass(LAST_ROW_CLASS);
}
@@ -440,25 +440,25 @@ class SchedulerAgenda extends WorkSpace {
rowClass: TIME_PANEL_ROW_CLASS,
cellClass: TIME_PANEL_CELL_CLASS,
cellTemplate: this.option('dateCellTemplate'),
- getStartDate: this._getTimePanelStartDate.bind(this),
+ getStartDate: this.getTimePanelStartDate.bind(this),
});
}
- _getTimePanelStartDate(rowIndex) {
+ private getTimePanelStartDate(rowIndex) {
const current = new Date(this.option('currentDate') as any);
const cellDate = new Date(current.setDate(current.getDate() + rowIndex));
return cellDate;
}
- _getRowHeight(rowSize) {
+ private getRowHeight(rowSize) {
const baseHeight = this.option('rowHeight') as any;
const innerOffset = (rowSize - 1) * INNER_CELL_MARGIN;
return rowSize ? (baseHeight * rowSize) + innerOffset + OUTER_CELL_MARGIN : 0;
}
- _getGroupRowHeight(groupRows) {
+ private getGroupRowHeight(groupRows) {
if (!groupRows) {
return;
}
@@ -466,7 +466,7 @@ class SchedulerAgenda extends WorkSpace {
let result = 0;
for (let i = 0; i < groupRows.length; i++) {
- result += this._getRowHeight(groupRows[i]);
+ result += this.getRowHeight(groupRows[i]);
}
return result;
@@ -481,7 +481,7 @@ class SchedulerAgenda extends WorkSpace {
this.getStartViewDate(),
this.resourceManager.groupCount(),
);
- this._recalculateAgenda(rows);
+ this.recalculateAgenda(rows);
}
getAgendaVerticalStepHeight() {
@@ -536,7 +536,7 @@ class SchedulerAgenda extends WorkSpace {
renovatedRenderSupported() { return false; }
- _setSelectedCellsByCellData() {}
+ private setSelectedCellsByCellData() {}
_getIntervalDuration() {
return dateUtils.dateToMilliseconds('day') * (this.option('intervalCount') as any);
diff --git a/packages/devextreme/js/__internal/scheduler/workspaces/m_timeline.ts b/packages/devextreme/js/__internal/scheduler/workspaces/m_timeline.ts
index d6fa88fbfd59..3f5aa1cba268 100644
--- a/packages/devextreme/js/__internal/scheduler/workspaces/m_timeline.ts
+++ b/packages/devextreme/js/__internal/scheduler/workspaces/m_timeline.ts
@@ -59,7 +59,7 @@ class SchedulerTimeline extends SchedulerWorkSpace {
return 'shorttime';
}
- _getWorkSpaceHeight() {
+ private getWorkSpaceHeight() {
if (this.option('crossScrollingEnabled') && hasWindow()) {
return getBoundingRect(this._$dateTable.get(0)).height;
}
@@ -103,22 +103,24 @@ class SchedulerTimeline extends SchedulerWorkSpace {
return false;
}
- _needRenderWeekHeader() {
+ // Overridden in SchedulerTimelineDay, SchedulerTimelineWeek
+ needRenderWeekHeader() {
return false;
}
- _incrementDate(date) {
+ // Overridden in SchedulerTimelineWeek, SchedulerTimelineWorkWeek
+ incrementDate(date) {
date.setDate(date.getDate() + 1);
}
getIndicationCellCount() {
- const timeDiff = this._getTimeDiff();
- return this._calculateDurationInCells(timeDiff);
+ const timeDiff = this.getTimeDiff();
+ return this.calculateDurationInCells(timeDiff);
}
- _getTimeDiff() {
+ private getTimeDiff() {
let today = this._getToday();
- const date = this._getIndicationFirstViewDate();
+ const date = this.getIndicationFirstViewDate();
const startViewDate = this.getStartViewDate();
const dayLightOffset = timezoneUtils.getDaylightOffsetInMs(startViewDate, today);
@@ -130,7 +132,8 @@ class SchedulerTimeline extends SchedulerWorkSpace {
return today.getTime() - date.getTime();
}
- _calculateDurationInCells(timeDiff) {
+ // Overridden in SchedulerTimelineMonth
+ calculateDurationInCells(timeDiff) {
const today = this._getToday();
const differenceInDays = Math.floor(timeDiff / toMs('day'));
let duration = (timeDiff - differenceInDays * toMs('day') - (this.option('startDayHour') as any) * toMs('hour')) / this.getCellDuration();
@@ -156,26 +159,26 @@ class SchedulerTimeline extends SchedulerWorkSpace {
return this.getIndicationCellCount() * this.getCellWidth();
}
- _isVerticalShader() {
+ isVerticalShader() {
return false;
}
- _isCurrentTimeHeaderCell() {
+ isCurrentTimeHeaderCell() {
return false;
}
_setTableSizes() {
super._setTableSizes();
- const minHeight = this._getWorkSpaceMinHeight();
+ const minHeight = this.getWorkSpaceMinHeight();
setHeight(this._$sidebarTable, minHeight);
setHeight(this._$dateTable, minHeight);
this.virtualScrollingDispatcher.updateDimensions();
}
- _getWorkSpaceMinHeight() {
- let minHeight = this._getWorkSpaceHeight();
+ private getWorkSpaceMinHeight() {
+ let minHeight = this.getWorkSpaceHeight();
const workspaceContainerHeight = getOuterHeight(this._$flexContainer, true);
@@ -207,7 +210,7 @@ class SchedulerTimeline extends SchedulerWorkSpace {
return getOuterWidth(this._$dateTable, true);
}
- _getIndicationFirstViewDate() {
+ private getIndicationFirstViewDate() {
return dateUtils.trimTime(new Date(this.getStartViewDate()));
}
@@ -291,7 +294,7 @@ class SchedulerTimeline extends SchedulerWorkSpace {
return {
...options,
- isGenerateWeekDaysHeaderData: this._needRenderWeekHeader(),
+ isGenerateWeekDaysHeaderData: this.needRenderWeekHeader(),
getDateForHeaderText: timelineWeekUtils.getDateForHeaderText,
};
}
@@ -328,7 +331,7 @@ class SchedulerTimeline extends SchedulerWorkSpace {
_updateAllDayVisibility() { return noop(); }
- _updateAllDayHeight() { return noop(); }
+ private updateAllDayHeight() { return noop(); }
_getDateHeaderTemplate() {
return this.option('timeCellTemplate');
@@ -366,7 +369,7 @@ class SchedulerTimeline extends SchedulerWorkSpace {
.find(`.${HEADER_PANEL_CELL_CLASS}:not(.${HEADER_PANEL_WEEK_CELL_CLASS})`);
}
- _getCurrentTimePanelCellIndices() {
+ getCurrentTimePanelCellIndices() {
const columnCountPerGroup = this._getCellCount();
const today = this._getToday();
const index = this.getCellIndexByDate(today);
@@ -396,7 +399,7 @@ class SchedulerTimeline extends SchedulerWorkSpace {
_renderDateHeader() {
const $headerRow = super._renderDateHeader();
- if (this._needRenderWeekHeader()) {
+ if (this.needRenderWeekHeader()) {
const firstViewDate = new Date(this.getStartViewDate());
let currentDate = new Date(firstViewDate);
@@ -445,7 +448,7 @@ class SchedulerTimeline extends SchedulerWorkSpace {
if ((templateIndex % cellsInGroup) === (cellsInGroup - 1)) {
currentDate = new Date(firstViewDate);
} else {
- this._incrementDate(currentDate);
+ this.incrementDate(currentDate);
}
}
@@ -454,7 +457,7 @@ class SchedulerTimeline extends SchedulerWorkSpace {
}
}
- _renderIndicator(height, rtlOffset, $container, groupCount) {
+ renderIndicator(height, rtlOffset, $container, groupCount) {
let $indicator;
const width = this.getIndicationWidth();
@@ -495,16 +498,16 @@ class SchedulerTimeline extends SchedulerWorkSpace {
// Old render methods.
// TODO Old render: delete these methods with the old render.
- _setCurrentTimeCells(): void {
+ setCurrentTimeCells(): void {
const timePanelCells = this._getTimePanelCells();
- const currentTimeCellIndices = this._getCurrentTimePanelCellIndices();
+ const currentTimeCellIndices = this.getCurrentTimePanelCellIndices();
currentTimeCellIndices.forEach((timePanelCellIndex) => {
timePanelCells.eq(timePanelCellIndex)
.addClass(HEADER_CURRENT_TIME_CELL_CLASS);
});
}
- _cleanCurrentTimeCells(): void {
+ cleanCurrentTimeCells(): void {
(this.$element() as any)
.find(`.${HEADER_CURRENT_TIME_CELL_CLASS}`)
.removeClass(HEADER_CURRENT_TIME_CELL_CLASS);
diff --git a/packages/devextreme/js/__internal/scheduler/workspaces/m_timeline_day.ts b/packages/devextreme/js/__internal/scheduler/workspaces/m_timeline_day.ts
index 6bfe83908d05..ba68aeba60d9 100644
--- a/packages/devextreme/js/__internal/scheduler/workspaces/m_timeline_day.ts
+++ b/packages/devextreme/js/__internal/scheduler/workspaces/m_timeline_day.ts
@@ -12,7 +12,7 @@ class SchedulerTimelineDay extends SchedulerTimeline {
return TIMELINE_CLASS;
}
- _needRenderWeekHeader() {
+ needRenderWeekHeader() {
return this._isWorkSpaceWithCount();
}
}
diff --git a/packages/devextreme/js/__internal/scheduler/workspaces/m_timeline_month.ts b/packages/devextreme/js/__internal/scheduler/workspaces/m_timeline_month.ts
index 78b3a8d04e13..010831319013 100644
--- a/packages/devextreme/js/__internal/scheduler/workspaces/m_timeline_month.ts
+++ b/packages/devextreme/js/__internal/scheduler/workspaces/m_timeline_month.ts
@@ -30,7 +30,7 @@ class SchedulerTimelineMonth extends SchedulerTimeline {
return this.option('dateCellTemplate');
}
- _calculateDurationInCells(timeDiff) {
+ calculateDurationInCells(timeDiff) {
return timeDiff / this.getCellDuration();
}
diff --git a/packages/devextreme/js/__internal/scheduler/workspaces/m_timeline_week.ts b/packages/devextreme/js/__internal/scheduler/workspaces/m_timeline_week.ts
index c2a78f0fed29..e86c251899be 100644
--- a/packages/devextreme/js/__internal/scheduler/workspaces/m_timeline_week.ts
+++ b/packages/devextreme/js/__internal/scheduler/workspaces/m_timeline_week.ts
@@ -17,11 +17,11 @@ export default class SchedulerTimelineWeek extends SchedulerTimeline {
return getBoundingRect($headerRow.children().first().get(0)).width;
}
- _needRenderWeekHeader() {
+ needRenderWeekHeader() {
return true;
}
- _incrementDate(date) {
+ incrementDate(date) {
date.setDate(date.getDate() + 1);
}
}
diff --git a/packages/devextreme/js/__internal/scheduler/workspaces/m_timeline_work_week.ts b/packages/devextreme/js/__internal/scheduler/workspaces/m_timeline_work_week.ts
index aa98995aa062..490ccbe4e5d5 100644
--- a/packages/devextreme/js/__internal/scheduler/workspaces/m_timeline_work_week.ts
+++ b/packages/devextreme/js/__internal/scheduler/workspaces/m_timeline_work_week.ts
@@ -23,12 +23,12 @@ class SchedulerTimelineWorkWeek extends SchedulerTimelineWeek {
return TIMELINE_CLASS;
}
- _incrementDate(date) {
+ incrementDate(date) {
const day = date.getDay();
if (day === LAST_DAY_WEEK_INDEX) {
date.setDate(date.getDate() + 2);
}
- super._incrementDate(date);
+ super.incrementDate(date);
}
}
diff --git a/packages/devextreme/js/__internal/scheduler/workspaces/m_work_space_indicator.ts b/packages/devextreme/js/__internal/scheduler/workspaces/m_work_space_indicator.ts
index 8a4873193229..284dc958f464 100644
--- a/packages/devextreme/js/__internal/scheduler/workspaces/m_work_space_indicator.ts
+++ b/packages/devextreme/js/__internal/scheduler/workspaces/m_work_space_indicator.ts
@@ -18,7 +18,7 @@ const SCHEDULER_DATE_TIME_INDICATOR_CLASS = 'dx-scheduler-date-time-indicator';
const TIME_PANEL_CURRENT_TIME_CELL_CLASS = 'dx-scheduler-time-panel-current-time-cell';
class SchedulerWorkSpaceIndicator extends SchedulerWorkSpace {
- _indicatorInterval: any;
+ private indicatorInterval: any;
// @ts-expect-error
_getToday() {
@@ -59,7 +59,8 @@ class SchedulerWorkSpaceIndicator extends SchedulerWorkSpace {
return dateUtils.dateInRange(today, firstViewDate, endViewDate);
}
- _renderIndicator(height, rtlOffset, $container, groupCount) {
+ // Overridden in SchedulerTimeline
+ renderIndicator(height, rtlOffset, $container, groupCount) {
const groupedByDate = this.isGroupedByDate();
const repeatCount = groupedByDate ? 1 : groupCount;
for (let i = 0; i < repeatCount; i++) {
@@ -80,7 +81,7 @@ class SchedulerWorkSpaceIndicator extends SchedulerWorkSpace {
return $indicator;
}
- _getRtlOffset(width) {
+ private getRtlOffset(width) {
return this.option('rtlEnabled') ? getBoundingRect(this._dateTableScrollable.$content().get(0)).width - this.getTimePanelWidth() - width : 0;
}
@@ -89,27 +90,28 @@ class SchedulerWorkSpaceIndicator extends SchedulerWorkSpace {
return;
}
- this._clearIndicatorUpdateInterval();
+ this.clearIndicatorUpdateInterval();
- this._indicatorInterval = setInterval(() => {
+ this.indicatorInterval = setInterval(() => {
this.renderCurrentDateTimeIndication();
}, this.option('indicatorUpdateInterval'));
}
- _clearIndicatorUpdateInterval() {
- if (this._indicatorInterval) {
- clearInterval(this._indicatorInterval);
- delete this._indicatorInterval;
+ private clearIndicatorUpdateInterval() {
+ if (this.indicatorInterval) {
+ clearInterval(this.indicatorInterval);
+ delete this.indicatorInterval;
}
}
- _isVerticalShader() {
+ // Overridden in SchedulerTimeline
+ isVerticalShader() {
return true;
}
getIndicationWidth() {
const cellCount = this._getCellCount();
- const cellSpan = Math.min(this._getIndicatorDaysSpan(), cellCount);
+ const cellSpan = Math.min(this.getIndicatorDaysSpan(), cellCount);
const width = cellSpan * this.getCellWidth();
const maxWidth = this.getCellWidth() * cellCount;
@@ -117,13 +119,13 @@ class SchedulerWorkSpaceIndicator extends SchedulerWorkSpace {
}
getIndicatorOffset() {
- const cellSpan = this._getIndicatorDaysSpan() - 1;
+ const cellSpan = this.getIndicatorDaysSpan() - 1;
const offset = cellSpan * this.getCellWidth();
return offset;
}
- _getIndicatorDaysSpan(): number {
+ private getIndicatorDaysSpan(): number {
const today = this._getToday();
const viewStartTime = this.getStartViewDate().getTime();
let timeDiff = today.getTime() - viewStartTime;
@@ -152,7 +154,7 @@ class SchedulerWorkSpaceIndicator extends SchedulerWorkSpace {
}
_dispose() {
- this._clearIndicatorUpdateInterval();
+ this.clearIndicatorUpdateInterval();
super._dispose.apply(this, arguments as any);
}
@@ -171,12 +173,13 @@ class SchedulerWorkSpaceIndicator extends SchedulerWorkSpace {
}
renderCurrentDateTimeLineAndShader(): void {
- this._cleanDateTimeIndicator();
+ this.cleanDateTimeIndicator();
this._shader?.clean();
this._renderDateTimeIndication();
}
- _isCurrentTimeHeaderCell(headerIndex: number): boolean {
+ // Overridden in SchedulerTimeline
+ isCurrentTimeHeaderCell(headerIndex: number): boolean {
if (this.isIndicationOnView()) {
const { completeDateHeaderMap } = this.viewDataProvider;
const date = completeDateHeaderMap[completeDateHeaderMap.length - 1][headerIndex].startDate;
@@ -190,7 +193,7 @@ class SchedulerWorkSpaceIndicator extends SchedulerWorkSpace {
_getHeaderPanelCellClass(i) {
const cellClass = super._getHeaderPanelCellClass(i);
- if (this._isCurrentTimeHeaderCell(i)) {
+ if (this.isCurrentTimeHeaderCell(i)) {
return `${cellClass} ${HEADER_CURRENT_TIME_CELL_CLASS}`;
}
@@ -200,7 +203,7 @@ class SchedulerWorkSpaceIndicator extends SchedulerWorkSpace {
_cleanView() {
super._cleanView();
- this._cleanDateTimeIndicator();
+ this.cleanDateTimeIndicator();
}
_dimensionChanged() {
@@ -209,7 +212,7 @@ class SchedulerWorkSpaceIndicator extends SchedulerWorkSpace {
this.renderCurrentDateTimeLineAndShader();
}
- _cleanDateTimeIndicator() {
+ private cleanDateTimeIndicator() {
(this.$element() as any).find(`.${SCHEDULER_DATE_TIME_INDICATOR_CLASS}`).remove();
}
@@ -252,7 +255,8 @@ class SchedulerWorkSpaceIndicator extends SchedulerWorkSpace {
});
}
- _getCurrentTimePanelCellIndices() {
+ // Overridden in SchedulerTimeline
+ getCurrentTimePanelCellIndices() {
const rowCountPerGroup = this._getTimePanelRowCount();
const today = this._getToday();
const index = this.getCellIndexByDate(today);
@@ -298,28 +302,30 @@ class SchedulerWorkSpaceIndicator extends SchedulerWorkSpace {
const groupCount = this._getGroupCount() || 1;
const $container = this._dateTableScrollable.$content();
const height = this.getIndicationHeight();
- const rtlOffset = this._getRtlOffset(this.getCellWidth());
+ const rtlOffset = this.getRtlOffset(this.getCellWidth());
- this._renderIndicator(height, rtlOffset, $container, groupCount);
+ this.renderIndicator(height, rtlOffset, $container, groupCount);
// TODO Old render: delete this code with the old render.
if (!this.isRenovatedRender()) {
- this._setCurrentTimeCells();
+ this.setCurrentTimeCells();
}
}
// Temporary new render methods.
// TODO Old render: replace base call methods by these after the deleting of the old render.
- protected _setCurrentTimeCells(): void {
+ // Overridden in SchedulerTimeline
+ setCurrentTimeCells(): void {
const timePanelCells = this._getTimePanelCells();
- const currentTimeCellIndices = this._getCurrentTimePanelCellIndices();
+ const currentTimeCellIndices = this.getCurrentTimePanelCellIndices();
currentTimeCellIndices.forEach((timePanelCellIndex) => {
timePanelCells.eq(timePanelCellIndex)
.addClass(TIME_PANEL_CURRENT_TIME_CELL_CLASS);
});
}
- protected _cleanCurrentTimeCells(): void {
+ // Overridden in SchedulerTimeline
+ cleanCurrentTimeCells(): void {
(this.$element() as any)
.find(`.${TIME_PANEL_CURRENT_TIME_CELL_CLASS}`)
.removeClass(TIME_PANEL_CURRENT_TIME_CELL_CLASS);
diff --git a/packages/devextreme/js/__internal/scheduler/workspaces/m_work_space_month.ts b/packages/devextreme/js/__internal/scheduler/workspaces/m_work_space_month.ts
index 9c06047ee21b..93845ae4cb91 100644
--- a/packages/devextreme/js/__internal/scheduler/workspaces/m_work_space_month.ts
+++ b/packages/devextreme/js/__internal/scheduler/workspaces/m_work_space_month.ts
@@ -156,7 +156,7 @@ class SchedulerWorkSpaceMonth extends SchedulerWorkSpace {
_updateAllDayVisibility() { return noop(); }
- _updateAllDayHeight() { return noop(); }
+ private updateAllDayHeight() { return noop(); }
// --------------
// These methods should be deleted when we get rid of old render
@@ -166,7 +166,7 @@ class SchedulerWorkSpaceMonth extends SchedulerWorkSpace {
_renderAllDayPanel() { return noop(); }
- _setMonthClassesToCell($cell, data) {
+ private setMonthClassesToCell($cell, data) {
$cell
.toggleClass(DATE_TABLE_CURRENT_DATE_CLASS, data.isCurrentDate)
.toggleClass(DATE_TABLE_FIRST_OF_MONTH_CLASS, data.isFirstDayMonthHighlighting)
@@ -182,7 +182,7 @@ class SchedulerWorkSpaceMonth extends SchedulerWorkSpace {
return monthUtils.getCellText(date, this.option('intervalCount') as any);
};
options.getCellTextClass = DATE_TABLE_CELL_TEXT_CLASS;
- options.setAdditionalClasses = this._setMonthClassesToCell.bind(this);
+ options.setAdditionalClasses = this.setMonthClassesToCell.bind(this);
super._renderTableBody(options);
}
diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/agenda.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/agenda.tests.js
index 59d1e9e0439d..8fc531502a38 100644
--- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/agenda.tests.js
+++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/agenda.tests.js
@@ -33,7 +33,7 @@ module('Agenda', {}, () => {
const config = {
onContentReady: e => {
e.component._renderView();
- e.component._recalculateAgenda(rows);
+ e.component.recalculateAgenda(rows);
},
getResourceManager: getEmptyResourceManager,
};
@@ -61,11 +61,11 @@ module('Agenda', {}, () => {
assert.deepEqual(firstViewDate, new Date(2016, 1, 17, 2), 'The first view date is OK');
});
- test('_removeEmptyRows method', async function(assert) {
+ test('removeEmptyRows method', async function(assert) {
const rows = [[0, 0, 0, 0, 0], [0, 0, 0, 0, 1], [0, 0, 0, 0, 0], [1, 1, 1, 0, 1]];
const instance = createInstance();
- const resultRows = instance._removeEmptyRows(rows);
+ const resultRows = instance.removeEmptyRows(rows);
assert.deepEqual(resultRows, [[0, 0, 0, 0, 1], [1, 1, 1, 0, 1]], 'The empty rows was removed');
});
@@ -140,7 +140,7 @@ module('Agenda', {}, () => {
test('Agenda should be recalculated after rowHeight changed', async function(assert) {
const instance = createInstance();
- const recalculateStub = sinon.stub(instance, '_recalculateAgenda');
+ const recalculateStub = sinon.stub(instance, 'recalculateAgenda');
instance.option('rowHeight', 100);
diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/integration.agenda.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/integration.agenda.tests.js
index d37ed230f5f5..bf9e6e10f6f9 100644
--- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/integration.agenda.tests.js
+++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/integration.agenda.tests.js
@@ -786,7 +786,7 @@ module('Integration: Agenda', moduleConfig, () => {
const rowHeight = 77;
const $element = instance.$element();
const expectedWidth = getOuterWidth($element.find('.dx-scheduler-date-table'));
- const agendaStub = sinon.stub(agenda, '_getRowHeight').returns(rowHeight);
+ const agendaStub = sinon.stub(agenda, 'getRowHeight').returns(rowHeight);
try {
instance.option('dataSource', [
@@ -1565,7 +1565,7 @@ module('Integration: Agenda', moduleConfig, () => {
instance.option('dataSource', data);
await waitAsync(0);
- const calculatedRows = agendaWorkspace._rows[0];
+ const calculatedRows = agendaWorkspace.rows[0];
assert.equal(calculatedRows.length, 65, 'Rows are OK');
$.each(calculatedRows, function(index, item) {
@@ -1606,7 +1606,7 @@ module('Integration: Agenda', moduleConfig, () => {
instance.option('dataSource', data);
await waitAsync(0);
- const calculatedRows = agendaWorkspace._rows;
+ const calculatedRows = agendaWorkspace.rows;
assert.deepEqual(calculatedRows, [[1, 2, 2, 2, 2]], 'Rows are OK');
} finally {
endViewDateStub.restore();
@@ -1640,7 +1640,7 @@ module('Integration: Agenda', moduleConfig, () => {
instance.option('dataSource', data);
await waitAsync(0);
- const calculatedRows = agendaWorkspace._rows;
+ const calculatedRows = agendaWorkspace.rows;
assert.deepEqual(calculatedRows, [[0, 1, 1, 1, 0]], 'Rows are OK');
} finally {
endViewDateStub.restore();
@@ -1671,7 +1671,7 @@ module('Integration: Agenda', moduleConfig, () => {
instance.option('dataSource', data);
await waitAsync(0);
- const calculatedRows = agendaWorkspace._rows;
+ const calculatedRows = agendaWorkspace.rows;
assert.deepEqual(calculatedRows, [[1, 1, 1, 1, 0]], 'Rows are OK');
} finally {
endViewDateStub.restore();
@@ -1709,7 +1709,7 @@ module('Integration: Agenda', moduleConfig, () => {
instance.option('dataSource', data);
await waitAsync(0);
- const calculatedRows = agendaWorkspace._rows;
+ const calculatedRows = agendaWorkspace.rows;
assert.deepEqual(calculatedRows, [[0, 1, 1, 0, 1, 1, 0]], 'Rows are OK');
} finally {
endViewDateStub.restore();