devextreme
Version:
HTML5 JavaScript Component Suite for Responsive Web Development
87 lines (82 loc) • 3.41 kB
JavaScript
/**
* DevExtreme (cjs/ui/scheduler/workspaces/ui.scheduler.work_space_week.js)
* Version: 21.1.4
* Build date: Mon Jun 21 2021
*
* Copyright (c) 2012 - 2021 Developer Express Inc. ALL RIGHTS RESERVED
* Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
*/
;
exports.default = void 0;
var _component_registrator = _interopRequireDefault(require("../../../core/component_registrator"));
var _date = _interopRequireDefault(require("../../../core/utils/date"));
var _date2 = _interopRequireDefault(require("../../../localization/date"));
var _uiScheduler = _interopRequireDefault(require("./ui.scheduler.work_space_vertical"));
var _week = require("./utils/week");
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
}
}
function _inheritsLoose(subClass, superClass) {
subClass.prototype = Object.create(superClass.prototype);
subClass.prototype.constructor = subClass;
_setPrototypeOf(subClass, superClass)
}
function _setPrototypeOf(o, p) {
_setPrototypeOf = Object.setPrototypeOf || function(o, p) {
o.__proto__ = p;
return o
};
return _setPrototypeOf(o, p)
}
var WEEK_CLASS = "dx-scheduler-work-space-week";
var SchedulerWorkSpaceWeek = function(_SchedulerWorkSpaceVe) {
_inheritsLoose(SchedulerWorkSpaceWeek, _SchedulerWorkSpaceVe);
function SchedulerWorkSpaceWeek() {
return _SchedulerWorkSpaceVe.apply(this, arguments) || this
}
var _proto = SchedulerWorkSpaceWeek.prototype;
_proto._getElementClass = function() {
return WEEK_CLASS
};
_proto._getRowCount = function() {
return this._getCellCountInDay()
};
_proto._getCellCount = function() {
return 7 * this.option("intervalCount")
};
_proto._getDateByIndex = function(headerIndex) {
var resultDate = new Date(this._firstViewDate);
resultDate.setDate(this._firstViewDate.getDate() + headerIndex);
return resultDate
};
_proto._getStartViewDate = function() {
return _date.default.getFirstWeekDate(this.option("startDate"), this._firstDayOfWeek() || _date2.default.firstDayOfWeekIndex())
};
_proto._getIntervalDuration = function() {
return (0, _week.getIntervalDuration)(this.option("intervalCount"))
};
_proto.getPositionShift = function(timeShift, isAllDay) {
if (!isAllDay && this.invoke("isAdaptive") && 0 === this.invoke("getMaxAppointmentCountPerCellByType")) {
return {
top: 0,
left: 0,
cellPosition: 0
}
}
return _SchedulerWorkSpaceVe.prototype.getPositionShift.call(this, timeShift, isAllDay)
};
_proto._isApplyCompactAppointmentOffset = function() {
if (this.invoke("isAdaptive") && 0 === this.invoke("getMaxAppointmentCountPerCellByType")) {
return false
}
return _SchedulerWorkSpaceVe.prototype._isApplyCompactAppointmentOffset.call(this)
};
return SchedulerWorkSpaceWeek
}(_uiScheduler.default);
(0, _component_registrator.default)("dxSchedulerWorkSpaceWeek", SchedulerWorkSpaceWeek);
var _default = SchedulerWorkSpaceWeek;
exports.default = _default;
module.exports = exports.default;
module.exports.default = exports.default;