dhtmlx-scheduler 7.2.1 → 7.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,7 +3,7 @@
3
3
  })(this, function(exports2) {
4
4
  "use strict";/** @license
5
5
 
6
- dhtmlxScheduler v.7.2.1 Standard
6
+ dhtmlxScheduler v.7.2.2 Standard
7
7
 
8
8
  To use dhtmlxScheduler in non-GPL projects (and get Pro version of the product), please obtain Commercial/Enterprise or Ultimate license on our site https://dhtmlx.com/docs/products/dhtmlxScheduler/#licensing or contact us at sales@dhtmlx.com
9
9
 
@@ -82,6 +82,14 @@ To use dhtmlxScheduler in non-GPL projects (and get Pro version of the product),
82
82
  setRequiredStylesToMarker(eventNode2, layout);
83
83
  const sections = {};
84
84
  let markerObject = { start_date: event3.start_date, end_date: event3.end_date, css: "dhx_scheduler_dnd_marker", html: eventNode2 };
85
+ if (layout == "timeline") {
86
+ const viewObj = scheduler2.getView(viewName);
87
+ if (viewObj.round_position) {
88
+ const index = scheduler2._get_date_index(viewObj, event3.start_date);
89
+ const rounded_date = viewObj._trace_x[index];
90
+ markerObject.start_date = rounded_date;
91
+ }
92
+ }
85
93
  if (layout == "timeline" || layout == "month") {
86
94
  markerObject = { ...markerObject, end_date: scheduler2.date.add(event3.start_date, 1, "minute") };
87
95
  }
@@ -9019,7 +9027,7 @@ To use dhtmlxScheduler in non-GPL projects (and get Pro version of the product),
9019
9027
  const dayElement = document.createElement("div");
9020
9028
  dayElement.setAttribute("data-cell-date", scheduler2.templates.format_date(currDate));
9021
9029
  dayElement.setAttribute("data-day", currDate.getDay());
9022
- dayElement.innerHTML = currDate.getDate();
9030
+ dayElement.innerHTML = scheduler2.templates.month_day(currDate);
9023
9031
  if (currDate.valueOf() < monthStart.valueOf()) {
9024
9032
  dayElement.classList.add("dhx_before");
9025
9033
  } else if (currDate.valueOf() >= monthEnd.valueOf()) {
@@ -9124,7 +9132,7 @@ To use dhtmlxScheduler in non-GPL projects (and get Pro version of the product),
9124
9132
  }
9125
9133
  }
9126
9134
  function factoryMethod(extensionManager) {
9127
- const scheduler2 = { version: "7.2.1" };
9135
+ const scheduler2 = { version: "7.2.2" };
9128
9136
  scheduler2.$stateProvider = StateService();
9129
9137
  scheduler2.getState = scheduler2.$stateProvider.getState;
9130
9138
  extend$n(scheduler2);
@@ -18564,6 +18572,10 @@ To use dhtmlxScheduler in non-GPL projects (and get Pro version of the product),
18564
18572
  setPropsForFirstOccurrence(event2, occurrence);
18565
18573
  return scheduler2.showLightbox_rec(pid);
18566
18574
  }
18575
+ if (scheduler2._isFirstOccurrence(occurrence)) {
18576
+ setPropsForFirstOccurrence(event2, occurrence);
18577
+ return scheduler2.showLightbox_rec(pid);
18578
+ }
18567
18579
  const tempStart = new Date(event2.start_date);
18568
18580
  event2._end_date = event2.end_date;
18569
18581
  event2._start_date = tempStart;
@@ -18824,7 +18836,7 @@ To use dhtmlxScheduler in non-GPL projects (and get Pro version of the product),
18824
18836
  if (!seriesExceptions) {
18825
18837
  seriesExceptions = {};
18826
18838
  }
18827
- from = toUTCDate(from || new Date(scheduler2._min_date.valueOf() - 1e3));
18839
+ from = toUTCDate(from || new Date(scheduler2._min_date.valueOf() - 7 * 24 * 60 * 60 * 1e3));
18828
18840
  to = toUTCDate(to || new Date(scheduler2._max_date.valueOf() - 1e3));
18829
18841
  const utcStart = toUTCDate(ev.start_date);
18830
18842
  let parsedRRule;
@@ -18849,7 +18861,7 @@ To use dhtmlxScheduler in non-GPL projects (and get Pro version of the product),
18849
18861
  const date = repeatedDates[i];
18850
18862
  let exception = seriesExceptions[date.valueOf()];
18851
18863
  if (exception) {
18852
- if (exception.deleted) {
18864
+ if (exception.deleted || exception.end_date.valueOf() < scheduler2._min_date.valueOf()) {
18853
18865
  continue;
18854
18866
  } else {
18855
18867
  visibleCount++;
@@ -18861,6 +18873,9 @@ To use dhtmlxScheduler in non-GPL projects (and get Pro version of the product),
18861
18873
  copy.start_date = date;
18862
18874
  copy.id = ev.id + "#" + Math.ceil(date.valueOf());
18863
18875
  copy.end_date = new Date(date.valueOf() + eventDuration * 1e3);
18876
+ if (copy.end_date.valueOf() < scheduler2._min_date.valueOf()) {
18877
+ continue;
18878
+ }
18864
18879
  copy.end_date = scheduler2._fix_daylight_saving_date(copy.start_date, copy.end_date, ev, date, copy.end_date);
18865
18880
  copy._timed = scheduler2.isOneDayEvent(copy);
18866
18881
  if (!copy._timed && !scheduler2._table_view && !scheduler2.config.multi_day)
@@ -18877,7 +18892,7 @@ To use dhtmlxScheduler in non-GPL projects (and get Pro version of the product),
18877
18892
  for (let a in seriesExceptions) {
18878
18893
  let exception = seriesExceptions[a];
18879
18894
  if (exception) {
18880
- if (exception.deleted) {
18895
+ if (exception.deleted || exception.end_date.valueOf() < scheduler2._min_date.valueOf()) {
18881
18896
  continue;
18882
18897
  } else if (from && to && exception.start_date < to && exception.end_date > from) {
18883
18898
  stack.push(exception);
@@ -21015,69 +21030,6 @@ To use dhtmlxScheduler in non-GPL projects (and get Pro version of the product),
21015
21030
  scheduler2._hideToolTip();
21016
21031
  }
21017
21032
  };
21018
- scheduler2._reset_year_scale = function() {
21019
- this._cols = [];
21020
- this._colsS = {};
21021
- var week_starts = [];
21022
- var dataArea = this._els["dhx_cal_data"][0];
21023
- var c = this.config;
21024
- dataArea.scrollTop = 0;
21025
- dataArea.innerHTML = "";
21026
- Math.floor((parseInt(dataArea.style.height) - scheduler2.xy.year_top) / c.year_y);
21027
- var week_template = document.createElement("div");
21028
- var dummy_date = this.date.week_start(scheduler2._currentDate());
21029
- this._process_ignores(dummy_date, 7, "day", 1);
21030
- for (var i = 0; i < 7; i++) {
21031
- if (!(this._ignores && this._ignores[i])) {
21032
- this._cols[i] = "var(--dhx-scheduler-datepicker-cell-size)";
21033
- this._render_x_header(i, 0, dummy_date, week_template);
21034
- }
21035
- dummy_date = this.date.add(dummy_date, 1, "day");
21036
- }
21037
- week_template.lastChild.className += " dhx_scale_bar_last";
21038
- for (var i = 0; i < week_template.childNodes.length; i++) {
21039
- this._waiAria.yearHeadCell(week_template.childNodes[i]);
21040
- }
21041
- var sd = this.date[this._mode + "_start"](this.date.copy(this._date));
21042
- var ssd = sd;
21043
- var yearBox = null;
21044
- const wrapper = document.createElement("div");
21045
- wrapper.classList.add("dhx_year_wrapper");
21046
- for (var i = 0; i < c.year_y; i++) {
21047
- for (var j = 0; j < c.year_x; j++) {
21048
- yearBox = document.createElement("div");
21049
- yearBox.className = "dhx_year_box";
21050
- yearBox.setAttribute("date", this._helpers.formatDate(sd));
21051
- yearBox.setAttribute("data-month-date", this._helpers.formatDate(sd));
21052
- yearBox.innerHTML = "<div class='dhx_year_month'></div><div class='dhx_year_grid'><div class='dhx_year_week'>" + week_template.innerHTML + "</div><div class='dhx_year_body'></div></div>";
21053
- var header = yearBox.querySelector(".dhx_year_month");
21054
- var grid = yearBox.querySelector(".dhx_year_grid");
21055
- var body = yearBox.querySelector(".dhx_year_body");
21056
- var headerId = scheduler2.uid();
21057
- this._waiAria.yearHeader(header, headerId);
21058
- this._waiAria.yearGrid(grid, headerId);
21059
- header.innerHTML = this.templates.year_month(sd);
21060
- var dd = this.date.week_start(sd);
21061
- this._reset_month_scale(body, sd, dd, 6);
21062
- var days = body.querySelectorAll("td");
21063
- for (var day = 0; day < days.length; day++) {
21064
- this._waiAria.yearDayCell(days[day]);
21065
- }
21066
- wrapper.appendChild(yearBox);
21067
- week_starts[i * c.year_x + j] = (sd.getDay() - (this.config.start_on_monday ? 1 : 0) + 7) % 7;
21068
- sd = this.date.add(sd, 1, "month");
21069
- }
21070
- }
21071
- dataArea.appendChild(wrapper);
21072
- var dateElement = this._getNavDateElement();
21073
- if (dateElement) {
21074
- dateElement.innerHTML = this.templates[this._mode + "_date"](ssd, sd, this._mode);
21075
- }
21076
- this.week_starts = week_starts;
21077
- week_starts._month = ssd.getMonth();
21078
- this._min_date = ssd;
21079
- this._max_date = sd;
21080
- };
21081
21033
  scheduler2._reset_year_scale = function() {
21082
21034
  var dataArea = this._els["dhx_cal_data"][0];
21083
21035
  dataArea.scrollTop = 0;