dhtmlx-scheduler 7.2.3 → 7.2.4

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.3 Standard
6
+ dhtmlxScheduler v.7.2.4 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
 
@@ -2687,6 +2687,13 @@ To use dhtmlxScheduler in non-GPL projects (and get Pro version of the product),
2687
2687
  end = scheduler2.date.date_part(new Date(end));
2688
2688
  end = new Date(end * 1 - obj._end_correction);
2689
2689
  }
2690
+ if (obj.round_position && scheduler2["ignore_" + scheduler2._mode] && obj.x_unit == "day") {
2691
+ const ignore = this["ignore_" + this._mode];
2692
+ let tempEnd = scheduler2.date.add(new Date(end), -obj.x_step, obj.x_unit);
2693
+ if (ignore(tempEnd)) {
2694
+ end = tempEnd;
2695
+ }
2696
+ }
2690
2697
  }
2691
2698
  } else {
2692
2699
  if (pos.resize_from_start) {
@@ -2807,6 +2814,14 @@ To use dhtmlxScheduler in non-GPL projects (and get Pro version of the product),
2807
2814
  new_end = new Date(end - 1);
2808
2815
  }
2809
2816
  }
2817
+ if (this._table_view && scheduler2["ignore_" + this._mode] && (this._drag_mode == "resize" || this._drag_mode == "new-size") && +end > +scheduler2._max_date) {
2818
+ end = new Date(scheduler2._max_date);
2819
+ const ignore = this["ignore_" + this._mode];
2820
+ while (ignore(end)) {
2821
+ end = scheduler2.date.add(end, -obj.x_step, obj.x_unit);
2822
+ }
2823
+ end = scheduler2.date.add(end, obj.x_step, obj.x_unit);
2824
+ }
2810
2825
  if (this._table_view || new_end.getDate() == new_start.getDate() && new_end.getHours() < this.config.last_hour || scheduler2._allow_dnd) {
2811
2826
  ev.start_date = new_start;
2812
2827
  ev.end_date = new Date(end);
@@ -3585,7 +3600,11 @@ To use dhtmlxScheduler in non-GPL projects (and get Pro version of the product),
3585
3600
  } else {
3586
3601
  end_slot = Math.round(ev_length / 60 / 60 / 1e3 / 24);
3587
3602
  }
3588
- while (start_slot * dir <= end_slot * dir) {
3603
+ function condition() {
3604
+ const isDayUnit = obj.x_unit === "day";
3605
+ return isDayUnit ? start_slot * dir < end_slot * dir : start_slot * dir <= end_slot * dir;
3606
+ }
3607
+ while (condition()) {
3589
3608
  var check = scheduler2.date.add(sd, obj.x_step * dir, obj.x_unit);
3590
3609
  if (ignore && ignore(sd)) {
3591
3610
  ev_length += (check - sd) * dir;
@@ -4747,7 +4766,7 @@ To use dhtmlxScheduler in non-GPL projects (and get Pro version of the product),
4747
4766
  } };
4748
4767
  }
