devextreme
Version:
JavaScript/TypeScript Component Suite for Responsive Web Development
44 lines (43 loc) • 1.9 kB
JavaScript
/**
* DevExtreme (cjs/__internal/scheduler/view_model/preparation/utils/get_minimal_appointments.js)
* Version: 26.1.3
* Build date: Wed Jun 10 2026
*
* Copyright (c) 2012 - 2026 Developer Express Inc. ALL RIGHTS RESERVED
* Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
*/
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getMinimalAppointments = void 0;
var _type = require("../../../../../core/utils/type");
const getMinimalAppointments = (safeItems, _ref) => {
let {
dataAccessors: dataAccessors
} = _ref;
return safeItems.map(rawAppointment => {
const startDateMs = dataAccessors.get("startDate", rawAppointment).getTime();
const startDateTimeZone = dataAccessors.get("startDateTimeZone", rawAppointment);
const endDateMs = dataAccessors.get("endDate", rawAppointment).getTime();
const endDateTimeZone = dataAccessors.get("endDateTimeZone", rawAppointment);
const rawVisible = dataAccessors.get("visible", rawAppointment);
const visible = (0, _type.isDefined)(rawVisible) ? Boolean(rawVisible) : true;
return {
allDay: dataAccessors.get("allDay", rawAppointment),
startDateTimeZone: startDateTimeZone,
endDateTimeZone: endDateTimeZone,
source: {
startDate: startDateMs,
endDate: endDateMs
},
recurrenceRule: dataAccessors.get("recurrenceRule", rawAppointment),
recurrenceException: dataAccessors.get("recurrenceException", rawAppointment),
hasRecurrenceRule: dataAccessors.isRecurrent(rawAppointment),
visible: visible,
disabled: dataAccessors.get("disabled", rawAppointment),
itemData: rawAppointment
}
})
};
exports.getMinimalAppointments = getMinimalAppointments;