Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export class CompactAppointmentsHelper {
getItemSettings,
};

workSpace._createDragBehaviorBase($element, $schedulerElement, options);
workSpace.createDragBehaviorBase($element, $schedulerElement, options);
};
}

Expand Down
12 changes: 6 additions & 6 deletions packages/devextreme/js/__internal/scheduler/m_scheduler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1164,7 +1164,7 @@ class Scheduler extends SchedulerOptionsBaseWidget {
_initMarkupCore() {
this._readyToRenderAppointments = hasWindow();

this._workSpace && this._cleanWorkspace();
this._workSpace && this.cleanWorkSpace();

this._renderWorkSpace();
this._appointments.option({
Expand Down Expand Up @@ -1253,7 +1253,7 @@ class Scheduler extends SchedulerOptionsBaseWidget {
getResizableStep: () => (this._workSpace ? this._workSpace.positionHelper.getResizableStep() : 0),
getDOMElementsMetaData: () => this._workSpace?.getDOMElementsMetaData(),
getViewDataProvider: () => this._workSpace?.viewDataProvider,
isVerticalGroupedWorkSpace: () => this._workSpace._isVerticalGroupedWorkSpace(),
isVerticalGroupedWorkSpace: () => this._workSpace.isVerticalGroupedWorkSpace(),
isDateAndTimeView: () => isDateAndTimeView(this._workSpace.type),
onContentReady: () => {
this._workSpace?.option('allDayExpanded', this._isAllDayExpanded());
Expand Down Expand Up @@ -1297,12 +1297,12 @@ class Scheduler extends SchedulerOptionsBaseWidget {
this._workSpace = this._createComponent($workSpace, workSpaceComponent, workSpaceConfig);

this._allowDragging() && this._workSpace.initDragBehavior(this, this._all);
this._workSpace._attachTablesEvents();
this._workSpace.attachTablesEvents();
this._workSpace.getWorkArea().append(this._appointments.$element());

this._recalculateWorkspace();
if (currentViewOptions.startDate) {
this._updateOption('header', 'currentDate', this._workSpace._getHeaderDate());
this._updateOption('header', 'currentDate', this._workSpace.getHeaderDate());
}
}

Expand Down Expand Up @@ -1418,7 +1418,7 @@ class Scheduler extends SchedulerOptionsBaseWidget {
}

_refreshWorkSpace(): void {
this._cleanWorkspace();
this.cleanWorkSpace();

delete this._workSpace;

Expand All @@ -1433,7 +1433,7 @@ class Scheduler extends SchedulerOptionsBaseWidget {
}
}

_cleanWorkspace() {
cleanWorkSpace() {
this._appointments.$element().detach();
this._workSpace._dispose();
this._workSpace.$element().remove();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ const subscribes = {
};
}

if (!allDay && VERTICAL_VIEW_TYPES.includes(this.currentView.type) && this._workSpace._isVerticalGroupedWorkSpace()) {
if (!allDay && VERTICAL_VIEW_TYPES.includes(this.currentView.type) && this._workSpace.isVerticalGroupedWorkSpace()) {
const verticalGroupBounds = this._workSpace.getGroupBounds(options.coordinates);
return {
left: 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ class AppointmentLayoutManager {
const DOMMetaData = workspace.getDOMElementsMetaData();
const allDayHeight = getAllDayHeight(
workspace.option('showAllDayPanel'),
workspace._isVerticalGroupedWorkSpace(),
workspace.isVerticalGroupedWorkSpace(),
DOMMetaData,
);
const rowCount = workspace._getRowCount();
const rowCount = workspace.getRowCount();
const { positionHelper, viewDataProvider } = workspace;
const visibleDayDuration = viewDataProvider.getVisibleDayDuration(
workspace.option('startDayHour'),
Expand Down Expand Up @@ -119,7 +119,7 @@ class AppointmentLayoutManager {
allowResizing: this.instance._allowResizing(),
allowAllDayResizing: this.instance._allowAllDayResizing(),
startViewDate: workspace.getStartViewDate(),
groupOrientation: workspace._getRealGroupOrientation(),
groupOrientation: workspace.getRealGroupOrientation(),
cellWidth: getCellWidth(DOMMetaData),
cellHeight: getCellHeight(DOMMetaData),
allDayHeight,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class SchedulerAgenda extends WorkSpace {
if (this._$groupTable) {
this._$groupTable.remove();
this._$groupTable = null;
this._detachGroupCountClass();
this.detachGroupCountClass();
}
} else if (!this._$groupTable) {
this._initGroupTable();
Expand All @@ -114,37 +114,37 @@ class SchedulerAgenda extends WorkSpace {
return false;
}

_isVerticalGroupedWorkSpace() {
protected override isVerticalGroupedWorkSpace() {
return false;
}

_getElementClass() {
protected override getElementClass() {
return AGENDA_CLASS;
}

_calculateStartViewDate() {
return agendaUtils.calculateStartViewDate(this.option('currentDate') as any, this.option('startDayHour') as any);
}

_getRowCount() {
protected override getRowCount() {
return this.option('agendaDuration') as number;
}

_getCellCount() {
return 1;
}

_getTimePanelRowCount() {
protected override getTimePanelRowCount() {
return this.option('agendaDuration') as number;
}

_renderAllDayPanel() { return noop(); }
protected override renderAllDayPanel() { return noop(); }

_updateAllDayVisibility() { return noop(); }
protected override updateAllDayVisibility() { return noop(); }

_updateAllDayHeight() { return noop(); }

_initWorkSpaceUnits() {
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);
Expand All @@ -159,10 +159,10 @@ class SchedulerAgenda extends WorkSpace {
}
}

_renderView() {
protected override renderView() {
this._startViewDate = this._calculateStartViewDate();
this._rows = [];
this._initPositionHelper();
this.initPositionHelper();
}

_recalculateAgenda(rows) {
Expand All @@ -176,14 +176,14 @@ class SchedulerAgenda extends WorkSpace {
this._rows = rows;

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

this._renderTimePanel();
this._renderDateTable();
this.renderTimePanel();
this.renderDateTable();
(this.invoke as any)('onAgendaReady', rows);
this._applyCellTemplates(cellTemplates);
this.applyCellTemplates(cellTemplates);
this._dateTableScrollable.update();
}

Expand All @@ -194,15 +194,15 @@ class SchedulerAgenda extends WorkSpace {
this._dateTableScrollable.$content().append(this._$noDataContainer);
}

_setTableSizes() { return noop(); }
protected override setTableSizes() { return noop(); }

_toggleHorizontalScrollClass() { return noop(); }
protected override toggleHorizontalScrollClass() { return noop(); }

// eslint-disable-next-line @typescript-eslint/no-unused-vars
_createCrossScrollingConfig(argument?: any) { return noop(); }

_setGroupHeaderCellsHeight() {
const $cells = this._getGroupHeaderCells().filter((_, element) => !element.getAttribute('rowSpan'));
const $cells = this.getGroupHeaderCells().filter((_, element) => !element.getAttribute('rowSpan'));
const rows = this._removeEmptyRows(this._rows);

if (!rows.length) {
Expand Down Expand Up @@ -232,7 +232,7 @@ class SchedulerAgenda extends WorkSpace {
return result;
}

_attachGroupCountClass() {
protected override attachGroupCountClass() {
const className = getVerticalGroupCountClass(this.option('groups'));
(this.$element() as any).addClass(className);
}
Expand All @@ -252,11 +252,11 @@ class SchedulerAgenda extends WorkSpace {
return result;
}

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

_makeGroupRows() {
protected override makeGroupRows() {
const resourceManager = this.option('getResourceManager')();
const allAppointments = (this.option('getFilteredItems') as any)();
const tree = reduceResourcesTree(
Expand All @@ -273,7 +273,7 @@ class SchedulerAgenda extends WorkSpace {
cellTag: 'th',
groupTableClass: GROUP_TABLE_CLASS,
groupRowClass: GROUP_ROW_CLASS,
groupCellClass: this._getGroupHeaderClass(),
groupCellClass: this.getGroupHeaderClass(),
groupCellCustomContent(cell: HTMLDivElement, cellTextElement: HTMLElement, index: number, node: GroupNode) {
const container = domAdapter.createElement('div');
container.className = getGroupHeaderContentClass;
Expand Down Expand Up @@ -328,11 +328,11 @@ class SchedulerAgenda extends WorkSpace {
}
}

_createWorkSpaceElements() {
this._createWorkSpaceStaticElements();
protected override createWorkSpaceElements() {
this.createWorkSpaceStaticElements();
}

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

Expand All @@ -344,17 +344,17 @@ class SchedulerAgenda extends WorkSpace {
this.$element().append(this._dateTableScrollable.$element());
}

_renderDateTable() {
this._renderTableBody({
protected override renderDateTable() {
this.renderTableBody({
container: getPublicElement(this._$dateTable),
rowClass: DATE_TABLE_ROW_CLASS,
cellClass: this._getDateTableCellClass(),
cellClass: this.getDateTableCellClass(),
});
}

_attachTablesEvents() { return noop(); }
protected override attachTablesEvents() { return noop(); }

_attachEvents() { return noop(); }
protected override attachEvents() { return noop(); }

_cleanCellDataCache() { return noop(); }

Expand All @@ -380,7 +380,7 @@ class SchedulerAgenda extends WorkSpace {
}

// eslint-disable-next-line @typescript-eslint/no-unused-vars
_renderTableBody(options: any, delayCellTemplateRendering?: any) {
protected override renderTableBody(options: any, delayCellTemplateRendering?: any) {
const cellTemplates: any[] = [];
const cellTemplateOpt = options.cellTemplate;

Expand Down Expand Up @@ -429,7 +429,7 @@ class SchedulerAgenda extends WorkSpace {
}

$(options.container).append($('<tbody>').append(this._$rows));
this._applyCellTemplates(cellTemplates);
this.applyCellTemplates(cellTemplates);
}

_setLastRowClass() {
Expand All @@ -440,10 +440,10 @@ class SchedulerAgenda extends WorkSpace {
}
}

_renderTimePanel() {
this._renderTableBody({
protected override renderTimePanel() {
this.renderTableBody({
container: getPublicElement(this._$timePanel),
rowCount: this._getTimePanelRowCount(),
rowCount: this.getTimePanelRowCount(),
cellCount: 1,
rowClass: TIME_PANEL_ROW_CLASS,
cellClass: TIME_PANEL_CELL_CLASS,
Expand Down Expand Up @@ -491,7 +491,7 @@ class SchedulerAgenda extends WorkSpace {
onDataSourceChanged(appointments?: SafeAppointment[]) {
super.onDataSourceChanged();

this._renderView();
this.renderView();

const rows = this._calculateRows(appointments);
this._recalculateAgenda(rows);
Expand Down
Loading
Loading