dhtmlx-scheduler 7.2.4 → 7.2.6

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.
@@ -1,37 +1,38 @@
1
+ @charset "UTF-8";
1
2
  @font-face {
2
3
  font-family: 'Inter';
3
4
  font-style: normal;
4
5
  font-weight: 300;
5
6
  font-display: swap;
6
- src: url(https://fonts.gstatic.com/s/inter/v18/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuOKfMZg.ttf) format('truetype');
7
+ src: url(https://fonts.gstatic.com/s/inter/v19/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuOKfMZg.ttf) format('truetype');
7
8
  }
8
9
  @font-face {
9
10
  font-family: 'Inter';
10
11
  font-style: normal;
11
12
  font-weight: 400;
12
13
  font-display: swap;
13
- src: url(https://fonts.gstatic.com/s/inter/v18/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuLyfMZg.ttf) format('truetype');
14
+ src: url(https://fonts.gstatic.com/s/inter/v19/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuLyfMZg.ttf) format('truetype');
14
15
  }
15
16
  @font-face {
16
17
  font-family: 'Inter';
17
18
  font-style: normal;
18
19
  font-weight: 500;
19
20
  font-display: swap;
20
- src: url(https://fonts.gstatic.com/s/inter/v18/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuI6fMZg.ttf) format('truetype');
21
+ src: url(https://fonts.gstatic.com/s/inter/v19/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuI6fMZg.ttf) format('truetype');
21
22
  }
22
23
  @font-face {
23
24
  font-family: 'Inter';
24
25
  font-style: normal;
25
26
  font-weight: 600;
26
27
  font-display: swap;
27
- src: url(https://fonts.gstatic.com/s/inter/v18/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuGKYMZg.ttf) format('truetype');
28
+ src: url(https://fonts.gstatic.com/s/inter/v19/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuGKYMZg.ttf) format('truetype');
28
29
  }
29
30
  @font-face {
30
31
  font-family: 'Inter';
31
32
  font-style: normal;
32
33
  font-weight: 700;
33
34
  font-display: swap;
34
- src: url(https://fonts.gstatic.com/s/inter/v18/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuFuYMZg.ttf) format('truetype');
35
+ src: url(https://fonts.gstatic.com/s/inter/v19/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuFuYMZg.ttf) format('truetype');
35
36
  }
36
37
  /* default terrace theme is here */
37
38
  :root {
@@ -1,6 +1,6 @@
1
1
  /** @license
2
2
 
3
- dhtmlxScheduler v.7.2.4 Standard
3
+ dhtmlxScheduler v.7.2.6 Standard
4
4
 
5
5
  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
6
6
 
@@ -2730,8 +2730,17 @@ function extend$j(scheduler2) {
2730
2730
  start = this._drag_start;
2731
2731
  }
2732
2732
  } else {
2733
- if (end <= start)
2734
- end = start + timeStep * 6e4;
2733
+ if (end <= start) {
2734
+ if (obj && obj.round_position) {
2735
+ if (obj.x_unit == "hour" || obj.x_unit == "minute") {
2736
+ end = scheduler2.date.add(start, obj.x_step, obj.x_unit);
2737
+ } else {
2738
+ end = scheduler2.date.add(scheduler2.date.date_part(new Date(start)), 1, obj.x_unit);
2739
+ }
2740
+ } else {
2741
+ end = start + timeStep * 6e4;
2742
+ }
2743
+ }
2735
2744
  }
2736
2745
  }
2737
2746
  var new_end = new Date(end - 1);
@@ -3328,8 +3337,8 @@ function extend$j(scheduler2) {
3328
3337
  scheduler2._render_month_scale = function(div, dd, sd, rows) {
3329
3338
  var ed = scheduler2.date.add(dd, 1, "month"), view_start = new Date(sd);
3330
3339
  var cd = scheduler2._currentDate();
3331
- this.date.date_part(cd);
3332
- this.date.date_part(sd);
3340
+ cd = this.date.date_part(cd);
3341
+ sd = this.date.date_part(sd);
3333
3342
  rows = rows || Math.ceil(Math.round((ed.valueOf() - sd.valueOf()) / (60 * 60 * 24 * 1e3)) / 7);
3334
3343
  var tdwidths = [];
3335
3344
  for (var i = 0; i <= 7; i++) {
@@ -3414,9 +3423,7 @@ function extend$j(scheduler2) {
3414
3423
  };
3415
3424
  scheduler2._reset_month_scale = function(b, dd, sd, rows) {
3416
3425
  var ed = scheduler2.date.add(dd, 1, "month");
3417
- var cd = scheduler2._currentDate();
3418
- this.date.date_part(cd);
3419
- this.date.date_part(sd);
3426
+ sd = this.date.date_part(sd);
3420
3427
  rows = rows || Math.ceil(Math.round((ed.valueOf() - sd.valueOf()) / (60 * 60 * 24 * 1e3)) / 7);
3421
3428
  var height = Math.floor(b.clientHeight / rows) - this.xy.month_head_height;
3422
3429
  this._colsS.height = height + this.xy.month_head_height;
@@ -4852,7 +4859,7 @@ function extend$c(scheduler2) {
4852
4859
  if (typeof ev.end_date == "string")
4853
4860
  ev.end_date = this.templates.api_date(ev.end_date);
4854
4861
  var d = (this.config.event_duration || this.config.time_step) * 6e4;
4855
- if (ev.start_date.valueOf() == ev.end_date.valueOf())
4862
+ if (new Date(ev.end_date).valueOf() - new Date(ev.start_date).valueOf() <= d)
4856
4863
  ev.end_date.setTime(ev.end_date.valueOf() + d);
4857
4864
  ev.start_date.setMilliseconds(0);
4858
4865
  ev.end_date.setMilliseconds(0);
@@ -6877,6 +6884,37 @@ function extend$6(scheduler2) {
6877
6884
  break;
6878
6885
  }
6879
6886
  });
6887
+ function getDaysInMonth(year, month) {
6888
+ return new Date(year, month + 1, 0).getDate();
6889
+ }
6890
+ scheduler2.event(lightbox, "click", function(e) {
6891
+ if (e.target.closest(".dhx_lightbox_day_select") || e.target.closest(".dhx_lightbox_month_select")) {
6892
+ const monthSelectNodes = lightbox.querySelectorAll(".dhx_lightbox_month_select");
6893
+ const daySelectNodes = lightbox.querySelectorAll(".dhx_lightbox_day_select");
6894
+ const yearSelectNodes = lightbox.querySelectorAll(".dhx_lightbox_year_select");
6895
+ if (monthSelectNodes.length && daySelectNodes.length && yearSelectNodes) {
6896
+ monthSelectNodes.forEach((select, i) => {
6897
+ const daySelect = daySelectNodes[i];
6898
+ const month = parseInt(select.value, 10);
6899
+ let year = parseInt(yearSelectNodes[i].value, 10);
6900
+ if (!year) {
6901
+ year = new Date(scheduler2.getState().date).getFullYear();
6902
+ }
6903
+ const daysInMonth = getDaysInMonth(year, month);
6904
+ const maxDays = daysInMonth || 31;
6905
+ let curDayValue = daySelect.value;
6906
+ daySelect.innerHTML = "";
6907
+ for (let day = 1; day <= maxDays; day++) {
6908
+ const option = document.createElement("option");
6909
+ option.value = day;
6910
+ option.textContent = day;
6911
+ daySelect.appendChild(option);
6912
+ }
6913
+ daySelect.value = Math.min(curDayValue, maxDays);
6914
+ });
6915
+ }
6916
+ }
6917
+ });
6880
6918
  };
6881
6919
  scheduler2.setLightboxSize = function() {
6882
6920
  return;
@@ -8021,6 +8059,7 @@ DataProcessor.prototype = { setTransactionMode: function(mode, total) {
8021
8059
  if (this._tMode === "CUSTOM") {
8022
8060
  var state = this.getState(rowId);
8023
8061
  var action = this.getActionByState(state);
8062
+ delete dataToSend[this.action_param];
8024
8063
  var _onResolvedCreateUpdate = function(tag) {
8025
8064
  var resultState = state;
8026
8065
  if (tag && tag.responseText && tag.setRequestHeader) {
@@ -9158,7 +9197,7 @@ class DatePicker {
9158
9197
  }
9159
9198
  }
9160
9199
  function factoryMethod(extensionManager) {
9161
- const scheduler2 = { version: "7.2.4" };
9200
+ const scheduler2 = { version: "7.2.6" };
9162
9201
  scheduler2.$stateProvider = StateService();
9163
9202
  scheduler2.getState = scheduler2.$stateProvider.getState;
9164
9203
  extend$n(scheduler2);
@@ -20664,6 +20703,12 @@ class Tooltip {
20664
20703
  tooltip2.top = mouse.y - tooltip2.height - offsetY;
20665
20704
  tooltip2.bottom = tooltip2.top + tooltip2.height;
20666
20705
  }
20706
+ if (tooltip2.left < 0) {
20707
+ tooltip2.left = 0;
20708
+ }
20709
+ if (tooltip2.right < 0) {
20710
+ tooltip2.right = 0;
20711
+ }
20667
20712
  return tooltip2;
20668
20713
  }
20669
20714
  _getViewPortSize() {