@daypilot/daypilot-lite-angular 5.7.0 → 5.8.0-sandbox.828

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.
@@ -259,6 +259,7 @@ var DayPilot;
259
259
  onAfterEventRender;
260
260
  onBeforeEventRender;
261
261
  onBeforeCellRender;
262
+ onBeforeHeaderRender;
262
263
  onCellHeaderClick;
263
264
  onCellHeaderClicked;
264
265
  onEventClick;
@@ -499,7 +500,7 @@ DayPilot Lite
499
500
  Copyright (c) 2005 - 2026 Annpoint s.r.o.
500
501
  https://www.daypilot.org/
501
502
  Licensed under Apache Software License 2.0
502
- Version: 2026.2.825-lite
503
+ Version: 2026.2.828-lite
503
504
  */
504
505
  "use strict";
505
506
  var DayPilot = { Global: {} };
@@ -2459,14 +2460,16 @@ var DayPilot = { Global: {} };
2459
2460
  } null === i && (i = this.rows.length - 1); var d = {}; return d.x = a, d.y = i, d.relativeY = o, d; }, this.getCellFromDate = function (e) { for (var t = DayPilot.DateUtil.daysDiff(this.firstDate, e), n = { x: 0, y: 0 }; t >= 7;)
2460
2461
  n.y++, t -= 7; return n.x = t, n; }, this.od = function () { var e = document.createElement("div"); e.oncontextmenu = function () { return !1; }, this.nav.cells.appendChild(e), this.cells = []; for (var t = 0; t < this.getColCount(); t++) {
2461
2462
  this.cells[t] = [];
2462
- var n = document.createElement("div");
2463
- n.setAttribute("unselectable", "on"), n.style.position = "absolute", n.style.left = this.getCellWidth() * t + "%", n.style.width = this.getCellWidth() + "%", n.style.top = "0px", n.style.height = this.headerHeight + "px";
2464
- var a = t + this.getWeekStart();
2465
- a > 6 && (a -= 7), n.className = this.M("_header");
2466
- var i = document.createElement("div");
2467
- i.setAttribute("unselectable", "on"), i.innerHTML = r.locale().dayNames[a], n.appendChild(i), i.style.position = "absolute", i.style.top = "0px", i.style.bottom = "0px", i.style.left = "0px", i.style.right = "0px", i.className = this.M("_header_inner"), i.innerHTML = r.locale().dayNames[a], e.appendChild(n);
2468
- for (var o = 0; o < this.rows.length; o++)
2469
- this.rd(t, o, e);
2463
+ var n = t + this.getWeekStart();
2464
+ n > 6 && (n -= 7);
2465
+ var a = {};
2466
+ a.header = { dayOfWeek: n, html: r.locale().dayNames[n], backColor: null, cssClass: null }, "function" == typeof i.onBeforeHeaderRender && i.onBeforeHeaderRender(a);
2467
+ var o = document.createElement("div");
2468
+ o.setAttribute("unselectable", "on"), o.style.position = "absolute", o.style.left = this.getCellWidth() * t + "%", o.style.width = this.getCellWidth() + "%", o.style.top = "0px", o.style.height = this.headerHeight + "px", o.className = this.M("_header");
2469
+ var s = document.createElement("div");
2470
+ s.setAttribute("unselectable", "on"), s.style.position = "absolute", s.style.top = "0px", s.style.bottom = "0px", s.style.left = "0px", s.style.right = "0px", s.className = this.M("_header_inner"), s.innerHTML = a.header.html, o.appendChild(s), a.header.cssClass && DayPilot.Util.addClass(o, a.header.cssClass), a.header.backColor && (s.style.background = a.header.backColor), e.appendChild(o);
2471
+ for (var l = 0; l < this.rows.length; l++)
2472
+ this.rd(t, l, e);
2470
2473
  } }, this.nd = function () { for (var e = 0; e < this.cells.length; e++)
2471
2474
  for (var t = 0; t < this.cells[e].length; t++) {
2472
2475
  var n = i.cells[e][t];
@@ -2476,10 +2479,10 @@ var DayPilot = { Global: {} };
2476
2479
  if (a) {
2477
2480
  i.Ya.Xa && t(n.element) && (i.Ya._a = !0, i.Ya.ab(a), i.Ya._a = !1);
2478
2481
  }
2479
- } }(), e.onclick = null; }, this.va = function () { return 2 === i.api; }, this.rd = function (n, a, o) { var s = this.rows[a], l = this.firstDate.addDays(7 * a + n), d = l.getDay(), c = null; c = 1 === d ? r.locale().monthNames[l.getMonth()] + " " + d : "" + d; var u = !i.isWeekend(l), h = { "start": l, "end": l.addDays(1), "properties": { "headerHtml": c, "backColor": null, "business": u, "html": null } }, f = {}; f.control = i, f.cell = h, "function" == typeof i.onBeforeCellRender && i.onBeforeCellRender(f); var v = f.cell.properties, p = document.createElement("div"); if (p.setAttribute("unselectable", "on"), p.style.position = "absolute", p.style.cursor = "default", p.style.left = this.getCellWidth() * n + "%", p.style.width = this.getCellWidth() + "%", p.style.top = this.getRowTop(a) + "px", p.style.height = s.getHeight() + "px", p.className = this.M("_cell"), v.business) {
2482
+ } }(), e.onclick = null; }, this.va = function () { return 2 === i.api; }, this.rd = function (n, a, o) { var s = this.rows[a], l = this.firstDate.addDays(7 * a + n), d = l.getDay(), c = null; c = 1 === d ? r.locale().monthNames[l.getMonth()] + " " + d : "" + d; var u = !i.isWeekend(l), h = { start: l, end: l.addDays(1), properties: { cssClass: null, headerHtml: c, backColor: null, business: u, html: null } }, f = {}; f.control = i, f.cell = h, "function" == typeof i.onBeforeCellRender && i.onBeforeCellRender(f); var v = f.cell.properties, p = document.createElement("div"); if (p.setAttribute("unselectable", "on"), p.style.position = "absolute", p.style.cursor = "default", p.style.left = this.getCellWidth() * n + "%", p.style.width = this.getCellWidth() + "%", p.style.top = this.getRowTop(a) + "px", p.style.height = s.getHeight() + "px", p.className = this.M("_cell"), v.business) {
2480
2483
  var m = this.M("_cell_business");
2481
2484
  DayPilot.Util.addClass(p, m);
2482
- } var g = document.createElement("div"); g.setAttribute("unselectable", "on"), p.appendChild(g), g.style.position = "absolute", g.style.left = "0px", g.style.right = "0px", g.style.top = "0px", g.style.bottom = "0px", g.className = this.M("_cell_inner"), v.backColor && (g.style.backgroundColor = f.cell.properties.backColor), p.onmousedown = function () { "Disabled" !== i.timeRangeSelectedHandling && (i.clearShadow(), e.timeRangeSelecting = { "root": i, "x": n, "y": a, "from": { x: n, y: a }, "width": 1 }); }, p.onclick = function () { var e = function (e) { var t = new DayPilot.Date(e), n = t.addDays(1); i.P(t, n); }; if ("Disabled" !== i.timeRangeSelectedHandling)
2485
+ } v.cssClass && DayPilot.Util.addClass(p, v.cssClass); var g = document.createElement("div"); g.setAttribute("unselectable", "on"), p.appendChild(g), g.style.position = "absolute", g.style.left = "0px", g.style.right = "0px", g.style.top = "0px", g.style.bottom = "0px", g.className = this.M("_cell_inner"), v.backColor && (g.style.backgroundColor = f.cell.properties.backColor), p.onmousedown = function () { "Disabled" !== i.timeRangeSelectedHandling && (i.clearShadow(), e.timeRangeSelecting = { "root": i, "x": n, "y": a, "from": { x: n, y: a }, "width": 1 }); }, p.onclick = function () { var e = function (e) { var t = new DayPilot.Date(e), n = t.addDays(1); i.P(t, n); }; if ("Disabled" !== i.timeRangeSelectedHandling)
2483
2486
  return void e(l); }; var y = document.createElement("div"); if (y.setAttribute("unselectable", "on"), y.style.height = this.cellHeaderHeight + "px", y.className = this.M("_cell_header"), y.onclick = function (e) { if ("Enabled" === i.cellHeaderClickHandling) {
2484
2487
  e.stopPropagation();
2485
2488
  var t = {};
@@ -2677,12 +2680,12 @@ var DayPilot = { Global: {} };
2677
2680
  (0, e(o).assign)(t, i);
2678
2681
  }
2679
2682
  for (var s in a)
2680
- 0 === s.indexOf("on") && !function (n) { i[n] = function (i) { var r = e(a[n]); t["$apply"](function () { r(t, { "args": i }); }); }; }(s);
2683
+ 0 === s.indexOf("on") && !function (n) {
2684
+ i[n] = function (i) { var r = e(a[n]); t["$apply"](function () { r(t, { "args": i }); }); };
2685
+ }(s);
2681
2686
  var l = t["$watch"], d = a["config"] || a["daypilotConfig"], c = a["events"] || a["daypilotEvents"];
2682
2687
  l.call(t, d, function (e) { for (var t in e)
2683
- i[t] = e[t]; i.update(); }, !0), l.call(t, c, function (e) {
2684
- i.events.list = e, i.update();
2685
- }, !0);
2688
+ i[t] = e[t]; i.update(); }, !0), l.call(t, c, function (e) { i.events.list = e, i.update(); }, !0);
2686
2689
  } };
