').appendTo(this.mainContainer);
const currentViewType = this.currentView.type;
const workSpaceComponent = VIEWS_CONFIG[currentViewType].workSpace;
- const workSpaceConfig = this._workSpaceConfig(this.currentView);
+ const workSpaceConfig = this.workSpaceConfig(this.currentView);
// @ts-expect-error
this._workSpace = this._createComponent($workSpace, workSpaceComponent, workSpaceConfig);
- this._allowDragging() && this._workSpace.initDragBehavior(this, this._all);
+ this.allowDragging() && this._workSpace.initDragBehavior(this, this.all);
this._workSpace._attachTablesEvents();
this._workSpace.getWorkArea().append(this._appointments.$element());
}
renderAgendaWorkspace(): void {
- const $workSpace = $('
').appendTo(this._mainContainer);
- const workSpaceConfig = this._workSpaceConfig(this.currentView);
+ const $workSpace = $('
').appendTo(this.mainContainer);
+ const workSpaceConfig = this.workSpaceConfig(this.currentView);
const workSpaceComponent = VIEWS_CONFIG.agenda.workSpace;
// @ts-expect-error
this._workSpace = this._createComponent($workSpace, workSpaceComponent, workSpaceConfig);
this._workSpace.getWorkArea().append(this._appointments.$element());
}
- _recalculateWorkspace() {
+ private recalculateWorkspace() {
// @ts-expect-error
- this._workSpaceRecalculation = new Deferred();
+ this.workSpaceRecalculation = new Deferred();
triggerResizeEvent(this._workSpace.$element());
- this._waitAsyncTemplate(() => {
+ this.waitAsyncTemplate(() => {
this._workSpace.renderCurrentDateTimeLineAndShader();
});
}
- _workSpaceConfig(currentViewOptions: NormalizedView) {
+ private workSpaceConfig(currentViewOptions: NormalizedView) {
const scrolling = this.getViewOption('scrolling');
const isVirtualScrolling = scrolling.mode === 'virtual';
const horizontalVirtualScrollingAllowed = isVirtualScrolling
@@ -1374,17 +1374,17 @@ class Scheduler extends SchedulerOptionsBaseWidget {
allDayPanelMode: this.option('allDayPanelMode'),
onSelectedCellsClick: this.showAddAppointmentPopup.bind(this),
onRenderAppointments: () => {
- this._renderAppointments();
+ this.renderAppointments();
},
onShowAllDayPanel: (value) => this.option('showAllDayPanel', value),
- getHeaderHeight: () => utils.DOM.getHeaderHeight(this._header),
+ getHeaderHeight: () => utils.DOM.getHeaderHeight(this.header),
onScrollEnd: () => this._appointments.updateResizableArea(),
// TODO: SSR does not work correctly with renovated render
- renovateRender: this._isRenovatedRender(isVirtualScrolling),
+ renovateRender: this.isRenovatedRender(isVirtualScrolling),
}, currentViewOptions);
- result.notifyScheduler = this._notifyScheduler;
+ result.notifyScheduler = this.notifyScheduler;
result.groups = this.resourceManager.groupResources();
result.onCellClick = this._createActionByOption('onCellClick');
result.onCellContextMenu = this._createActionByOption('onCellContextMenu');
@@ -1399,23 +1399,23 @@ class Scheduler extends SchedulerOptionsBaseWidget {
return result;
}
- _isRenovatedRender(isVirtualScrolling) {
+ private isRenovatedRender(isVirtualScrolling) {
return (this.option('renovateRender') && hasWindow()) || isVirtualScrolling;
}
- _waitAsyncTemplate(callback) {
+ private waitAsyncTemplate(callback) {
if (this._options.silent('templatesRenderAsynchronously')) {
const timer = setTimeout(() => {
callback();
clearTimeout(timer);
});
- this._asyncTemplatesTimers.push(timer);
+ this.asyncTemplatesTimers.push(timer);
} else {
callback();
}
}
- _getAppointmentTemplate(optionName) {
+ getAppointmentTemplate(optionName) {
if (this.currentView?.[optionName]) {
return this._getTemplate(this.currentView[optionName]);
}
@@ -1424,27 +1424,31 @@ class Scheduler extends SchedulerOptionsBaseWidget {
return this._getTemplateByOption(optionName);
}
- _updateOption(viewName: 'workSpace' | 'header', optionName: string, value: T): void {
- this[`_${viewName}`]?.option(optionName, value);
+ private updateOption(viewName: 'workSpace' | 'header', optionName: string, value: T): void {
+ if (viewName === 'header') {
+ this.header?.option(optionName, value);
+ } else {
+ this._workSpace?.option(optionName, value);
+ }
}
- _refreshWorkSpace(): void {
- this._cleanWorkspace();
+ private refreshWorkSpace(): void {
+ this.cleanWorkspace();
delete this._workSpace;
- this._renderWorkSpace();
+ this.renderWorkSpace();
- if (this._readyToRenderAppointments) {
+ if (this.readyToRenderAppointments) {
this._appointments.option({
fixedContainer: this._workSpace.getFixedContainer(),
allDayContainer: this._workSpace.getAllDayContainer(),
});
- this._waitAsyncTemplate(() => this._workSpaceRecalculation.resolve());
+ this.waitAsyncTemplate(() => this.workSpaceRecalculation.resolve());
}
}
- _cleanWorkspace() {
+ private cleanWorkspace() {
this._appointments.$element().detach();
this._workSpace._dispose();
this._workSpace.$element().remove();
@@ -1465,14 +1469,14 @@ class Scheduler extends SchedulerOptionsBaseWidget {
}
getHeader() {
- return this._header;
+ return this.header;
}
- _cleanPopup() {
- this._appointmentPopup?.dispose();
+ private cleanPopup() {
+ this.appointmentPopup?.dispose();
}
- _checkRecurringAppointment(
+ checkRecurringAppointment(
rawAppointment,
singleAppointment,
exceptionDate,
@@ -1484,7 +1488,7 @@ class Scheduler extends SchedulerOptionsBaseWidget {
) {
const recurrenceRule = this._dataAccessors.get('recurrenceRule', rawAppointment);
- if (!validateRRule(recurrenceRule) || !this._editing.allowUpdating) {
+ if (!validateRRule(recurrenceRule) || !this.editing.allowUpdating) {
callback();
return;
}
@@ -1495,18 +1499,18 @@ class Scheduler extends SchedulerOptionsBaseWidget {
callback();
break;
case 'occurrence':
- this._excludeAppointmentFromSeries(rawAppointment, singleAppointment, exceptionDate, isDeleted, isPopupEditing, dragEvent);
+ this.excludeAppointmentFromSeries(rawAppointment, singleAppointment, exceptionDate, isDeleted, isPopupEditing, dragEvent);
break;
default:
if (dragEvent) {
// @ts-expect-error
dragEvent.cancel = new Deferred();
}
- this._showRecurrenceChangeConfirm(isDeleted)
+ this.showRecurrenceChangeConfirm(isDeleted)
.done((editingMode) => {
editingMode === RECURRENCE_EDITING_MODE.SERIES && callback();
- editingMode === RECURRENCE_EDITING_MODE.OCCURRENCE && this._excludeAppointmentFromSeries(
+ editingMode === RECURRENCE_EDITING_MODE.OCCURRENCE && this.excludeAppointmentFromSeries(
rawAppointment,
singleAppointment,
exceptionDate,
@@ -1519,7 +1523,7 @@ class Scheduler extends SchedulerOptionsBaseWidget {
}
}
- _excludeAppointmentFromSeries(rawAppointment, newRawAppointment, exceptionDate, isDeleted, isPopupEditing, dragEvent) {
+ private excludeAppointmentFromSeries(rawAppointment, newRawAppointment, exceptionDate, isDeleted, isPopupEditing, dragEvent) {
const appointment = excludeFromRecurrence(
rawAppointment,
exceptionDate,
@@ -1541,7 +1545,7 @@ class Scheduler extends SchedulerOptionsBaseWidget {
}
if (isPopupEditing) {
- this._appointmentPopup.show(singleRawAppointment, {
+ this.appointmentPopup.show(singleRawAppointment, {
isToolbarVisible: true, // TODO: remove when legacyForm is deleted
action: ACTION_TO_APPOINTMENT.EXCLUDE_FROM_SERIES,
excludeInfo: {
@@ -1549,26 +1553,26 @@ class Scheduler extends SchedulerOptionsBaseWidget {
updatedAppointment: appointment.source,
},
});
- this._editAppointmentData = rawAppointment;
+ this.editAppointmentData = rawAppointment;
} else {
- this._updateAppointment(rawAppointment, appointment.source, () => {
+ this.updateAppointmentCore(rawAppointment, appointment.source, () => {
this._appointments.moveAppointmentBack(dragEvent);
}, dragEvent);
}
}
- _createRecurrenceException(appointment, exceptionDate) {
+ private createRecurrenceException(appointment, exceptionDate) {
const result: any[] = [];
if (appointment.recurrenceException) {
result.push(appointment.recurrenceException);
}
- result.push(this._getSerializedDate(exceptionDate, appointment.startDate, appointment.allDay));
+ result.push(this.getSerializedDate(exceptionDate, appointment.startDate, appointment.allDay));
return result.join();
}
- _getSerializedDate(date, startDate, isAllDay) {
+ private getSerializedDate(date, startDate, isAllDay) {
isAllDay && date.setHours(
startDate.getHours(),
startDate.getMinutes(),
@@ -1579,13 +1583,13 @@ class Scheduler extends SchedulerOptionsBaseWidget {
return dateSerialization.serializeDate(date, UTC_FULL_DATE_FORMAT);
}
- _showRecurrenceChangeConfirm(isDeleted) {
+ private showRecurrenceChangeConfirm(isDeleted) {
const title = messageLocalization.format(isDeleted ? 'dxScheduler-confirmRecurrenceDeleteTitle' : 'dxScheduler-confirmRecurrenceEditTitle');
const message = messageLocalization.format(isDeleted ? 'dxScheduler-confirmRecurrenceDeleteMessage' : 'dxScheduler-confirmRecurrenceEditMessage');
const seriesText = messageLocalization.format(isDeleted ? 'dxScheduler-confirmRecurrenceDeleteSeries' : 'dxScheduler-confirmRecurrenceEditSeries');
const occurrenceText = messageLocalization.format(isDeleted ? 'dxScheduler-confirmRecurrenceDeleteOccurrence' : 'dxScheduler-confirmRecurrenceEditOccurrence');
- this._recurrenceDialog = customDialog({
+ this.recurrenceDialog = customDialog({
title,
messageHtml: message,
showCloseButton: true,
@@ -1602,10 +1606,10 @@ class Scheduler extends SchedulerOptionsBaseWidget {
},
} as any);
- return this._recurrenceDialog.show();
+ return this.recurrenceDialog.show();
}
- _getUpdatedData(rawAppointment) {
+ getUpdatedData(rawAppointment) {
const viewOffset = this.getViewOffsetMs();
const getConvertedFromGrid = (date: any): Date | undefined => {
@@ -1702,14 +1706,14 @@ class Scheduler extends SchedulerOptionsBaseWidget {
}
subscribe(subject, action) {
- this._subscribes[subject] = subscribes[subject] = action;
+ this.subscribes[subject] = subscribes[subject] = action;
}
fire(
subject: Subject,
...args: Parameters
): ReturnType {
- const callback = this._subscribes[subject];
+ const callback = this.subscribes[subject];
if (!isFunction(callback)) {
throw errors.Error('E1031', subject);
@@ -1722,7 +1726,7 @@ class Scheduler extends SchedulerOptionsBaseWidget {
return this._workSpace.getDataByDroppableCell();
}
- _updateAppointment(target, rawAppointment, onUpdatePrevented?: any, dragEvent?: any) {
+ updateAppointmentCore(target, rawAppointment, onUpdatePrevented?: any, dragEvent?: any) {
const updatingOptions = {
newData: rawAppointment,
oldData: extend({}, target),
@@ -1739,7 +1743,7 @@ class Scheduler extends SchedulerOptionsBaseWidget {
}
}.bind(this);
- this._actions[StoreEventNames.UPDATING](updatingOptions);
+ this.actions[StoreEventNames.UPDATING](updatingOptions);
if (dragEvent && !isDeferred(dragEvent.cancel)) {
// @ts-expect-error
@@ -1747,15 +1751,15 @@ class Scheduler extends SchedulerOptionsBaseWidget {
}
if (isPromise(updatingOptions.cancel) && dragEvent) {
- this._updatingAppointments.add(target);
+ this.updatingAppointments.add(target);
}
- return this._processActionResult(updatingOptions, function (canceled) {
+ return this.processActionResult(updatingOptions, function (canceled) {
// @ts-expect-error
let deferred = new Deferred();
if (!canceled) {
- this._expandAllDayPanel(rawAppointment);
+ this.expandAllDayPanel(rawAppointment);
try {
deferred = this.appointmentDataSource
@@ -1764,18 +1768,18 @@ class Scheduler extends SchedulerOptionsBaseWidget {
dragEvent?.cancel.resolve(false);
})
.always((storeAppointment) => {
- this._updatingAppointments.delete(target);
- this._onDataPromiseCompleted(StoreEventNames.UPDATED, storeAppointment);
+ this.updatingAppointments.delete(target);
+ this.onDataPromiseCompleted(StoreEventNames.UPDATED, storeAppointment);
})
.fail(() => performFailAction());
} catch (err) {
performFailAction(err);
- this._updatingAppointments.delete(target);
+ this.updatingAppointments.delete(target);
deferred.resolve();
}
} else {
performFailAction();
- this._updatingAppointments.delete(target);
+ this.updatingAppointments.delete(target);
deferred.resolve();
}
@@ -1783,7 +1787,7 @@ class Scheduler extends SchedulerOptionsBaseWidget {
});
}
- _processActionResult(actionOptions, callback) {
+ private processActionResult(actionOptions, callback) {
// @ts-expect-error
const deferred = new Deferred();
const resolveCallback = (callbackResult) => {
@@ -1805,29 +1809,29 @@ class Scheduler extends SchedulerOptionsBaseWidget {
return deferred.promise();
}
- _expandAllDayPanel(appointment) {
- if (!this._isAllDayExpanded() && this.appointmentTakesAllDay(appointment)) {
- this._updateOption('workSpace', 'allDayExpanded', true);
+ private expandAllDayPanel(appointment) {
+ if (!this.isAllDayExpanded() && this.appointmentTakesAllDay(appointment)) {
+ this.updateOption('workSpace', 'allDayExpanded', true);
}
}
- _onDataPromiseCompleted(handlerName, storeAppointment, appointment?: any) {
+ private onDataPromiseCompleted(handlerName, storeAppointment, appointment?: any) {
const args: any = { appointmentData: appointment || storeAppointment };
if (storeAppointment instanceof Error) {
args.error = storeAppointment;
} else {
- this._appointmentPopup.visible && this._appointmentPopup.hide();
+ this.appointmentPopup.visible && this.appointmentPopup.hide();
}
- this._actions[handlerName](args);
+ this.actions[handlerName](args);
this._fireContentReadyAction();
}
/// #DEBUG
// TODO: remove when legacyForm is deleted
getAppointmentDetailsForm() { // for tests
- return this._appointmentForm.form;
+ return this.appointmentForm.form;
}
/// #ENDDEBUG
@@ -1840,7 +1844,7 @@ class Scheduler extends SchedulerOptionsBaseWidget {
}
getActions() {
- return this._actions;
+ return this.actions;
}
appointmentTakesAllDay(rawAppointment) {
@@ -1921,19 +1925,19 @@ class Scheduler extends SchedulerOptionsBaseWidget {
}
if (isCreateAppointment) {
- delete this._editAppointmentData; // TODO
- this._editing.allowAdding && this._appointmentPopup.show(rawAppointment, {
+ delete this.editAppointmentData; // TODO
+ this.editing.allowAdding && this.appointmentPopup.show(rawAppointment, {
isToolbarVisible: true, // TODO: remove when legacyForm is deleted
action: ACTION_TO_APPOINTMENT.CREATE,
});
} else {
const startDate = this._dataAccessors.get('startDate', newRawTargetedAppointment || rawAppointment);
- this._checkRecurringAppointment(rawAppointment, newTargetedAppointment, startDate, () => {
- this._editAppointmentData = rawAppointment; // TODO
+ this.checkRecurringAppointment(rawAppointment, newTargetedAppointment, startDate, () => {
+ this.editAppointmentData = rawAppointment; // TODO
- this._appointmentPopup.show(rawAppointment, {
- isToolbarVisible: this._editing.allowUpdating, // TODO: remove when legacyForm is deleted
+ this.appointmentPopup.show(rawAppointment, {
+ isToolbarVisible: this.editing.allowUpdating, // TODO: remove when legacyForm is deleted
action: ACTION_TO_APPOINTMENT.UPDATE,
});
}, false, true);
@@ -1954,9 +1958,9 @@ class Scheduler extends SchedulerOptionsBaseWidget {
}
hideAppointmentPopup(saveChanges?: any) {
- if (this._appointmentPopup?.visible) {
- saveChanges && this._appointmentPopup.saveChangesAsync();
- this._appointmentPopup.hide();
+ if (this.appointmentPopup?.visible) {
+ saveChanges && this.appointmentPopup.saveChangesAsync();
+ this.appointmentPopup.hide();
}
}
@@ -1996,12 +2000,12 @@ class Scheduler extends SchedulerOptionsBaseWidget {
this._createActionByOption('onAppointmentTooltipShowing')(arg);
- if (this._appointmentTooltip.isAlreadyShown(target)) {
+ if (this.appointmentTooltip.isAlreadyShown(target)) {
this.hideAppointmentTooltip();
} else {
- this._processActionResult(arg, (canceled) => {
- !canceled && this._appointmentTooltip.show(target, data, {
- ...this._getExtraAppointmentTooltipOptions(),
+ this.processActionResult(arg, (canceled) => {
+ !canceled && this.appointmentTooltip.show(target, data, {
+ ...this.getExtraAppointmentTooltipOptions(),
...options,
});
});
@@ -2009,7 +2013,7 @@ class Scheduler extends SchedulerOptionsBaseWidget {
}
hideAppointmentTooltip() {
- this._appointmentTooltip?.hide();
+ this.appointmentTooltip?.hide();
}
scrollTo(
@@ -2042,7 +2046,7 @@ class Scheduler extends SchedulerOptionsBaseWidget {
&& ('align' in options || 'allDay' in options || 'group' in options);
}
- _isHorizontalVirtualScrolling() {
+ private isHorizontalVirtualScrolling() {
const scrolling = this.option('scrolling');
const { orientation, mode } = scrolling;
const isVirtualScrolling = mode === 'virtual';
@@ -2066,24 +2070,24 @@ class Scheduler extends SchedulerOptionsBaseWidget {
cancel: false,
};
- this._actions[StoreEventNames.ADDING](addingOptions);
+ this.actions[StoreEventNames.ADDING](addingOptions);
- return this._processActionResult(addingOptions, (canceled) => {
+ return this.processActionResult(addingOptions, (canceled) => {
if (canceled) {
// @ts-expect-error
return new Deferred().resolve();
}
- this._expandAllDayPanel(serializedAppointment);
+ this.expandAllDayPanel(serializedAppointment);
return this.appointmentDataSource
.add(serializedAppointment)
- .always((storeAppointment) => this._onDataPromiseCompleted(StoreEventNames.ADDED, storeAppointment));
+ .always((storeAppointment) => this.onDataPromiseCompleted(StoreEventNames.ADDED, storeAppointment));
});
}
updateAppointment(target, appointment) {
- return this._updateAppointment(target, appointment);
+ return this.updateAppointmentCore(target, appointment);
}
deleteAppointment(rawAppointment) {
@@ -2098,17 +2102,17 @@ class Scheduler extends SchedulerOptionsBaseWidget {
cancel: false,
};
- this._actions[StoreEventNames.DELETING](deletingOptions);
+ this.actions[StoreEventNames.DELETING](deletingOptions);
return deletingOptions;
}
processDeleteAppointment(rawAppointment, deletingOptions) {
- this._processActionResult(deletingOptions, function (canceled) {
+ this.processActionResult(deletingOptions, function (canceled) {
if (!canceled) {
this.appointmentDataSource
.remove(rawAppointment)
- .always((storeAppointment) => this._onDataPromiseCompleted(
+ .always((storeAppointment) => this.onDataPromiseCompleted(
StoreEventNames.DELETED,
storeAppointment,
rawAppointment,
@@ -2125,7 +2129,7 @@ class Scheduler extends SchedulerOptionsBaseWidget {
if (typeof date === 'string') {
date = new Date(date);
}
- this._checkRecurringAppointment(
+ this.checkRecurringAppointment(
appointment,
{ },
date,
@@ -2143,7 +2147,7 @@ class Scheduler extends SchedulerOptionsBaseWidget {
}
focus() {
- if (this._editAppointmentData) {
+ if (this.editAppointmentData) {
this._appointments.focus();
} else {
this._workSpace.focus();
@@ -2160,7 +2164,7 @@ class Scheduler extends SchedulerOptionsBaseWidget {
: dateLocalization.firstDayOfWeekIndex() as FirstDayOfWeek;
}
- _validateKeyFieldIfAgendaExist() {
+ private validateKeyFieldIfAgendaExist() {
if (!this.appointmentDataSource.isDataSourceInit) {
return;
}
@@ -2178,7 +2182,7 @@ class Scheduler extends SchedulerOptionsBaseWidget {
}
_isAppointmentBeingUpdated(appointmentData: Appointment): boolean {
- return this._updatingAppointments.has(appointmentData);
+ return this.updatingAppointments.has(appointmentData);
}
getViewOffsetMs(): number {
diff --git a/packages/devextreme/js/__internal/scheduler/m_subscribes.ts b/packages/devextreme/js/__internal/scheduler/m_subscribes.ts
index 15ac39411235..0fdec9de1413 100644
--- a/packages/devextreme/js/__internal/scheduler/m_subscribes.ts
+++ b/packages/devextreme/js/__internal/scheduler/m_subscribes.ts
@@ -68,15 +68,15 @@ const subscribes = {
const { info } = utils.dataAccessors.getAppointmentSettings(options.$appointment) as AppointmentItemViewModel;
const { startDate } = info.sourceAppointment;
- this._checkRecurringAppointment(options.target, options.data, startDate, () => {
- this._updateAppointment(options.target, options.data, function () {
+ this.checkRecurringAppointment(options.target, options.data, startDate, () => {
+ this.updateAppointmentCore(options.target, options.data, function () {
this._appointments.moveAppointmentBack();
});
});
},
getUpdatedData(rawAppointment) {
- return this._getUpdatedData(rawAppointment);
+ return this.getUpdatedData(rawAppointment);
},
updateAppointmentAfterDrag({
@@ -85,7 +85,7 @@ const subscribes = {
const { info } = utils.dataAccessors.getAppointmentSettings(element) as AppointmentItemViewModel;
// NOTE: enrich target appointment with additional data from the source
// in case of one appointment of series will change
- const targetedRawAppointment = extend({}, rawAppointment, this._getUpdatedData(rawAppointment));
+ const targetedRawAppointment = extend({}, rawAppointment, this.getUpdatedData(rawAppointment));
const fromAllDay = Boolean(rawAppointment.allDay);
const toAllDay = Boolean(targetedRawAppointment.allDay);
@@ -102,8 +102,8 @@ const subscribes = {
}
if (isDropToSelfScheduler && (!isDropToTheSameCell || isDragAndDropBetweenComponents || isDropBetweenAllDay)) {
- this._checkRecurringAppointment(rawAppointment, targetedRawAppointment, info.sourceAppointment.startDate, () => {
- this._updateAppointment(rawAppointment, targetedRawAppointment, onCancel, event);
+ this.checkRecurringAppointment(rawAppointment, targetedRawAppointment, info.sourceAppointment.startDate, () => {
+ this.updateAppointmentCore(rawAppointment, targetedRawAppointment, onCancel, event);
}, undefined, undefined, event);
} else {
onCancel();
diff --git a/packages/devextreme/testing/helpers/scheduler/helpers.js b/packages/devextreme/testing/helpers/scheduler/helpers.js
index dcc339fe971c..ff0457009b81 100644
--- a/packages/devextreme/testing/helpers/scheduler/helpers.js
+++ b/packages/devextreme/testing/helpers/scheduler/helpers.js
@@ -591,11 +591,11 @@ export class SchedulerTestWrapper extends ElementWrapper {
getCancelButton: () => this.appointmentPopup.getPopup().find('.dx-popup-cancel'),
clickCancelButton: () => this.appointmentPopup.getCancelButton().trigger('dxclick'),
- saveAppointmentData: () => this.instance._appointmentPopup.saveEditDataAsync.call(this.instance._appointmentPopup),
+ saveAppointmentData: () => this.instance.appointmentPopup.saveEditDataAsync.call(this.instance.appointmentPopup),
hasLoadPanel: () => this.appointmentPopup.getPopup().find('.dx-loadpanel').length !== 0,
- getInstance: () => this.instance._appointmentPopup
+ getInstance: () => this.instance.appointmentPopup
};
this.appointmentForm = {
diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/appointment.editing.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/appointment.editing.tests.js
index 4a5584965933..4ec7e23ebe92 100644
--- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/appointment.editing.tests.js
+++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/appointment.editing.tests.js
@@ -136,11 +136,11 @@ module('Integration: Appointment editing', {
currentView: 'timelineMonth'
});
- const updateAppointment = scheduler.instance._updateAppointment;
+ const updateAppointment = scheduler.instance.updateAppointmentCore;
const spy = sinon.spy(noop);
const oldItem = data[0];
- scheduler.instance._updateAppointment = spy;
+ scheduler.instance.updateAppointmentCore = spy;
const cellWidth = getOuterWidth(scheduler.instance.$element().find('.' + DATE_TABLE_CELL_CLASS).eq(0));
@@ -152,7 +152,7 @@ module('Integration: Appointment editing', {
assert.deepEqual(spy.getCall(0).args[0], oldItem, 'Target item is correct');
assert.deepEqual(spy.getCall(0).args[1], $.extend(true, oldItem, { endDate: new Date(2015, 1, 3, 2, 0) }), 'New data is correct');
} finally {
- scheduler.instance._updateAppointment = updateAppointment;
+ scheduler.instance.updateAppointmentCore = updateAppointment;
}
});
@@ -163,11 +163,11 @@ module('Integration: Appointment editing', {
const scheduler = await this.createInstance({ currentDate: new Date(2015, 1, 9), dataSource: data, editing: true });
- const updateAppointment = scheduler.instance._updateAppointment;
+ const updateAppointment = scheduler.instance.updateAppointmentCore;
const spy = sinon.spy(noop);
const oldItem = this.tasks[0];
- scheduler.instance._updateAppointment = spy;
+ scheduler.instance.updateAppointmentCore = spy;
const cellHeight = getOuterHeight(scheduler.instance.$element().find('.' + DATE_TABLE_CELL_CLASS).eq(0));
const hourHeight = cellHeight * 2;
@@ -180,7 +180,7 @@ module('Integration: Appointment editing', {
assert.deepEqual(spy.getCall(0).args[0], oldItem, 'Target item is correct');
assert.deepEqual(spy.getCall(0).args[1], $.extend(true, oldItem, { endDate: new Date(2015, 1, 9, 3, 0) }), 'New data is correct');
} finally {
- scheduler.instance._updateAppointment = updateAppointment;
+ scheduler.instance.updateAppointmentCore = updateAppointment;
}
});
@@ -268,7 +268,7 @@ module('Integration: Appointment editing', {
$('.dx-scheduler-appointment-popup .dx-popup-done').trigger('dxclick');
- const popup = scheduler.instance._appointmentPopup.popup;
+ const popup = scheduler.instance.appointmentPopup.popup;
});
test('Add new appointment with delay and an error(T381444)', async function(assert) {
@@ -303,7 +303,7 @@ module('Integration: Appointment editing', {
$('.dx-scheduler-appointment-popup .dx-popup-done').trigger('dxclick');
- const popup = scheduler.instance._appointmentPopup.popup;
+ const popup = scheduler.instance.appointmentPopup.popup;
});
// TODO: update editors in popup
diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/appointment.monthView.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/appointment.monthView.tests.js
index d22ff6a91496..77b4b65e3c2c 100644
--- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/appointment.monthView.tests.js
+++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/appointment.monthView.tests.js
@@ -417,7 +417,7 @@ module('Integration: Appointments in Month view', {
$('.dx-dialog-buttons .dx-button').eq(0).trigger('dxclick');
- const popup = scheduler.instance._appointmentPopup.popup;
+ const popup = scheduler.instance.appointmentPopup.popup;
const $buttonGroup = $(popup.$content()).find('.dx-buttongroup');
assert.deepEqual($buttonGroup.eq(0).dxButtonGroup('instance').option('selectedItemKeys'), ['MO', 'TH'], 'Right button group select item keys');
@@ -459,7 +459,7 @@ module('Integration: Appointments in Month view', {
$('.dx-dialog-buttons .dx-button').eq(0).trigger('dxclick');
- const popup = scheduler.instance._appointmentPopup.popup;
+ const popup = scheduler.instance.appointmentPopup.popup;
const $buttonGroup = $(popup.$content()).find('.dx-buttongroup');
$buttonGroup.eq(0).dxButtonGroup('instance').option('selectedItemKeys'), ['MO', 'TH'], 'Right button group select item keys';
diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/appointment.tooltip.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/appointment.tooltip.tests.js
index 02df11bd48ad..73a4e410542b 100644
--- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/appointment.tooltip.tests.js
+++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/appointment.tooltip.tests.js
@@ -55,7 +55,7 @@ module('Integration: Appointment tooltip', {
height: 600
});
- const getAppointmentDisabled = sinon.spy(scheduler.instance._appointmentTooltip._options, 'getAppointmentDisabled');
+ const getAppointmentDisabled = sinon.spy(scheduler.instance.appointmentTooltip._options, 'getAppointmentDisabled');
const clock = sinon.useFakeTimers();
await scheduler.appointments.click(0, clock);
diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/appointment.week.based.views.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/appointment.week.based.views.tests.js
index 612e8d781616..0ac27d900990 100644
--- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/appointment.week.based.views.tests.js
+++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/appointment.week.based.views.tests.js
@@ -230,7 +230,7 @@ module('Integration: Appointment Day, Week views', {
height: 1500
});
- const spy = sinon.spy(scheduler.instance._appointmentPopup, 'show');
+ const spy = sinon.spy(scheduler.instance.appointmentPopup, 'show');
const clock = sinon.useFakeTimers();
await scheduler.appointments.click(0, clock);
@@ -244,7 +244,7 @@ module('Integration: Appointment Day, Week views', {
hide();
} finally {
- scheduler.instance._appointmentPopup.show.restore();
+ scheduler.instance.appointmentPopup.show.restore();
}
});
diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/common.events.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/common.events.tests.js
index ba19a16c577e..e58b4a65dd5a 100644
--- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/common.events.tests.js
+++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/common.events.tests.js
@@ -688,16 +688,16 @@ QUnit.module('Events', {
assert.equal(contentReadyFiresCount, 1, 'contentReadyFiresCount === 1');
- scheduler.instance._workSpaceRecalculation = new Deferred();
+ scheduler.instance.workSpaceRecalculation = new Deferred();
scheduler.instance._fireContentReadyAction();
assert.equal(contentReadyFiresCount, 1, 'contentReadyFiresCount === 1');
- scheduler.instance._workSpaceRecalculation.resolve();
+ scheduler.instance.workSpaceRecalculation.resolve();
assert.equal(contentReadyFiresCount, 2, 'contentReadyFiresCount === 2');
- scheduler.instance._workSpaceRecalculation = null;
+ scheduler.instance.workSpaceRecalculation = null;
scheduler.instance._fireContentReadyAction();
assert.equal(contentReadyFiresCount, 3, 'contentReadyFiresCount === 3');
diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/common.methods.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/common.methods.tests.js
index 6a45e70982a1..04beb0447b0a 100644
--- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/common.methods.tests.js
+++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/common.methods.tests.js
@@ -498,7 +498,7 @@ QUnit.module('Methods', {
const appointments = scheduler.instance.getAppointmentsInstance();
const focusSpy = sinon.spy(appointments, 'focus');
- scheduler.instance._editAppointmentData = tasks[0];
+ scheduler.instance.editAppointmentData = tasks[0];
scheduler.instance.focus();
assert.ok(focusSpy.calledOnce, 'focus is called');
@@ -636,49 +636,49 @@ QUnit.module('Methods', {
QUnit.test('showAppointmentTooltipCore, should call show tooltip', async function(assert) {
const scheduler = await createInstance({});
- scheduler.instance._appointmentTooltip.isAlreadyShown = sinon.stub().returns(false);
- scheduler.instance._appointmentTooltip.show = sinon.stub();
- scheduler.instance._appointmentTooltip.hide = sinon.stub();
+ scheduler.instance.appointmentTooltip.isAlreadyShown = sinon.stub().returns(false);
+ scheduler.instance.appointmentTooltip.show = sinon.stub();
+ scheduler.instance.appointmentTooltip.hide = sinon.stub();
scheduler.instance.showAppointmentTooltipCore('target', [], 'options');
- assert.ok(!scheduler.instance._appointmentTooltip.hide.called, 'hide tooltip is not called');
- assert.ok(scheduler.instance._appointmentTooltip.show.called, 'show tooltip is called');
+ assert.ok(!scheduler.instance.appointmentTooltip.hide.called, 'hide tooltip is not called');
+ assert.ok(scheduler.instance.appointmentTooltip.show.called, 'show tooltip is called');
});
QUnit.test('showAppointmentTooltipCore, should call hide tooltip', async function(assert) {
const scheduler = await createInstance({});
- scheduler.instance._appointmentTooltip.isAlreadyShown = sinon.stub().returns(true);
- scheduler.instance._appointmentTooltip.show = sinon.stub();
- scheduler.instance._appointmentTooltip.hide = sinon.stub();
+ scheduler.instance.appointmentTooltip.isAlreadyShown = sinon.stub().returns(true);
+ scheduler.instance.appointmentTooltip.show = sinon.stub();
+ scheduler.instance.appointmentTooltip.hide = sinon.stub();
scheduler.instance.showAppointmentTooltipCore('target', [], 'options');
- assert.ok(scheduler.instance._appointmentTooltip.hide.called, 'hide tooltip is called');
- assert.ok(!scheduler.instance._appointmentTooltip.show.called, 'show tooltip is not called');
+ assert.ok(scheduler.instance.appointmentTooltip.hide.called, 'hide tooltip is called');
+ assert.ok(!scheduler.instance.appointmentTooltip.show.called, 'show tooltip is not called');
});
QUnit.test('showAppointmentTooltip, should call show tooltip', async function(assert) {
const scheduler = await createInstance({});
- scheduler.instance._appointmentTooltip.isAlreadyShown = sinon.stub().returns(false);
- scheduler.instance._appointmentTooltip.show = sinon.stub();
- scheduler.instance._appointmentTooltip.hide = sinon.stub();
+ scheduler.instance.appointmentTooltip.isAlreadyShown = sinon.stub().returns(false);
+ scheduler.instance.appointmentTooltip.show = sinon.stub();
+ scheduler.instance.appointmentTooltip.hide = sinon.stub();
scheduler.instance.showAppointmentTooltip('appointmentData', 'target', 'currentAppointmentData');
- assert.ok(!scheduler.instance._appointmentTooltip.hide.called, 'hide tooltip is not called');
- assert.ok(scheduler.instance._appointmentTooltip.show.called, 'show tooltip is called');
+ assert.ok(!scheduler.instance.appointmentTooltip.hide.called, 'hide tooltip is not called');
+ assert.ok(scheduler.instance.appointmentTooltip.show.called, 'show tooltip is called');
});
QUnit.test('showAppointmentTooltip, should call hide tooltip', async function(assert) {
const scheduler = await createInstance({});
- scheduler.instance._appointmentTooltip.isAlreadyShown = sinon.stub().returns(true);
- scheduler.instance._appointmentTooltip.show = sinon.stub();
- scheduler.instance._appointmentTooltip.hide = sinon.stub();
+ scheduler.instance.appointmentTooltip.isAlreadyShown = sinon.stub().returns(true);
+ scheduler.instance.appointmentTooltip.show = sinon.stub();
+ scheduler.instance.appointmentTooltip.hide = sinon.stub();
scheduler.instance.showAppointmentTooltip('appointmentData', 'target', 'currentAppointmentData');
- assert.ok(scheduler.instance._appointmentTooltip.hide.called, 'hide tooltip is called');
- assert.ok(!scheduler.instance._appointmentTooltip.show.called, 'show tooltip is not called');
+ assert.ok(scheduler.instance.appointmentTooltip.hide.called, 'hide tooltip is called');
+ assert.ok(!scheduler.instance.appointmentTooltip.show.called, 'show tooltip is not called');
});
- QUnit.test('_getUpdatedData for the empty data item (T906240)', async function(assert) {
+ QUnit.test('getUpdatedData for the empty data item (T906240)', async function(assert) {
const startCellDate = new Date(2020, 1, 2, 3);
const endCellDate = new Date(2020, 1, 2, 4);
const scheduler = await createWrapper({});
@@ -690,7 +690,7 @@ QUnit.module('Methods', {
};
};
- const updatedData = scheduler.instance._getUpdatedData({ text: 'test' });
+ const updatedData = scheduler.instance.getUpdatedData({ text: 'test' });
assert.deepEqual(updatedData, {
endDate: endCellDate,
startDate: startCellDate
diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/common.options.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/common.options.tests.js
index f171b79b929c..0a4b333e8219 100644
--- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/common.options.tests.js
+++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/common.options.tests.js
@@ -638,7 +638,7 @@ QUnit.module('Options', () => {
const spyAppointmentPopupForm = sinon.spy(
scheduler.instance,
- '_createAppointmentPopupForm'
+ 'createAppointmentPopupForm'
);
scheduler.instance.option('resources', resources);
@@ -936,7 +936,7 @@ QUnit.module('Options', () => {
});
const initMarkupSpy = sinon.spy(scheduler.instance, '_initMarkup');
- const reloadDataSourceSpy = sinon.spy(scheduler.instance, '_reloadDataSource');
+ const reloadDataSourceSpy = sinon.spy(scheduler.instance, 'reloadDataSource');
let count = 0;
const nextDataSource = new DataSource({
@@ -962,7 +962,7 @@ QUnit.module('Options', () => {
await waitForAsync(() => count === 2);
assert.equal(initMarkupSpy.callCount, 2, 'Init markup was called on each dataSource changes');
- assert.equal(reloadDataSourceSpy.callCount, 2, '_reloadDataSource was called on each changes');
+ assert.equal(reloadDataSourceSpy.callCount, 2, 'reloadDataSource was called on each changes');
});
QUnit.test('It should be possible to change views option when view names are specified (T995794)', async function(assert) {
diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/common.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/common.tests.js
index a87f60887bc9..74ce69e5be46 100644
--- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/common.tests.js
+++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/common.tests.js
@@ -444,7 +444,7 @@ QUnit.module('View with configuration', () => {
});
assert.equal(scheduler.instance._workSpace.option('firstDayOfWeek'), 0, 'value of the firstDayOfWeek in workSpace');
- assert.equal(scheduler.instance._header.option('firstDayOfWeek'), 0, 'value of the firstDayOfWeek in header');
+ assert.equal(scheduler.instance.header.option('firstDayOfWeek'), 0, 'value of the firstDayOfWeek in header');
});
QUnit.test('Scheduler should have specific groups setting of the view', async function(assert) {
diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/dataSource.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/dataSource.tests.js
index e3b915e82de0..a3855bc24824 100644
--- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/dataSource.tests.js
+++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/dataSource.tests.js
@@ -263,7 +263,7 @@ module('Events', {
scheduler.instance.showAppointmentPopup(appointments[0]);
$('.dx-scheduler-appointment-popup .dx-popup-done').trigger('dxclick');
- const appointmentForm = scheduler.instance._appointmentPopup.form;
+ const appointmentForm = scheduler.instance.appointmentPopup.form;
assert.deepEqual(appointmentForm.formData.startDate, new Date(2015, 1, 9, 13), 'Form data is correct');
} finally {
diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/integration.appointmentCollector.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/integration.appointmentCollector.tests.js
index 74e4271df707..3c580c6865dd 100644
--- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/integration.appointmentCollector.tests.js
+++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/integration.appointmentCollector.tests.js
@@ -87,7 +87,7 @@ module('Integration: Appointments Collector Base Tests', baseConfig, () => {
}
return this.callBase(options);
},
- _getAppointmentTemplate(template) {
+ getAppointmentTemplate(template) {
return this._getTemplateByOption(template);
},
_dataAccessors: mockDataAccessor,
diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/integration.appointmentTooltip.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/integration.appointmentTooltip.tests.js
index 35ed4bfb9e83..77d1006c646a 100644
--- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/integration.appointmentTooltip.tests.js
+++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/integration.appointmentTooltip.tests.js
@@ -309,7 +309,7 @@ module('Integration: Appointment tooltip', moduleConfig, () => {
assert.equal(Tooltip.getInstance($('.dx-tooltip')).option('rtlEnabled'), true, 'rtlEnabled for tooltip was set to true');
});
- test('Click on tooltip-edit button should call scheduler._appointmentPopup and hide tooltip', async function(assert) {
+ test('Click on tooltip-edit button should call scheduler.appointmentPopup and hide tooltip', async function(assert) {
const data = new DataSource({
store: getSampleData()
});
@@ -319,7 +319,7 @@ module('Integration: Appointment tooltip', moduleConfig, () => {
dataSource: data
});
- const stub = sinon.stub(scheduler.instance._appointmentPopup, 'show');
+ const stub = sinon.stub(scheduler.instance.appointmentPopup, 'show');
const clock = sinon.useFakeTimers();
await scheduler.appointments.click(1, clock);
@@ -585,7 +585,7 @@ module('Integration: Appointment tooltip', moduleConfig, () => {
}
]
});
- const stub = sinon.stub(scheduler.instance, '_updateAppointment');
+ const stub = sinon.stub(scheduler.instance, 'updateAppointmentCore');
const clock = sinon.useFakeTimers();
await scheduler.appointments.click(1, clock);
diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/integration.dateNavigator.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/integration.dateNavigator.tests.js
index 73a9cbaedefb..fd6f1555e080 100644
--- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/integration.dateNavigator.tests.js
+++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/integration.dateNavigator.tests.js
@@ -381,13 +381,13 @@ QUnit.module('Integration: Date navigator', moduleConfig, function() {
QUnit.test('Tasks should be rerendered after click on next/prev button', async function(assert) {
await this.createInstance({ currentDate: new Date(2015, 1, 24) });
- const spy = sinon.spy(this.instance, '_setRemoteFilterIfNeeded');
+ const spy = sinon.spy(this.instance, 'setRemoteFilterIfNeeded');
try {
$(this.instance.$element()).find('.dx-scheduler-navigator-previous').trigger('dxclick');
- assert.ok(spy.calledOnce, '_setRemoteFilterIfNeeded is called');
+ assert.ok(spy.calledOnce, 'setRemoteFilterIfNeeded is called');
} finally {
- this.instance._setRemoteFilterIfNeeded.restore();
+ this.instance.setRemoteFilterIfNeeded.restore();
}
});
diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/integration.multiWeekAppointments.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/integration.multiWeekAppointments.tests.js
index 42f4f451ff6f..4312e22de452 100644
--- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/integration.multiWeekAppointments.tests.js
+++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/integration.multiWeekAppointments.tests.js
@@ -15,12 +15,12 @@ const { testStart } = QUnit;
testStart(() => initTestMarkup());
const mockWorkSpaceRendering = function(schedulerInst, cellSize, bounds) {
- const base = schedulerInst._renderWorkSpace;
+ const base = schedulerInst.renderWorkSpace;
const getMaxAllowedPosition = (groupIndex) => {
return bounds[groupIndex];
};
- sinon.stub(schedulerInst, '_renderWorkSpace').callsFake(function(groups) {
+ sinon.stub(schedulerInst, 'renderWorkSpace').callsFake(function(groups) {
base.call(this, groups);
sinon.stub(this._workSpace, 'getCellWidth').returns(cellSize);
diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/integration.workSpace.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/integration.workSpace.tests.js
index 249a533a91b2..5b5458e29a39 100644
--- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/integration.workSpace.tests.js
+++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/integration.workSpace.tests.js
@@ -880,7 +880,7 @@ module('Integration: Work space', { ...moduleConfig }, () => {
]
});
- const refreshStub = sinon.stub(scheduler.instance, '_refreshWorkSpace');
+ const refreshStub = sinon.stub(scheduler.instance, 'refreshWorkSpace');
try {
scheduler.instance.option('groups', ['resource2']);
diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/keyboardNavigation.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/keyboardNavigation.tests.js
index d81037f48448..9dcf6abff81f 100644
--- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/keyboardNavigation.tests.js
+++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/keyboardNavigation.tests.js
@@ -88,13 +88,13 @@ QUnit.module('Keyboard Navigation', {
});
scheduler.appointments.compact.click();
- assert.notOk(scheduler.instance._appointmentTooltip._list.option('focusStateEnabled'), 'focusStateEnabled was passed correctly');
+ assert.notOk(scheduler.instance.appointmentTooltip._list.option('focusStateEnabled'), 'focusStateEnabled was passed correctly');
- scheduler.instance._appointmentTooltip.hide();
+ scheduler.instance.appointmentTooltip.hide();
scheduler.instance.option('focusStateEnabled', true);
scheduler.appointments.compact.click();
- assert.ok(scheduler.instance._appointmentTooltip._list.option('focusStateEnabled'), 'focusStateEnabled was passed correctly');
+ assert.ok(scheduler.instance.appointmentTooltip._list.option('focusStateEnabled'), 'focusStateEnabled was passed correctly');
});
QUnit.test('Workspace navigation by arrows should work correctly with opened dropDown appointments', async function(assert) {
diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/legacyAppointmentPopup.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/legacyAppointmentPopup.tests.js
index c460b9173f1b..83dc3d7fc41d 100644
--- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/legacyAppointmentPopup.tests.js
+++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/legacyAppointmentPopup.tests.js
@@ -34,7 +34,7 @@ const checkFormWithRecurrenceEditor = (assert, instance, visibility) => {
assert.equal(form.itemOption(APPOINTMENT_FORM_GROUP_NAMES.Main).colSpan, colSpan, 'colSpan of main group is correct');
assert.equal(form.itemOption(APPOINTMENT_FORM_GROUP_NAMES.Recurrence).colSpan, colSpan, 'colSpan of recurrence group is correct');
- assert.equal(instance._appointmentPopup.popup.option('maxWidth'), width, 'maxWidth of popup is correct');
+ assert.equal(instance.appointmentPopup.popup.option('maxWidth'), width, 'maxWidth of popup is correct');
};
const createInstance = (options) => {
@@ -168,12 +168,12 @@ QUnit.module('Appointment popup form', moduleConfig, () => {
scheduler.appointments.dblclick(0);
scheduler.appointmentPopup.dialog.clickEditSeries();
- const form = scheduler.instance._appointmentPopup.form.form;
+ const form = scheduler.instance.appointmentPopup.form.form;
assert.ok(form.getEditor('repeat').option('value'), 'repeat checkbox should be checked');
assert.ok(form.option('items')[1].visible, 'recurrence form should be visible');
- scheduler.instance._appointmentPopup.popup.hide();
+ scheduler.instance.appointmentPopup.popup.hide();
scheduler.instance.showAppointmentPopup();
assert.notOk(form.getEditor('repeat').option('value'), 'repeat checkbox should be unchecked if empty form');
@@ -336,11 +336,11 @@ QUnit.module('Appointment popup form', moduleConfig, () => {
scheduler.appointments.dblclick();
assert.equal(scheduler.appointmentPopup.isVisible(), expected, text + ' if call from UI');
- scheduler.instance._appointmentPopup.popup.option('visible', false);
+ scheduler.instance.appointmentPopup.popup.option('visible', false);
scheduler.instance.showAppointmentPopup(data[0]);
assert.equal(scheduler.appointmentPopup.isVisible(), expected, text + ' if call showAppointmentPopup method');
- scheduler.instance._appointmentPopup.popup.option('visible', false);
+ scheduler.instance.appointmentPopup.popup.option('visible', false);
});
});
@@ -682,11 +682,11 @@ if(isDesktopEnvironment()) {
const scheduler = await createScheduler();
scheduler.instance.showAppointmentPopup({ startDate: new Date(2018, 5, 18), endDate: Date(2018, 5, 18), text: 'a' });
checkFormWithRecurrenceEditor(assert, scheduler.instance, false);
- scheduler.instance._appointmentPopup.popup.hide();
+ scheduler.instance.appointmentPopup.popup.hide();
scheduler.instance.showAppointmentPopup({ startDate: new Date(2018, 5, 18), endDate: Date(2018, 5, 18), text: 'b', recurrenceRule: 'FREQ=WEEKLY' });
$('.dx-dialog-buttons .dx-button').eq(0).trigger('dxclick');
checkFormWithRecurrenceEditor(assert, scheduler.instance, true);
- scheduler.instance._appointmentPopup.popup.hide();
+ scheduler.instance.appointmentPopup.popup.hide();
scheduler.instance.showAppointmentPopup({ startDate: new Date(2018, 5, 18), endDate: Date(2018, 5, 18), text: 'c' });
checkFormWithRecurrenceEditor(assert, scheduler.instance, false);
@@ -698,7 +698,7 @@ if(isDesktopEnvironment()) {
const form = scheduler.instance.getAppointmentDetailsForm();
form.getEditor('visibilityChanged').option('value', true);
- scheduler.instance._appointmentPopup.popup.hide();
+ scheduler.instance.appointmentPopup.popup.hide();
scheduler.instance.showAppointmentPopup({ startDate: new Date(2018, 5, 18), endDate: Date(2018, 5, 18), text: 'b', recurrenceRule: 'FREQ=WEEKLY' });
$('.dx-dialog-buttons .dx-button').eq(0).trigger('dxclick');
@@ -720,7 +720,7 @@ if(isDesktopEnvironment()) {
const form = scheduler.instance.getAppointmentDetailsForm();
assert.ok(!form.getEditor(null), 'Editor is not rendered');
- assert.equal(scheduler.instance._appointmentPopup.popup.option('maxWidth'), APPOINTMENT_POPUP_WIDTH);
+ assert.equal(scheduler.instance.appointmentPopup.popup.option('maxWidth'), APPOINTMENT_POPUP_WIDTH);
assert.equal(form.option('items')[0].colSpan, 2, 'colSpan of main group');
scheduler.instance.option('recurrenceRuleExpr', 'recurrenceRule');
@@ -745,7 +745,7 @@ if(isDesktopEnvironment()) {
const form = scheduler.instance.getAppointmentDetailsForm();
assert.ok(!form.getEditor(null), 'Editor is not rendered');
- assert.equal(scheduler.instance._appointmentPopup.popup.option('maxWidth'), APPOINTMENT_POPUP_WIDTH);
+ assert.equal(scheduler.instance.appointmentPopup.popup.option('maxWidth'), APPOINTMENT_POPUP_WIDTH);
assert.equal(form.option('items')[0].colSpan, 2, 'colSpan of main group');
});
@@ -777,7 +777,7 @@ QUnit.module('Appointment Popup Content', moduleOptions, () => {
scheduler.instance.showAppointmentPopup({ startDate: new Date(2015, 1, 1), endDate: new Date(2015, 1, 2) });
- const appointmentPopupOptions = scheduler.instance._appointmentPopup.popup.option();
+ const appointmentPopupOptions = scheduler.instance.appointmentPopup.popup.option();
assert.strictEqual(appointmentPopupOptions.enableBodyScroll, false, 'enable body scroll');
assert.strictEqual(appointmentPopupOptions.preventScrollEvents, false, 'prevent scroll events');
@@ -893,7 +893,7 @@ QUnit.module('Appointment Popup Content', moduleOptions, () => {
scheduler.instance.showAppointmentPopup({ startDate: new Date(2015, 1, 1), endDate: new Date(2015, 1, 2), text: 'appointment 1' });
- const popup = scheduler.instance._appointmentPopup.popup;
+ const popup = scheduler.instance.appointmentPopup.popup;
assert.equal(popup.option('height'), 'auto', 'popup has correct height');
assert.equal(popup.option('maxHeight'), '100%', 'popup has correct max-height');
@@ -904,7 +904,7 @@ QUnit.module('Appointment Popup Content', moduleOptions, () => {
scheduler.instance.showAppointmentPopup({ startDate: new Date(2015, 1, 1), endDate: new Date(2015, 1, 2), text: 'appointment 1' });
- const popup = scheduler.instance._appointmentPopup.popup;
+ const popup = scheduler.instance.appointmentPopup.popup;
let contentReadyCalled = 0;
popup.option('onContentReady', function() {
@@ -1400,7 +1400,7 @@ QUnit.module('Appointment Popup Content', moduleOptions, () => {
QUnit.test('Done button default configuration should be correct', async function(assert) {
const scheduler = await createInstance({
onAppointmentFormOpening: function(e) {
- const popup = e.component._appointmentPopup.popup;
+ const popup = e.component.appointmentPopup.popup;
const buttons = popup.option('toolbarItems');
const doneButton = buttons[0];
@@ -1422,7 +1422,7 @@ QUnit.module('Appointment Popup Content', moduleOptions, () => {
store: this.tasks
}),
onAppointmentFormOpening: function(e) {
- const popup = e.component._appointmentPopup.popup;
+ const popup = e.component.appointmentPopup.popup;
const buttons = popup.option('toolbarItems');
buttons[0].options = { text: 'Text 1' };
popup.option('toolbarItems', buttons);
@@ -1563,7 +1563,7 @@ QUnit.module('Appointment Popup', moduleOptions, () => {
recurrenceRule: 'FREQ=WEEKLY;BYDAY=MO,TH;COUNT=10'
});
- const popup = scheduler.instance._appointmentPopup.popup;
+ const popup = scheduler.instance.appointmentPopup.popup;
const $buttonGroup = $(popup.$content()).find('.dx-buttongroup');
assert.deepEqual($buttonGroup.eq(0).dxButtonGroup('instance').option('selectedItemKeys'), ['MO', 'TH'], 'Right buttons was checked');