@daypilot/daypilot-lite-angular 5.0.0 → 5.1.0

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.
@@ -16,6 +16,8 @@ var DayPilot;
16
16
  cellWidth;
17
17
  cellsMarkBusiness;
18
18
  contextMenu;
19
+ cornerHtml;
20
+ cornerText;
19
21
  days;
20
22
  durationBarHeight;
21
23
  durationBarVisible;
@@ -78,6 +80,7 @@ var DayPilot;
78
80
  zoomPosition;
79
81
  onAfterUpdate;
80
82
  onBeforeCellRender;
83
+ onBeforeCornerRender;
81
84
  onBeforeEventRender;
82
85
  onBeforeRowHeaderRender;
83
86
  onBeforeTimeHeaderRender;
@@ -479,7 +482,7 @@ DayPilot Lite
479
482
  Copyright (c) 2005 - 2025 Annpoint s.r.o.
480
483
  https://www.daypilot.org/
481
484
  Licensed under Apache Software License 2.0
482
- Version: 2025.4.766-lite
485
+ Version: 2025.4.770-lite
483
486
  */
484
487
  "use strict";
485
488
  var DayPilot = { Global: {} };
@@ -3025,7 +3028,7 @@ var DayPilot = { Global: {} };
3025
3028
  DayPilot.Scheduler = function (i, o) {
3026
3029
  this.v = "${v}";
3027
3030
  var s = this;
3028
- this.isScheduler = !0, this.id = i, this.beforeCellRenderCaching = !0, this.businessBeginsHour = 9, this.businessEndsHour = 18, this.businessWeekends = !1, this.cellDuration = 60, this.cellGroupBy = "Day", this.cellSweeping = !0, this.cellSweepingCacheSize = 1e3, this.cellWidth = 40, this.cellsMarkBusiness = !0, this.cssClassPrefix = "scheduler_default", this.days = 1, this.durationBarHeight = 3, this.durationBarVisible = !0, this.dynamicEventRendering = "Progressive", this.dynamicEventRenderingMargin = 50, this.dynamicEventRenderingMarginX = null, this.dynamicEventRenderingMarginY = null, this.dynamicEventRenderingCacheSweeping = !1, this.dynamicEventRenderingCacheSize = 200, this.eventBorderRadius = null, this.eventEndSpec = "DateTime", this.eventHeight = 35, this.eventMinWidth = 1, this.eventPadding = null, this.eventResizeMargin = 5, this.eventTapAndHoldHandling = "Move", this.eventTextWrappingEnabled = !1, this.eventsLoadMethod = "GET", this.floatingEvents = !DayPilot.browser.ios, this.floatingTimeHeaders = !0, this.headerHeight = 30, this.heightSpec = "Max", this.height = 600, this.locale = "en-us", this.progressiveRowRendering = !0, this.progressiveRowRenderingPreload = 25, this.rowHeaderWidth = 80, this.rowMarginTop = 0, this.rowMarginBottom = 0, this.rowsLoadMethod = "GET", this.scale = "CellDuration", this.scrollDelayEvents = 200, this.scrollDelayCells = DayPilot.browser.ios ? 100 : 0, this.scrollDelayFloats = 0, this.scrollDelayRows = 0, this.showToolTip = !0, this.snapToGrid = !0, this.startDate = DayPilot.Date.today(), this.tapAndHoldTimeout = 300, this.timeHeaders = [{ "groupBy": "Default" }, { "groupBy": "Cell" }], this.timeHeaderTextWrappingEnabled = !1, this.timeFormat = "Auto", this.useEventBoxes = "Always", this.visible = !0, this.weekStarts = "Auto", this.width = null, this.xssProtection = "Enabled", this.zoomLevels = [], this.zoomPosition = "left", this.eventClickHandling = "Enabled", this.eventDeleteHandling = "Disabled", this.eventMoveHandling = "Update", this.eventResizeHandling = "Update", this.eventRightClickHandling = "ContextMenu", this.timeHeaderClickHandling = "Enabled", this.timeHeaderRightClickHandling = "Enabled", this.timeRangeClickHandling = "Enabled", this.timeRangeSelectedHandling = "Enabled", this.onEventClick = null, this.onEventClicked = null, this.onEventMove = null, this.onEventMoved = null, this.onEventResize = null, this.onEventResized = null, this.onRowClick = null, this.onRowClicked = null, this.onTimeHeaderClick = null, this.onTimeHeaderClicked = null, this.onTimeHeaderRightClick = null, this.onTimeHeaderRightClicked = null, this.onTimeRangeClick = null, this.onTimeRangeClicked = null, this.onTimeRangeSelect = null, this.onTimeRangeSelected = null, this.onBeforeCellRender = null, this.onBeforeEventRender = null, this.onBeforeRowHeaderRender = null, this.onBeforeTimeHeaderRender = null, this.onAfterUpdate = null, this.Q = !1, this.ce = -1, this.ee = !0, this.rowlist = [], this.events = {}, this.cells = {}, this.elements = {}, this.elements.events = [], this.elements.bars = [], this.elements.text = [], this.elements.cells = [], this.elements.linesVertical = [], this.elements.range = [], this.elements.timeHeader = [], this.xb = {}, this.xb.cells = [], this.xb.linesVertical = {}, this.xb.linesHorizontal = {}, this.xb.timeHeaderGroups = [], this.xb.timeHeader = {}, this.xb.events = [], this.nav = {}, this.R = {};
3031
+ this.isScheduler = !0, this.id = i, this.beforeCellRenderCaching = !0, this.businessBeginsHour = 9, this.businessEndsHour = 18, this.businessWeekends = !1, this.cellDuration = 60, this.cellGroupBy = "Day", this.cellSweeping = !0, this.cellSweepingCacheSize = 1e3, this.cellWidth = 40, this.cellsMarkBusiness = !0, this.cornerText = null, this.cornerHtml = null, this.cssClassPrefix = "scheduler_default", this.days = 1, this.durationBarHeight = 3, this.durationBarVisible = !0, this.dynamicEventRendering = "Progressive", this.dynamicEventRenderingMargin = 50, this.dynamicEventRenderingMarginX = null, this.dynamicEventRenderingMarginY = null, this.dynamicEventRenderingCacheSweeping = !1, this.dynamicEventRenderingCacheSize = 200, this.eventBorderRadius = null, this.eventEndSpec = "DateTime", this.eventHeight = 35, this.eventMinWidth = 1, this.eventPadding = null, this.eventResizeMargin = 5, this.eventTapAndHoldHandling = "Move", this.eventTextWrappingEnabled = !1, this.eventsLoadMethod = "GET", this.floatingEvents = !DayPilot.browser.ios, this.floatingTimeHeaders = !0, this.headerHeight = 30, this.heightSpec = "Max", this.height = 600, this.locale = "en-us", this.progressiveRowRendering = !0, this.progressiveRowRenderingPreload = 25, this.rowHeaderWidth = 80, this.rowMarginTop = 0, this.rowMarginBottom = 0, this.rowsLoadMethod = "GET", this.scale = "CellDuration", this.scrollDelayEvents = 200, this.scrollDelayCells = DayPilot.browser.ios ? 100 : 0, this.scrollDelayFloats = 0, this.scrollDelayRows = 0, this.showToolTip = !0, this.snapToGrid = !0, this.startDate = DayPilot.Date.today(), this.tapAndHoldTimeout = 300, this.timeHeaders = [{ "groupBy": "Default" }, { "groupBy": "Cell" }], this.timeHeaderTextWrappingEnabled = !1, this.timeFormat = "Auto", this.useEventBoxes = "Always", this.visible = !0, this.weekStarts = "Auto", this.width = null, this.xssProtection = "Enabled", this.zoomLevels = [], this.zoomPosition = "left", this.eventClickHandling = "Enabled", this.eventDeleteHandling = "Disabled", this.eventMoveHandling = "Update", this.eventResizeHandling = "Update", this.eventRightClickHandling = "ContextMenu", this.timeHeaderClickHandling = "Enabled", this.timeHeaderRightClickHandling = "Enabled", this.timeRangeClickHandling = "Enabled", this.timeRangeSelectedHandling = "Enabled", this.onEventClick = null, this.onEventClicked = null, this.onEventMove = null, this.onEventMoved = null, this.onEventResize = null, this.onEventResized = null, this.onRowClick = null, this.onRowClicked = null, this.onTimeHeaderClick = null, this.onTimeHeaderClicked = null, this.onTimeHeaderRightClick = null, this.onTimeHeaderRightClicked = null, this.onTimeRangeClick = null, this.onTimeRangeClicked = null, this.onTimeRangeSelect = null, this.onTimeRangeSelected = null, this.onBeforeCellRender = null, this.onBeforeCornerRender = null, this.onBeforeEventRender = null, this.onBeforeRowHeaderRender = null, this.onBeforeTimeHeaderRender = null, this.onAfterUpdate = null, this.Q = !1, this.ce = -1, this.ee = !0, this.rowlist = [], this.events = {}, this.cells = {}, this.elements = {}, this.elements.events = [], this.elements.bars = [], this.elements.text = [], this.elements.cells = [], this.elements.linesVertical = [], this.elements.range = [], this.elements.timeHeader = [], this.xb = {}, this.xb.cells = [], this.xb.linesVertical = {}, this.xb.linesHorizontal = {}, this.xb.timeHeaderGroups = [], this.xb.timeHeader = {}, this.xb.events = [], this.nav = {}, this.R = {};
3029
3032
  var l = this.R;
3030
3033
  this.fe = {};
3031
3034
  var d = s.fe;
@@ -3176,7 +3179,7 @@ var DayPilot = { Global: {} };
3176
3179
  i ? i.show(t) : s.contextMenu && s.contextMenu.show(this.event);
3177
3180
  }