2687
2690
  }]);
2688
2691
  }(), "undefined" != typeof Sys && Sys.Application && Sys.Application.notifyScriptLoaded && Sys.Application.notifyScriptLoaded();
@@ -3087,34 +3090,30 @@ var DayPilot = { Global: {} };
3087
3090
  var d = s.ne;
3088
3091
  this.oe = {};
3089
3092
  var c = this.oe, u = {};
3090
- this.scrollTo = function (e) { s.pe(e); }, this.pe = function (e) { if (e) {
3091
- if (!s.Ra)
3092
- return void (s.qe = e);
3093
- var t;
3094
- if (e instanceof DayPilot.Date)
3095
- t = this.getPixels(e).left;
3096
- else if ("string" == typeof e)
3097
- t = this.getPixels(new DayPilot.Date(e)).left;
3098
- else {
3099
- if ("number" != typeof e)
3100
- throw new DayPilot.Exception("Invalid scrollTo() parameter. Accepted parameters: string (ISO date), number (pixels), DayPilot.Date object");
3101
- t = e;
3102
- }
3103
- var n = s.se.clientWidth, a = s.nav.scroll.clientWidth;
3104
- t < 0 && (t = 0), t > n - a && (t = n - a), s.te(t);
3105
- } }, this.scrollToResource = function (e) {
3106
- DayPilot.complete(function () {
3093
+ this.scrollTo = function (e) { s.pe(e); }, this.pe = function (e) {
3094
+ if (e) {
3095
+ if (!s.Ra)
3096
+ return void (s.qe = e);
3107
3097
  var t;
3108
- if ("string" == typeof e || "number" == typeof e)
3109
- t = s.ve(e);
3098
+ if (e instanceof DayPilot.Date)
3099
+ t = this.getPixels(e).left;
3100
+ else if ("string" == typeof e)
3101
+ t = this.getPixels(new DayPilot.Date(e)).left;
3110
3102
  else {
3111
- if (!(e instanceof DayPilot.Row))
3112
- throw new DayPilot.Exception("Invalid scrollToResource() argument: id or DayPilot.Row expected");
3113
- t = s.ve(e.id);
3103
+ if ("number" != typeof e)
3104
+ throw new DayPilot.Exception("Invalid scrollTo() parameter. Accepted parameters: string (ISO date), number (pixels), DayPilot.Date object");
3105
+ t = e;
3114
3106
  }
3115
- t && setTimeout(function () { var e = t.top; s.nav.scroll.scrollTop = e; }, 100);
3116
- });
3117
- }, this.we = function () { if (this.floatingTimeHeaders && this.timeHeader) {
3107
+ var n = s.se.clientWidth, a = s.nav.scroll.clientWidth;
3108
+ t < 0 && (t = 0), t > n - a && (t = n - a), s.te(t);
3109
+ }
3110
+ }, this.scrollToResource = function (e) { DayPilot.complete(function () { var t; if ("string" == typeof e || "number" == typeof e)
3111
+ t = s.ve(e);
3112
+ else {
3113
+ if (!(e instanceof DayPilot.Row))
3114
+ throw new DayPilot.Exception("Invalid scrollToResource() argument: id or DayPilot.Row expected");
3115
+ t = s.ve(e.id);
3116
+ } t && setTimeout(function () { var e = t.top; s.nav.scroll.scrollTop = e; }, 100); }); }, this.we = function () { if (this.floatingTimeHeaders && this.timeHeader) {
3118
3117
  var e = s.xe();
3119
3118
  if (e) {
3120
3119
  s.ye();
@@ -3563,15 +3562,15 @@ var DayPilot = { Global: {} };
3563
3562
  var i = typeof a.id + "_" + a.id;
3564
3563
  c.rowcache[i] || (c.rowcache[i] = []), c.rowcache[i].push(a);
3565
3564
  }
3566
- } }, this.Qg = function (e) { var t = typeof e + "_" + e; return c.rowcache[t] || []; }, this.dg = function () {
3567
- for (var e = {}, t = 0; t < s.rowlist.length; t++) {
3568
- var n = s.rowlist[t], a = n.id;
3569
- if (e[a])
3570
- return !0;
3571
- e[a] = !0;
3572
- }
3573
- return !1;
3574
- }, this.Jb = function (e) { var t = this.Ib.events, n = this.events.list[e], a = {}; n instanceof DayPilot.Event && (n = n.data); for (var i in n)
3565
+ } }, this.Qg = function (e) {
3566
+ var t = typeof e + "_" + e;
3567
+ return c.rowcache[t] || [];
3568
+ }, this.dg = function () { for (var e = {}, t = 0; t < s.rowlist.length; t++) {
3569
+ var n = s.rowlist[t], a = n.id;
3570
+ if (e[a])
3571
+ return !0;
3572
+ e[a] = !0;
3573
+ } return !1; }, this.Jb = function (e) { var t = this.Ib.events, n = this.events.list[e], a = {}; n instanceof DayPilot.Event && (n = n.data); for (var i in n)
3575
3574
  a[i] = n[i]; if ("string" == typeof a.start && (a.start = new DayPilot.Date(a.start)), "string" == typeof a.end && (a.end = new DayPilot.Date(a.end)), "function" == typeof this.onBeforeEventRender) {
3576
3575
  var r = {};
3577
3576
  r.e = a, r.data = a, this.onBeforeEventRender(r);
@@ -3931,7 +3930,8 @@ var DayPilot = { Global: {} };
3931
3930
  var t = this.divCorner;
3932
3931
  e.className = this.M("_corner"), t.className = this.M("_corner_inner"), function () {
3933
3932
  var e = {};
3934
- e.control = s, e.backColor = null, e.html = s.cornerHtml, e.text = s.cornerText, e.verticalAlignment = null, e.horizontalAlignment = null, e.areas = null, "function" == typeof s.onBeforeCornerRender && s.onBeforeCornerRender(e);
3933
+ e.control = s, e.backColor = null, e.html = s.cornerHtml, e.text = s.cornerText, e.verticalAlignment = null, e.horizontalAlignment = null,
3934
+ e.areas = null, "function" == typeof s.onBeforeCornerRender && s.onBeforeCornerRender(e);
3935
3935
  var t = s.divCorner;
3936
3936
  if (t) {
3937
3937
  var n = s.jb(e.text, e.html), a = e.horizontalAlignment, i = e.verticalAlignment;