UNPKG

devextreme

Version:

JavaScript/TypeScript Component Suite for Responsive Web Development

42 lines (41 loc) 1.78 kB
/** * DevExtreme (cjs/__internal/scheduler/view_model/filtration/get_occurrences.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/ */ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getOccurrences = void 0; var _add_all_day_panel_occupation = require("./utils/add_all_day_panel_occupation"); var _filter_by_intervals = require("./utils/filter_by_intervals/filter_by_intervals"); var _get_filter_options = require("./utils/get_filter_options/get_filter_options"); var _split_by_recurrence = require("./utils/split_by_recurrence/split_by_recurrence"); const getOccurrences = (schedulerStore, startDate, endDate, appointments) => { const compareOptions = { startDayHour: 0, endDayHour: 24, min: startDate.getTime(), max: endDate.getTime(), skippedDays: [] }; const filterOptions = Object.assign({}, (0, _get_filter_options.getFilterOptions)(schedulerStore, compareOptions), { allDayPanelMode: "allDay", supportAllDayPanel: true, isDateTimeView: true }); const step1 = (0, _add_all_day_panel_occupation.addAllDayPanelOccupation)(appointments, filterOptions); const step2 = (0, _split_by_recurrence.splitByRecurrence)(step1, filterOptions); const step3 = (0, _filter_by_intervals.filterByIntervals)(step2, filterOptions); const step4 = step3.map(appointment => ({ startDate: new Date(appointment.source.startDate), endDate: new Date(appointment.source.endDate), appointmentData: appointment.itemData })); return step4 }; exports.getOccurrences = getOccurrences;