3178
3181
  return "function" == typeof s.onEventRightClicked && s.onEventRightClicked(n), !1;
3179
- } }, this.Oe = function (e) { var t = s.Re(), n = 60 * t * 1e3; return { start: s.startDate.addTime(e * n), end: s.startDate.addTime((e + 1) * n), left: e * s.cellWidth, width: s.cellWidth }; }, this.Ve = function (e, t) { if ("boolean" == typeof t)
3182
+ } }, this.Oe = function (e) { var t = s.Re(), n = 60 * t * 1e3, i = s.startDate; return { start: i.addTime(e * n), end: i.addTime((e + 1) * n), left: e * s.cellWidth, width: s.cellWidth }; }, this.Ve = function (e, t) { if ("boolean" == typeof t)
3180
3183
  throw new DayPilot.Exception("Invalid _eventClickSingle parameters"); var n = e.event; if (n) {
3181
3184
  var i = t.ctrlKey, a = t.metaKey;
3182
3185
  if (n.client.clickEnabled()) {
@@ -3198,7 +3201,7 @@ var DayPilot = { Global: {} };
3198
3201
  n = s.Xe(n);
3199
3202
  var r = {};
3200
3203
  r.e = e, r.async = !1, r.loaded = function () { a(); }, r.newStart = t, r.newEnd = n, r.what = i, r.preventDefault = function () { this.preventDefault.value = !0; }, r.control = s, r.toJSON = function () { return DayPilot.Util.copyProps(r, {}, ["e", "async", "newStart", "newEnd"]); }, "function" == typeof s.onEventResize && s.onEventResize(r), r.async || a();
3201
- } }, this.qb = function (e) { e = e || {}, clearTimeout(s.Ze), s.timeHeader = null, s.cellProperties = {}, s.Je(), s.$e(), s.events._e(), s.R.Ld(), s.clearSelection(), s.ha(), s.af(), s.bf(), s.rb(), s.cf(), s.df(), s.ef(), s.ia(), s.Z(), s.ff(), s.gf = {}, s.hf(), s.ma(), s.if(), e.immediateEvents ? s.na() : setTimeout(function () { s.na(); }, 100), this.visible ? s.ee !== s.visible && this.show() : this.hide(), this.ee = this.visible, this.se(), s.jf(), this.kf(); }, this.kf = function () { if ("function" == typeof s.onAfterUpdate) {
3204
+ } }, this.qb = function (e) { e = e || {}, clearTimeout(s.Ze), s.timeHeader = null, s.cellProperties = {}, s.Je(), s.$e(), s.events._e(), s.R.Ld(), s.clearSelection(), s.ha(), s.af(), s.bf(), s.db(), s.rb(), s.cf(), s.df(), s.ef(), s.ia(), s.Z(), s.ff(), s.gf = {}, s.hf(), s.ma(), s.if(), e.immediateEvents ? s.na() : setTimeout(function () { s.na(); }, 100), this.visible ? s.ee !== s.visible && this.show() : this.hide(), this.ee = this.visible, this.se(), s.jf(), this.kf(); }, this.kf = function () { if ("function" == typeof s.onAfterUpdate) {
3202
3205
  var e = {};
3203
3206
  s.onAfterUpdate(e);
3204
3207
  } }, this.update = function (e) {
@@ -3858,7 +3861,32 @@ var DayPilot = { Global: {} };
3858
3861
  d.current && (i = d.current.end);
3859
3862
  break;
3860
3863
  default: throw n ? new DayPilot.Exception("Invalid scale value: " + t) : new DayPilot.Exception("Invalid groupBy value: " + t);
3861
- } return i.getTime() > a.getTime() && (i = a), i; }, this.Uh = function (e, t) { var n = this.nav.timeHeader, i = this.timeHeader[t][e], a = t < this.timeHeader.length - 1, o = i.left, l = i.width, d = t * s.headerHeight, c = s.headerHeight, u = r(); u.style.position = "absolute", u.style.top = d + "px", u.style.left = o + "px", u.style.width = l + "px", u.style.height = c + "px", i.toolTip && (u.title = i.toolTip), u.setAttribute("aria-hidden", "true"), i.cssClass && DayPilot.Util.addClass(u, i.cssClass), u.style.userSelect = "none", u.style.webkitUserSelect = "none", u.oncontextmenu = function () { return !1; }, u.cell = {}, u.cell.start = i.start, u.cell.end = i.end, u.cell.level = t, u.cell.th = i, u.onclick = this.Fg, u.oncontextmenu = this.Gg, DayPilot.rePassive(u, DayPilot.touch.start, function (e) { e.stopPropagation(); }), u.style.overflow = "hidden", s.timeHeaderTextWrappingEnabled || (u.style.whiteSpace = "nowrap"); var h = r(); h.innerHTML = s.$a(i.text, i.html), i.backColor && (h.style.background = i.backColor), i.fontColor && (h.style.color = i.fontColor); var f = this.L("_timeheadercol"), v = this.L("_timeheadercol_inner"); a && (f = this.L("_timeheadergroup"), v = this.L("_timeheadergroup_inner")), DayPilot.Util.addClass(u, f), DayPilot.Util.addClass(h, v), DayPilot.Util.addClass(u, s.L("_timeheader_cell")), DayPilot.Util.addClass(h, s.L("_timeheader_cell_inner")), u.appendChild(h), DayPilot.Areas.attach(u, i, { areas: i.areas }), this.xb.timeHeader[e + "_" + t] = u, this.elements.timeHeader.push(u), n.appendChild(u); }, this.fg = function () { s.rowlist.forEach(function (e) { var t = e.getHeight() + s.rowMarginTop + s.rowMarginBottom; e.height !== t && (s.qf = !0), e.height = t; }), s.qf && (s.xb.drawArea = null); }, this.df = function () { s.rowlist.forEach(function (e) { var t = s.divHeader; if (t) {
3864
+ } return i.getTime() > a.getTime() && (i = a), i; }, this.Uh = function (e, t) { var n = this.nav.timeHeader, i = this.timeHeader[t][e], a = t < this.timeHeader.length - 1, o = i.left, l = i.width, d = t * s.headerHeight, c = s.headerHeight, u = r(); u.style.position = "absolute", u.style.top = d + "px", u.style.left = o + "px", u.style.width = l + "px", u.style.height = c + "px", i.toolTip && (u.title = i.toolTip), u.setAttribute("aria-hidden", "true"), i.cssClass && DayPilot.Util.addClass(u, i.cssClass), u.style.userSelect = "none", u.style.webkitUserSelect = "none", u.oncontextmenu = function () { return !1; }, u.cell = {}, u.cell.start = i.start, u.cell.end = i.end, u.cell.level = t, u.cell.th = i, u.onclick = this.Fg, u.oncontextmenu = this.Gg, DayPilot.rePassive(u, DayPilot.touch.start, function (e) { e.stopPropagation(); }), u.style.overflow = "hidden", s.timeHeaderTextWrappingEnabled || (u.style.whiteSpace = "nowrap"); var h = r(); h.innerHTML = s.$a(i.text, i.html), i.backColor && (h.style.background = i.backColor), i.fontColor && (h.style.color = i.fontColor); var f = this.L("_timeheadercol"), v = this.L("_timeheadercol_inner"); a && (f = this.L("_timeheadergroup"), v = this.L("_timeheadergroup_inner")), DayPilot.Util.addClass(u, f), DayPilot.Util.addClass(h, v), DayPilot.Util.addClass(u, s.L("_timeheader_cell")), DayPilot.Util.addClass(h, s.L("_timeheader_cell_inner")), u.appendChild(h), DayPilot.Areas.attach(u, i, { areas: i.areas }), this.xb.timeHeader[e + "_" + t] = u, this.elements.timeHeader.push(u), n.appendChild(u); }, this.db = function () { var e = this.nav.corner; if (e) {
3865
+ var t = this.divCorner;
3866
+ e.className = this.L("_corner"), t.className = this.L("_corner_inner"), function () { var e = {}; 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); var t = s.divCorner; if (t) {
3867
+ var n = s.$a(e.text, e.html), i = e.horizontalAlignment, a = e.verticalAlignment;
3868
+ if (t.innerHTML = n || "", e.backColor && (t.style.background = e.backColor), i || a) {
3869
+ switch (t.style.display = "flex", i) {
3870
+ case "right":
3871
+ t.style.justifyContent = "flex-end";
3872
+ break;
3873
+ case "left":
3874
+ t.style.justifyContent = "flex-start";
3875
+ break;
3876
+ case "center": t.style.justifyContent = "center";
3877
+ }
3878
+ switch (a) {
3879
+ case "center":
3880
+ t.style.alignItems = "center";
3881
+ break;
3882
+ case "top":
3883
+ t.style.alignItems = "flex-start";
3884
+ break;
3885
+ case "bottom": t.style.alignItems = "flex-end";
3886
+ }
3887
+ }
3888
+ } e.areas && DayPilot.Areas.attach(s.nav.corner, {}, { "areas": e.areas }); }();
3889
+ } }, this.fg = function () { s.rowlist.forEach(function (e) { var t = e.getHeight() + s.rowMarginTop + s.rowMarginBottom; e.height !== t && (s.qf = !0), e.height = t; }), s.qf && (s.xb.drawArea = null); }, this.df = function () { s.rowlist.forEach(function (e) { var t = s.divHeader; if (t) {
3862
3890
  var n = e.index;
3863
3891
  if (t.rows[n]) {
3864
3892
  var i = t.rows[n];
@@ -3916,7 +3944,7 @@ var DayPilot = { Global: {} };
3916
3944
  var a = s.zoom.ei(e);
3917
3945
  i = s.zoomLevels[a];
3918
3946
  } if (!i)
3919
- throw new DayPilot.Exception("Zoom level not found: " + e + " (" + typeof e + ")"); (e !== s.zoom.active || n) && (n || (n = s.zoom.Qd(t)), n && (s.startDate = n), s.zoom.fi(e, n), s.La && s.update(), n && s.scrollTo(n, null, t || s.zoomPosition)); }, this.zoom.ei = function (e) { return (s.zoomLevels || []).findIndex(function (t) { return t.id === e; }); }, this.zoom.Qd = function (e) { e = e || s.zoomPosition || "left"; var t = null; if (!s.nav.scroll)
3947
+ throw new DayPilot.Exception("Zoom level not found: " + e + " (" + typeof e + ")"); (e !== s.zoom.active || n) && (n || (n = s.zoom.Qd(t)), n && (s.startDate = new DayPilot.Date(n).getDatePart()), s.zoom.fi(e, n), s.La && s.update(), n && s.scrollTo(n, null, t || s.zoomPosition)); }, this.zoom.ei = function (e) { return (s.zoomLevels || []).findIndex(function (t) { return t.id === e; }); }, this.zoom.Qd = function (e) { e = e || s.zoomPosition || "left"; var t = null; if (!s.nav.scroll)
3920
3948
  return null; var n = s.getViewport(); switch (e) {
3921
3949
  case "left":
3922
3950
  t = n.start;
@@ -3974,77 +4002,73 @@ var DayPilot = { Global: {} };
3974
4002
  var i = e[n];
3975
4003
  i.top = t, t += i.height;
3976
4004
  } return t; }, this.ff = function () { s.elements.cells = [], s.xb.cells = [], s.divCells.innerHTML = "", s.mi(); }, this.mi = function () { s.divLines.innerHTML = "", s.xb.linesVertical = {}, s.xb.linesHorizontal = {}, s.elements.linesVertical = []; }, this.uf = function (e) { var t = []; for (var n in s.xb.cells)
3977
- t.push(s.xb.cells[n]); t.filter(function (t) { return t && t.coords && t.coords.y === e; }).forEach(function (e) { s.fb(e); }); }, this.gd = function (e, t) { if (this.La) {
3978
- var n = s.Oe(e);
3979
- if (n) {
3980
- var i = s.rowlist, a = s.divCells, o = e + "_" + t;
3981
- if (!this.xb.cells[o]) {
3982
- var l = this.ni(e, t), d = s.oi(e, t), c = r();
3983
- if (c.style.left = n.left + "px", c.style.top = i[t].top + "px", c.style.width = n.width + "px", c.style.height = i[t].height + "px", c.style.position = "absolute", l && l.backColor && (c.style.backgroundColor = l.backColor), c.className = this.L("_cell"), c.coords = {}, c.coords.x = e, c.coords.y = t, l) {
3984
- if (l.cssClass && DayPilot.Util.addClass(c, l.cssClass), c.innerHTML = s.$a(l.text, l.html), l.backImage && (c.style.backgroundImage = 'url("' + l.backImage + '")'), l.backRepeat && (c.style.backgroundRepeat = l.backRepeat), l.business && s.cellsMarkBusiness && DayPilot.Util.addClass(c, s.L("_cell_business")), l.disabled && DayPilot.Util.addClass(c, s.L("_cell_disabled")), l.backColor && (c.style.backgroundColor = l.backColor), l.fontColor && (c.style.color = l.fontColor), l.horizontalAlignment || l.verticalAlignment) {
3985
- switch (c.style.display = "flex", l.horizontalAlignment) {
3986
- case "right":
3987
- c.style.justifyContent = "flex-end";
3988
- break;
3989
- case "left":
3990
- c.style.justifyContent = "flex-start";
3991
- break;
3992
- case "center": c.style.justifyContent = "center";
3993
- }
3994
- switch (l.verticalAlignment) {
3995
- case "center":
3996
- c.style.alignItems = "center";
3997
- break;
3998
- case "top":
3999
- c.style.alignItems = "flex-start";
4000
- break;
4001
- case "bottom": c.style.alignItems = "flex-end";
4002
- }
4003
- }
4004
- DayPilot.Areas.attach(c, d.cell, { "areas": l.areas });
4005
- }
4006
- var u = { start: n.start, end: n.end, resource: i[t].id, div: c, properties: l, x: e, y: t };
4007
- !function () { if ("function" == typeof s.onBeforeCellDomAdd || "function" == typeof s.onBeforeCellDomRemove) {
4008
- var e = {};
4009
- if (e.control = s, e.cell = u, e.element = null, c.domArgs = e, "function" == typeof s.onBeforeCellDomAdd && s.onBeforeCellDomAdd(e), e.element) {
4010
- var t = c;
4011
- if (t) {
4012
- e.Pa = t;
4013
- var n = DayPilot.Util.isReactComponent(e.element), i = DayPilot.Util.isVueVNode(e.element);
4014
- if (n) {
4015
- if (!s.zd.reactDOM)
4016
- throw new DayPilot.Exception("Can't reach ReactDOM");
4017
- s.zd.Uc(e.element, t);
4005
+ t.push(s.xb.cells[n]); t.filter(function (t) { return t && t.coords && t.coords.y === e; }).forEach(function (e) { s.fb(e); }); }, this.gd = function (e, t) {
4006
+ if (this.La) {
4007
+ var n = s.Oe(e);
4008
+ if (n) {
4009
+ var i = s.rowlist, a = s.divCells, o = e + "_" + t;
4010
+ if (!this.xb.cells[o]) {
4011
+ var l = this.ni(e, t), d = s.oi(e, t), c = r();
4012
+ if (c.style.left = n.left + "px", c.style.top = i[t].top + "px", c.style.width = n.width + "px", c.style.height = i[t].height + "px", c.style.position = "absolute", l && l.backColor && (c.style.backgroundColor = l.backColor), c.className = this.L("_cell"), c.coords = {}, c.coords.x = e, c.coords.y = t, l) {
4013
+ if (l.cssClass && DayPilot.Util.addClass(c, l.cssClass), c.innerHTML = s.$a(l.text, l.html), l.backImage && (c.style.backgroundImage = 'url("' + l.backImage + '")'), l.backRepeat && (c.style.backgroundRepeat = l.backRepeat), l.business && s.cellsMarkBusiness && DayPilot.Util.addClass(c, s.L("_cell_business")), l.disabled && DayPilot.Util.addClass(c, s.L("_cell_disabled")), l.backColor && (c.style.backgroundColor = l.backColor), l.fontColor && (c.style.color = l.fontColor), l.horizontalAlignment || l.verticalAlignment) {
4014
+ switch (c.style.display = "flex", l.horizontalAlignment) {
4015
+ case "right":
4016
+ c.style.justifyContent = "flex-end";
4017
+ break;
4018
+ case "left":
4019
+ c.style.justifyContent = "flex-start";
4020
+ break;
4021
+ case "center": c.style.justifyContent = "center";
4018
4022
  }
4019
- else if (i) {
4020
- if (!s.Ra.Qa)
4021
- throw new DayPilot.Exception("Can't reach Vue");
4022
- s.Ra.Sa = !0, s.Ra.Va(e.element, t), s.Ra.Sa = !1;
4023
+ switch (l.verticalAlignment) {
4024
+ case "center":
4025
+ c.style.alignItems = "center";
4026
+ break;
4027
+ case "top":
4028
+ c.style.alignItems = "flex-start";
4029
+ break;
4030
+ case "bottom": c.style.alignItems = "flex-end";
4023
4031
  }
4024
- else
4025
- t.appendChild(e.element);
4026
4032
  }
4033
+ DayPilot.Areas.attach(c, d.cell, { "areas": l.areas });
4027
4034
  }
4028
- } }(), a.appendChild(c), this.elements.cells.push(c), this.xb.cells[o] = c;
4035
+ var u = { start: n.start, end: n.end, resource: i[t].id, div: c, properties: l, x: e, y: t };
4036
+ !function () {
4037
+ if ("function" == typeof s.onBeforeCellDomAdd || "function" == typeof s.onBeforeCellDomRemove) {
4038
+ var e = {};
4039
+ if (e.control = s, e.cell = u, e.element = null, c.domArgs = e, "function" == typeof s.onBeforeCellDomAdd && s.onBeforeCellDomAdd(e), e.element) {
4040
+ var t = c;
4041
+ if (t) {
4042
+ e.Pa = t;
4043
+ var n = DayPilot.Util.isReactComponent(e.element), i = DayPilot.Util.isVueVNode(e.element);
4044
+ if (n) {
4045
+ if (!s.zd.reactDOM)
4046
+ throw new DayPilot.Exception("Can't reach ReactDOM");
4047
+ s.zd.Uc(e.element, t);
4048
+ }
4049
+ else if (i) {
4050
+ if (!s.Ra.Qa)
4051
+ throw new DayPilot.Exception("Can't reach Vue");
4052
+ s.Ra.Sa = !0, s.Ra.Va(e.element, t), s.Ra.Sa = !1;
4053
+ }
4054
+ else
4055
+ t.appendChild(e.element);
4056
+ }
4057
+ }
4058
+ }
4059
+ }(), a.appendChild(c), this.elements.cells.push(c), this.xb.cells[o] = c;
4060
+ }
4029
4061
  }
4030
4062
  }
4031
- } }, this.oi = function (e, t) { var n = s.Oe(e); if (!n)
4063
+ }, this.oi = function (e, t) { var n = s.Oe(e); if (!n)
4032
4064
  return null; var i = s.rowlist[t], a = i.id, r = n.start, o = n.end, l = {}; if (l.cell = { x: e, y: t, start: r, end: o, resource: a, row: s.Eg(i), properties: s.ni(e, t) }, l.control = s, "function" == typeof this.onBeforeCellRender) {
4033
4065
  var d = e + "_" + t;
4034
4066
  if (s.beforeCellRenderCaching && s.gf[d])
4035
4067
  return l;
4036
4068
  s.gf[d] = !0, this.onBeforeCellRender(l);
4037
- } return l; }, this.clearSelection = function () { this.pi(); }, this.qi = function (e, t, n) {
4038
- e = new DayPilot.Date(e), t = new DayPilot.Date(t);
4039
- var i = s.le(n), a = s.Qe(e);
4040
- if (!a.current)
4041
- throw new DayPilot.Exception("Time range selection 'start' out of timeline");
4042
- var r = s.Qe(new DayPilot.Date(t).addMilliseconds(-1));
4043
- if (!r.current)
4044
- throw new DayPilot.Exception("Time range selection 'end' out of timeline");
4045
- var o = {};
4046
- return o.start = { y: i.index, x: a.i, "time": e }, o.end = { x: r.i, "time": t }, o.calendar = this, o;
4047
- }, this.selectTimeRange = function (e, t, n, i) { var a = s.qi(e, t, n); s.Ef(a), i || setTimeout(function () { s.Af(a); }, 0); }, this.yf = function () { var e = t.sg && t.sg.source; e && DayPilot.Util.removeClass(e, s.L("_event_moving_source")), DayPilot.de(t.sg), t.sg = null, DayPilot.Global.movingLink && (DayPilot.Global.movingLink.clear(), DayPilot.Global.movingLink = null); }, this.pi = function () { s.divShadow && (s.divShadow.innerHTML = ""), s.elements.range = [], s.elements.range2 = null, s.Df = null, s.ri = null; }, l.Ld = function () { delete s.xb.headerHeight; }, l.da = function () { return "Disabled" !== s.xssProtection; }, l.Le = function () { return DayPilot.Locale.find(s.locale); }, l.Vh = function () { return "Auto" !== s.timeFormat ? s.timeFormat : l.Le().timeFormat; }, l.ea = function () { if ("Auto" === s.weekStarts) {
4069
+ } return l; }, this.clearSelection = function () { this.pi(); }, this.qi = function (e, t, n) { e = new DayPilot.Date(e), t = new DayPilot.Date(t); var i = s.le(n), a = s.Qe(e); if (!a.current)
4070
+ throw new DayPilot.Exception("Time range selection 'start' out of timeline"); var r = s.Qe(new DayPilot.Date(t).addMilliseconds(-1)); if (!r.current)
4071
+ throw new DayPilot.Exception("Time range selection 'end' out of timeline"); var o = {}; return o.start = { y: i.index, x: a.i, "time": e }, o.end = { x: r.i, "time": t }, o.calendar = this, o; }, this.selectTimeRange = function (e, t, n, i) { var a = s.qi(e, t, n); s.Ef(a), i || setTimeout(function () { s.Af(a); }, 0); }, this.yf = function () { var e = t.sg && t.sg.source; e && DayPilot.Util.removeClass(e, s.L("_event_moving_source")), DayPilot.de(t.sg), t.sg = null, DayPilot.Global.movingLink && (DayPilot.Global.movingLink.clear(), DayPilot.Global.movingLink = null); }, this.pi = function () { s.divShadow && (s.divShadow.innerHTML = ""), s.elements.range = [], s.elements.range2 = null, s.Df = null, s.ri = null; }, l.Ld = function () { delete s.xb.headerHeight; }, l.da = function () { return "Disabled" !== s.xssProtection; }, l.Le = function () { return DayPilot.Locale.find(s.locale); }, l.Vh = function () { return "Auto" !== s.timeFormat ? s.timeFormat : l.Le().timeFormat; }, l.ea = function () { if ("Auto" === s.weekStarts) {
4048
4072
  var e = l.Le();
4049
4073
  return e ? e.weekStarts : 0;
4050
4074
  } return s.weekStarts || 0; }, l.Bg = function () { var e = navigator.userAgent.toLowerCase(); return e.indexOf("mobile") !== -1 || e.indexOf("android") != -1; }, l.ig = function (e) { return "Always" === s.useEventBoxes || "Never" !== s.useEventBoxes && e < 60 * s.Re() * 1e3; }, l.zh = function () { var e = s.dynamicEventRenderingMarginX; if ("number" == typeof e)