4749
4768
  function extend$d(scheduler2) {
4750
- scheduler2.config = { default_date: "%j %M %Y", month_date: "%F %Y", load_date: "%Y-%m-%d", week_date: "%l", day_date: "%D %j", hour_date: "%H:%i", month_day: "%d", date_format: "%Y-%m-%d %H:%i", api_date: "%d-%m-%Y %H:%i", parse_exact_format: false, preserve_length: true, time_step: 5, displayed_event_color: "#ff4a4a", displayed_event_text_color: "#ffef80", wide_form: 0, day_column_padding: 8, use_select_menu_space: true, fix_tab_position: true, start_on_monday: true, first_hour: 0, last_hour: 24, readonly: false, drag_resize: true, drag_move: true, drag_create: true, drag_event_body: true, dblclick_create: true, details_on_dblclick: true, edit_on_create: true, details_on_create: true, header: null, hour_size_px: 44, resize_month_events: false, resize_month_timed: false, responsive_lightbox: false, separate_short_events: true, rtl: false, cascade_event_display: false, cascade_event_count: 4, cascade_event_margin: 30, multi_day: true, multi_day_height_limit: 200, drag_lightbox: true, preserve_scroll: true, select: true, undo_deleted: true, server_utc: false, touch: true, touch_tip: true, touch_drag: 500, touch_swipe_dates: false, quick_info_detached: true, positive_closing: false, drag_highlight: true, limit_drag_out: false, icons_edit: ["icon_save", "icon_cancel"], icons_select: ["icon_details", "icon_edit", "icon_delete"], buttons_left: ["dhx_save_btn", "dhx_cancel_btn"], buttons_right: ["dhx_delete_btn"], lightbox: { sections: [{ name: "description", map_to: "text", type: "textarea", focus: true }, { name: "time", height: 72, type: "time", map_to: "auto" }] }, highlight_displayed_event: true, left_border: false, ajax_error: "alert", delay_render: 0, timeline_swap_resize: true, wai_aria_attributes: true, wai_aria_application_role: true, csp: "auto", event_attribute: "data-event-id", show_errors: true };
4769
+ scheduler2.config = { default_date: "%j %M %Y", month_date: "%F %Y", load_date: "%Y-%m-%d", week_date: "%l", day_date: "%D %j", hour_date: "%H:%i", month_day: "%d", date_format: "%Y-%m-%d %H:%i", api_date: "%d-%m-%Y %H:%i", parse_exact_format: false, preserve_length: true, time_step: 5, displayed_event_color: "#ff4a4a", displayed_event_text_color: "#ffef80", wide_form: 0, day_column_padding: 8, use_select_menu_space: true, fix_tab_position: true, start_on_monday: true, first_hour: 0, last_hour: 24, readonly: false, drag_resize: true, drag_move: true, drag_create: true, drag_event_body: true, dblclick_create: true, details_on_dblclick: true, edit_on_create: true, details_on_create: true, header: null, hour_size_px: 44, resize_month_events: false, resize_month_timed: false, responsive_lightbox: false, separate_short_events: true, rtl: false, cascade_event_display: false, cascade_event_count: 4, cascade_event_margin: 30, multi_day: true, multi_day_height_limit: 200, drag_lightbox: true, preserve_scroll: true, select: true, undo_deleted: true, server_utc: false, touch: true, touch_tip: true, touch_drag: 500, touch_swipe_dates: false, quick_info_detached: true, positive_closing: false, drag_highlight: true, limit_drag_out: false, icons_edit: ["icon_save", "icon_cancel"], icons_select: ["icon_details", "icon_edit", "icon_delete"], buttons_right: ["dhx_save_btn", "dhx_cancel_btn"], buttons_left: ["dhx_delete_btn"], lightbox: { sections: [{ name: "description", map_to: "text", type: "textarea", focus: true }, { name: "time", height: 72, type: "time", map_to: "auto" }] }, highlight_displayed_event: true, left_border: false, ajax_error: "alert", delay_render: 0, timeline_swap_resize: true, wai_aria_attributes: true, wai_aria_application_role: true, csp: "auto", event_attribute: "data-event-id", show_errors: true };
4751
4770
  scheduler2.config.buttons_left.$initial = scheduler2.config.buttons_left.join();
4752
4771
  scheduler2.config.buttons_right.$initial = scheduler2.config.buttons_right.join();
4753
4772
  scheduler2._helpers = { parseDate: function parseDate(date) {
@@ -6910,14 +6929,14 @@ To use dhtmlxScheduler in non-GPL projects (and get Pro version of the product),
6910
6929
  d.className += " dhx_cal_light_responsive";
6911
6930
  d.style.visibility = "hidden";
6912
6931
  var html = this._lightbox_template;
6913
- var buttons = this.config.buttons_left;
6932
+ var buttons = this.config.buttons_right;
6914
6933
  html += "<div class='dhx_cal_lcontrols'>";
6915
6934
  var ariaAttr = "";
6916
6935
  for (var i = 0; i < buttons.length; i++) {
6917
6936
  ariaAttr = this._waiAria.lightboxButtonAttrString(buttons[i]);
6918
6937
  html += "<div " + ariaAttr + " data-action='" + buttons[i] + "' class='dhx_btn_set dhx_" + (scheduler2.config.rtl ? "right" : "left") + "_btn_set " + buttons[i] + "_set'><div class='dhx_btn_inner " + buttons[i] + "'></div><div>" + scheduler2.locale.labels[buttons[i]] + "</div></div>";
6919
6938
  }
6920
- buttons = this.config.buttons_right;
6939
+ buttons = this.config.buttons_left;
6921
6940
  var rtl = scheduler2.config.rtl;
6922
6941
  for (var i = 0; i < buttons.length; i++) {
6923
6942
  ariaAttr = this._waiAria.lightboxButtonAttrString(buttons[i]);
@@ -9143,7 +9162,7 @@ To use dhtmlxScheduler in non-GPL projects (and get Pro version of the product),
9143
9162
  }
9144
9163
  }
9145
9164
  function factoryMethod(extensionManager) {
9146
- const scheduler2 = { version: "7.2.3" };
9165
+ const scheduler2 = { version: "7.2.4" };
9147
9166
  scheduler2.$stateProvider = StateService();
9148
9167
  scheduler2.getState = scheduler2.$stateProvider.getState;
9149
9168
  extend$n(scheduler2);
@@ -10017,9 +10036,13 @@ To use dhtmlxScheduler in non-GPL projects (and get Pro version of the product),
10017
10036
  height = 190 * scheduler2.config.year_y;
10018
10037
  } else if (mode == "agenda") {
10019
10038
  height = 0;
10020
- if (checked_div.childNodes && checked_div.childNodes.length) {
10021
- for (var j = 0; j < checked_div.childNodes.length; j++) {
10022
- height += checked_div.childNodes[j].offsetHeight;
10039
+ if (checked_div.children && checked_div.children.length) {
10040
+ if (checked_div.children.length === 1 && checked_div.children[0].classList.contains("dhx_cal_agenda_no_events")) {
10041
+ height = 300;
10042
+ } else {
10043
+ for (var j = 0; j < checked_div.children.length; j++) {
10044
+ height += checked_div.children[j].offsetHeight;
10045
+ }
10023
10046
  }
10024
10047
  }
10025
10048
  if (height + 2 < scheduler2.config.min_grid_size) {