@daypilot/daypilot-lite-angular 5.0.0-sandbox.760 → 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;
|
|
@@ -74,8 +76,11 @@ var DayPilot;
|
|
|
74
76
|
weekStarts;
|
|
75
77
|
width;
|
|
76
78
|
xssProtection;
|
|
79
|
+
zoomLevels;
|
|
80
|
+
zoomPosition;
|
|
77
81
|
onAfterUpdate;
|
|
78
82
|
onBeforeCellRender;
|
|
83
|
+
onBeforeCornerRender;
|
|
79
84
|
onBeforeEventRender;
|
|
80
85
|
onBeforeRowHeaderRender;
|
|
81
86
|
onBeforeTimeHeaderRender;
|
|
@@ -103,12 +108,14 @@ var DayPilot;
|
|
|
103
108
|
DayPilot.SchedulerPropsAndEvents = SchedulerPropsAndEvents;
|
|
104
109
|
class SchedulerConfig extends SchedulerPropsAndEvents {
|
|
105
110
|
events;
|
|
111
|
+
zoom;
|
|
106
112
|
}
|
|
107
113
|
DayPilot.SchedulerConfig = SchedulerConfig;
|
|
108
114
|
class Scheduler extends SchedulerPropsAndEvents {
|
|
109
115
|
v;
|
|
110
116
|
events;
|
|
111
117
|
rows;
|
|
118
|
+
zoom;
|
|
112
119
|
}
|
|
113
120
|
DayPilot.Scheduler = Scheduler;
|
|
114
121
|
class Row {
|
|
@@ -475,7 +482,7 @@ DayPilot Lite
|
|
|
475
482
|
Copyright (c) 2005 - 2025 Annpoint s.r.o.
|
|
476
483
|
https://www.daypilot.org/
|
|
477
484
|
Licensed under Apache Software License 2.0
|
|
478
|
-
Version: 2025.4.
|
|
485
|
+
Version: 2025.4.770-lite
|
|
479
486
|
*/
|
|
480
487
|
"use strict";
|
|
481
488
|
var DayPilot = { Global: {} };
|
|
@@ -1626,21 +1633,22 @@ var DayPilot = { Global: {} };
|
|
|
1626
1633
|
t.mouse = null, t.menu = null, t.handlersRegistered = !1, t.hideTimeout = null, t.waitingSubmenu = null, DayPilot.Menu = function (n) { var i = this, a = null; this.v = "${v}", this.zIndex = 120, this.cssClassPrefix = "menu_default", this.cssOnly = !0, this.menuTitle = null, this.showMenuTitle = !1, this.hideOnMouseOut = !1, this.hideAfter = 200, this.theme = null, this.onShow = null; var r = DayPilot.isArray(n) ? null : n; if (this.Qb = function () { }, n && DayPilot.isArray(n) && (this.items = n), this.toJSON = function () { return null; }, this.show = function (n, r) { r = r || {}; var o = null; if (n ? "string" == typeof n.id || "number" == typeof n.id ? o = n.id : "function" == typeof n.id ? o = n.id() : "function" == typeof n.value && (o = n.value()) : o = null, "undefined" != typeof DayPilot.Bubble && DayPilot.Bubble.hideActive(), r.submenu || t.menuClean(), this.Qb.submenu = null, null !== t.mouse) {
|
|
1627
1634
|
i.cssOnly || (i.cssOnly = !0);
|
|
1628
1635
|
var s = null;
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1636
|
+
n && n.isRow && n.$.row.task ? (s = new DayPilot.Task(n.$.row.task, n.calendar), s.menuType = "resource") : s = n && n.isEvent && n.data.task ? new DayPilot.Task(n, n.calendar) : n;
|
|
1637
|
+
var l = document.createElement("div");
|
|
1638
|
+
if ("function" == typeof i.onShow) {
|
|
1639
|
+
var d = {};
|
|
1640
|
+
if (d.source = s, d.menu = i, d.div = l, d.preventDefault = function () { d.preventDefault.value = !0; }, i.onShow(d), d.preventDefault.value)
|
|
1632
1641
|
return;
|
|
1633
1642
|
}
|
|
1634
|
-
|
|
1635
|
-
if (d.style.position = "absolute", d.style.top = "0px", d.style.left = "0px", d.style.display = "none", d.style.overflow = "hidden", d.style.zIndex = this.zIndex + 1, d.className = this.Rb("main"), d.onclick = function (e) { e.cancelBubble = !0, this.parentNode.removeChild(this); }, this.hideOnMouseOut && (d.onmousemove = function () { clearTimeout(t.hideTimeout); }, d.onmouseleave = function () { i.delayedHide({ "hideParent": !0 }); }), !this.items || 0 === this.items.length)
|
|
1643
|
+
if (l.style.position = "absolute", l.style.top = "0px", l.style.left = "0px", l.style.display = "none", l.style.overflow = "hidden", l.style.zIndex = this.zIndex + 1, l.className = this.Rb("main"), l.onclick = function (e) { e.cancelBubble = !0, this.parentNode.removeChild(this); }, this.hideOnMouseOut && (l.onmousemove = function () { clearTimeout(t.hideTimeout); }, l.onmouseleave = function () { i.delayedHide({ "hideParent": !0 }); }), !this.items || 0 === this.items.length)
|
|
1636
1644
|
throw "No menu items defined.";
|
|
1637
1645
|
if (this.showMenuTitle) {
|
|
1638
1646
|
var c = document.createElement("div");
|
|
1639
|
-
c.innerHTML = this.menuTitle, c.className = this.Rb("title"),
|
|
1647
|
+
c.innerHTML = this.menuTitle, c.className = this.Rb("title"), l.appendChild(c);
|
|
1640
1648
|
}
|
|
1641
1649
|
for (var u = 0; u < this.items.length; u++) {
|
|
1642
1650
|
var h = this.items[u], f = document.createElement("div");
|
|
1643
|
-
if (DayPilot.Util.addClass(f, this.Rb("item")), h.items && (DayPilot.Util.addClass(f, this.Rb("item_haschildren")), DayPilot.Util.addClass(
|
|
1651
|
+
if (DayPilot.Util.addClass(f, this.Rb("item")), h.items && (DayPilot.Util.addClass(f, this.Rb("item_haschildren")), DayPilot.Util.addClass(l, this.Rb("withchildren"))), "undefined" != typeof h && !h.hidden) {
|
|
1644
1652
|
if ("-" === h.text) {
|
|
1645
1653
|
var v = document.createElement("div");
|
|
1646
1654
|
v.addEventListener("click", function (e) { e.stopPropagation(); }), f.appendChild(v);
|
|
@@ -1720,13 +1728,13 @@ var DayPilot = { Global: {} };
|
|
|
1720
1728
|
} e.disabled || (t.waitingSubmenu = {}, t.waitingSubmenu.parent = a, t.waitingSubmenu.timeout = setTimeout(function () { t.waitingSubmenu = null, i.Sb(a, n); }, 300)); }; };
|
|
1721
1729
|
p.onmouseover = M(h, p), f.appendChild(p);
|
|
1722
1730
|
}
|
|
1723
|
-
|
|
1731
|
+
l.appendChild(f);
|
|
1724
1732
|
}
|
|
1725
1733
|
}
|
|
1726
1734
|
var T = function () { window.setTimeout(function () { t.menuClean(), DayPilot.MenuBar.deactivate(); }, 100); };
|
|
1727
|
-
|
|
1728
|
-
var A =
|
|
1729
|
-
|
|
1735
|
+
l.onclick = T, l.ontouchend = T, l.onmousedown = function (e) { e.stopPropagation(); }, l.oncontextmenu = function () { return !1; }, document.body.appendChild(l), i.Qb.visible = !0, i.Qb.source = n, l.style.display = "";
|
|
1736
|
+
var A = l.offsetHeight, E = l.offsetWidth;
|
|
1737
|
+
l.style.display = "none";
|
|
1730
1738
|
var H = document.documentElement.clientHeight, R = window.innerWidth, N = "number" == typeof r.windowMargin ? r.windowMargin : 5;
|
|
1731
1739
|
if (function () { var e = r.initiator; if (e) {
|
|
1732
1740
|
var t = e.div, n = e.e, i = e.area, o = i.visibility || i.v || "Visible", s = e.a;
|
|
@@ -1734,21 +1742,21 @@ var DayPilot = { Global: {} };
|
|
|
1734
1742
|
var l = DayPilot.abs(s);
|
|
1735
1743
|
r.x = l.x, r.y = l.y + l.h + 2;
|
|
1736
1744
|
}
|
|
1737
|
-
} }(), function () { var e = "number" == typeof r.x ? r.x : t.mouse.x + 1, n = "number" == typeof r.y ? r.y : t.mouse.y + 1, a = document.body.scrollTop || document.documentElement.scrollTop, o = document.body.scrollLeft || document.documentElement.scrollLeft, s = 0,
|
|
1745
|
+
} }(), function () { var e = "number" == typeof r.x ? r.x : t.mouse.x + 1, n = "number" == typeof r.y ? r.y : t.mouse.y + 1, a = document.body.scrollTop || document.documentElement.scrollTop, o = document.body.scrollLeft || document.documentElement.scrollLeft, s = 0, d = 0; if (n - a > H - A && 0 !== H) {
|
|
1738
1746
|
s = n - (n - a - (H - A) + N);
|
|
1739
1747
|
}
|
|
1740
1748
|
else
|
|
1741
|
-
s = n; if (i.Qb.y = s,
|
|
1742
|
-
|
|
1749
|
+
s = n; if (i.Qb.y = s, l.style.top = s + "px", "right" === r.align && (e -= E), e - o > R - E && 0 !== R) {
|
|
1750
|
+
d = e - (e - o - (R - E) + N);
|
|
1743
1751
|
}
|
|
1744
1752
|
else
|
|
1745
|
-
|
|
1746
|
-
var I = r.parentLink, L = parseInt(new DayPilot.StyleReader(
|
|
1747
|
-
|
|
1753
|
+
d = e; i.Qb.x = d, l.style.left = d + "px"; }(), r.parentLink) {
|
|
1754
|
+
var I = r.parentLink, L = parseInt(new DayPilot.StyleReader(l).get("border-top-width")), P = DayPilot.abs(r.parentLink.parentNode), z = P.x + I.offsetWidth, U = P.y - L;
|
|
1755
|
+
z + E > R && (z = Math.max(0, P.x - E));
|
|
1748
1756
|
var B = document.body.scrollTop + document.documentElement.scrollTop;
|
|
1749
|
-
|
|
1757
|
+
U + A - B > H && (U = Math.max(0, H - A + B)), l.style.left = z + "px", l.style.top = U + "px";
|
|
1750
1758
|
}
|
|
1751
|
-
|
|
1759
|
+
l.style.display = "", this.addShadow(l), this.Qb.div = l, r.submenu || (DayPilot.Menu.active = this);
|
|
1752
1760
|
} }, this.update = function () { if (i.Qb.visible) {
|
|
1753
1761
|
var e = i.Qb.source;
|
|
1754
1762
|
i.hide(), i.show(e, { "x": i.Qb.x, "y": i.Qb.y });
|
|
@@ -1760,8 +1768,8 @@ var DayPilot = { Global: {} };
|
|
|
1760
1768
|
this.onHide(r);
|
|
1761
1769
|
} }, this.delayedHide = function (e) { t.hideTimeout = setTimeout(function () { i.hide(e); }, i.hideAfter); }, this.cancelHideTimeout = function () { clearTimeout(t.hideTimeout); }, this.init = function (e) { return t.mouseMove(e), this; }, this.addShadow = function () { }, this.removeShadow = function () { }, r)
|
|
1762
1770
|
for (var o in r)
|
|
1763
|
-
this[o] = r[o]; }, DayPilot.MenuBar = function (e, t) { var n = this; t = t || {}, this.items = [], this.theme = "menubar_default", this.windowMargin = 0, this.nav = {}, this.elements = {}, this.elements.items =
|
|
1764
|
-
this[i] = t[i]; this.Ub = function (e) { return this.theme + "_" + e; }, this.u = function () { this.nav.top = document.getElementById(e); var t = this.nav.top; t.className = this.Ub("main"),
|
|
1771
|
+
this[o] = r[o]; }, DayPilot.MenuBar = function (e, t) { var n = this; t = t || {}, this.items = [], this.theme = "menubar_default", this.windowMargin = 0, this.nav = {}, this.elements = {}, this.elements.items = [], this.l = null, this.La = !1; for (var i in t)
|
|
1772
|
+
this[i] = t[i]; this.Ub = function (e) { return this.theme + "_" + e; }, this.u = function () { this.nav.top = document.getElementById(e); var t = this.nav.top; t.className = this.Ub("main"), (n.items || []).forEach(function (e) { var i = document.createElement("span"); i.innerHTML = DayPilot.Util.escapeTextHtml(e.text, e.html), i.className = n.Ub("item"), e.cssClass && i.classList.add(e.cssClass), i.data = e, i.onclick = function (t) { if (n.active && n.active.item === e)
|
|
1765
1773
|
n.Vb();
|
|
1766
1774
|
else if (e.children)
|
|
1767
1775
|
return void n.Wb(i); if ("function" == typeof e.onClick) {
|
|
@@ -3020,7 +3028,7 @@ var DayPilot = { Global: {} };
|
|
|
3020
3028
|
DayPilot.Scheduler = function (i, o) {
|
|
3021
3029
|
this.v = "${v}";
|
|
3022
3030
|
var s = this;
|
|
3023
|
-
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.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 = {};
|
|
3024
3032
|
var l = this.R;
|
|
3025
3033
|
this.fe = {};
|
|
3026
3034
|
var d = s.fe;
|
|
@@ -3171,7 +3179,7 @@ var DayPilot = { Global: {} };
|
|
|
3171
3179
|
i ? i.show(t) : s.contextMenu && s.contextMenu.show(this.event);
|
|
3172
3180
|
}
|
|
3173
3181
|
return "function" == typeof s.onEventRightClicked && s.onEventRightClicked(n), !1;
|
|
3174
|
-
} }, this.Oe = function (e) { var t = s.Re(), n = 60 * t * 1e3; return { start:
|
|
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)
|
|
3175
3183
|
throw new DayPilot.Exception("Invalid _eventClickSingle parameters"); var n = e.event; if (n) {
|
|
3176
3184
|
var i = t.ctrlKey, a = t.metaKey;
|
|
3177
3185
|
if (n.client.clickEnabled()) {
|
|
@@ -3193,7 +3201,7 @@ var DayPilot = { Global: {} };
|
|
|
3193
3201
|
n = s.Xe(n);
|
|
3194
3202
|
var r = {};
|
|
3195
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();
|
|
3196
|
-
} }, 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) {
|
|
3197
3205
|
var e = {};
|
|
3198
3206
|
s.onAfterUpdate(e);
|
|
3199
3207
|
} }, this.update = function (e) {
|
|
@@ -3699,10 +3707,10 @@ var DayPilot = { Global: {} };
|
|
|
3699
3707
|
}
|
|
3700
3708
|
}
|
|
3701
3709
|
else
|
|
3702
|
-
E.innerHTML = e.client.innerHTML(); }(); var
|
|
3710
|
+
E.innerHTML = e.client.innerHTML(); }(); var z = []; return function () { if ("Disabled" !== s.eventDeleteHandling && !S.deleteDisabled) {
|
|
3703
3711
|
var e = s.durationBarVisible ? s.durationBarHeight : 0;
|
|
3704
|
-
|
|
3705
|
-
} }(), S.areas && (
|
|
3712
|
+
z.push({ v: "Hover", w: 17, h: 17, top: e + 2, right: 2, css: s.L("_event_delete"), onClick: function (e) { s.ya(e.source); } });
|
|
3713
|
+
} }(), S.areas && (z = z.concat(S.areas)), DayPilot.Areas.attach(A, e, { areas: z }), this.elements.events.push(A), o.appendChild(A), e.rendered = !0, !0; }, this.$a = function (e, t) { return s.R.da() ? DayPilot.Util.escapeTextHtml(e, t) : DayPilot.Util.isNullOrUndefined(t) ? DayPilot.Util.isNullOrUndefined(e) ? "" : e : t; }, this.Gh = function (e, t, n) { DayPilot.Util.isNullOrUndefined(n) ? null !== t && void 0 !== t && (s.R.da() ? e.innerText = t : e.innerHTML = t) : e.innerHTML = n; }, this.tf = function () { for (var e = 0; e < this.elements.events.length; e++) {
|
|
3706
3714
|
var t = this.elements.events[e], n = t.event, i = n.part.dayIndex, a = s.rowlist[i], r = a.top, o = r + n.part.top, l = a.height, d = s.eventHeight;
|
|
3707
3715
|
n.part.top + d > l && (d = Math.max(0, l - n.part.top)), t.style.top = o + "px", t.style.height = d + "px";
|
|
3708
3716
|
} }, this.Hh = function (e) { if (!e)
|
|
@@ -3853,7 +3861,32 @@ var DayPilot = { Global: {} };
|
|
|
3853
3861
|
d.current && (i = d.current.end);
|
|
3854
3862
|
break;
|
|
3855
3863
|
default: throw n ? new DayPilot.Exception("Invalid scale value: " + t) : new DayPilot.Exception("Invalid groupBy value: " + t);
|
|
3856
|
-
} 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.
|
|
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) {
|
|
3857
3890
|
var n = e.index;
|
|
3858
3891
|
if (t.rows[n]) {
|
|
3859
3892
|
var i = t.rows[n];
|
|
@@ -3903,124 +3936,144 @@ var DayPilot = { Global: {} };
|
|
|
3903
3936
|
var a = s.snapToGrid, o = s.rowlist;
|
|
3904
3937
|
n(e);
|
|
3905
3938
|
} }, this.di = function (e) { return { "start": { "x": e.start.x, "y": e.start.y, "time": e.start.time }, "end": { "x": e.end.x, "time": e.end.time }, "calendar": e.calendar, "args": e.args }; }, this.getCoords = function () { if (!s.coords)
|
|
3906
|
-
return null; var e = {}; e.x = s.coords.x, e.y = s.coords.y; var t = s.Lf(e.y, e.grid).element; return e.row = s.Eg(t), e.time = s.getDate(e.x, !0), e; }, this.
|
|
3939
|
+
return null; var e = {}; e.x = s.coords.x, e.y = s.coords.y; var t = s.Lf(e.y, e.grid).element; return e.row = s.Eg(t), e.time = s.getDate(e.x, !0), e; }, this.zoom = {}, this.zoom.active = -1, this.zoom.setActive = function (e, t, n) { var i; if ("number" == typeof e)
|
|
3940
|
+
i = s.zoomLevels[e];
|
|
3941
|
+
else {
|
|
3942
|
+
if ("string" != typeof e)
|
|
3943
|
+
throw new DayPilot.Exception("Unexpected parameter type (string or number required): " + typeof e);
|
|
3944
|
+
var a = s.zoom.ei(e);
|
|
3945
|
+
i = s.zoomLevels[a];
|
|
3946
|
+
} if (!i)
|
|
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)
|
|
3948
|
+
return null; var n = s.getViewport(); switch (e) {
|
|
3949
|
+
case "left":
|
|
3950
|
+
t = n.start;
|
|
3951
|
+
break;
|
|
3952
|
+
case "middle":
|
|
3953
|
+
t = n.start && n.start.addTime((s.getViewport().end.getTime() - s.getViewport().start.getTime()) / 2);
|
|
3954
|
+
break;
|
|
3955
|
+
case "right": t = n.end;
|
|
3956
|
+
} return t; }, this.zoom.fi = function (e, t) { var n = s.zoomLevels.length - 1; e > n && (e = n), e < 0 && (e = 0), s.zoom.active = e; var i = s.zoomLevels[e], a = {}; return a.date = t || new DayPilot.Date(s.startDate), a.level = i, DayPilot.Util.ownPropsAsArray(i.properties).forEach(function (e) { if (0 !== e.key.indexOf("on"))
|
|
3957
|
+
return "function" == typeof e.val ? void (s[e.key] = e.val(a)) : void (s[e.key] = e.val); }), a; }, this.Mf = {}, this.Mf.na = null, this.Mf.drawCells = null, this.Mf.drawRows = null, this.Mf.click = null, this.Mf.resClick = [], this.Mf.updateFloats = null, this.jf = function () { if (!s.Q) {
|
|
3907
3958
|
s.hf();
|
|
3908
3959
|
var e = s.nav.scroll;
|
|
3909
3960
|
if (s.nh = e.scrollLeft, s.oh = e.scrollTop, s.ph = e.clientWidth, s.divTimeScroll && (s.divTimeScroll.scrollLeft = s.nh), DayPilot.browser.ios && t.$g ? n() : s.divResScroll.scrollTop = s.oh, s.progressiveRowRendering && (s.Mf.drawRows && (clearTimeout(s.Mf.drawRows), s.Mf.drawRows = null), s.scrollDelayRows > 0 ? s.Mf.drawRows = setTimeout(function () { s.zg(); }, s.scrollDelayRows) : s.zg()), s.Mf.drawCells && (clearTimeout(s.Mf.drawCells), s.Mf.drawCells = null), s.scrollDelayCells > 0)
|
|
3910
|
-
s.Mf.drawCells = setTimeout(s.
|
|
3961
|
+
s.Mf.drawCells = setTimeout(s.gi(), s.scrollDelayCells);
|
|
3911
3962
|
else {
|
|
3912
|
-
s.
|
|
3963
|
+
s.gi()();
|
|
3913
3964
|
}
|
|
3914
|
-
s.Mf.na && (clearTimeout(s.Mf.na), s.Mf.na = null), s.scrollDelayEvents > 0 ? s.Mf.na = setTimeout(s.
|
|
3915
|
-
} }, this.
|
|
3965
|
+
s.Mf.na && (clearTimeout(s.Mf.na), s.Mf.na = null), s.scrollDelayEvents > 0 ? s.Mf.na = setTimeout(s.hi(), s.scrollDelayEvents) : s.na(), s.Mf.updateFloats && (clearTimeout(s.Mf.updateFloats), s.Mf.updateFloats = null), s.scrollDelayFloats > 0 ? s.Mf.updateFloats = setTimeout(function () { s.se(); }, s.scrollDelayFloats) : s.se(), s.onScrollCalled = !0;
|
|
3966
|
+
} }, this.gi = function () { return function () { s && s.if(); }; }, this.hi = function () { return function () { s && (s.xh() ? setTimeout(function () { s.uh(), setTimeout(function () { s.na(!0); }, 50); }, 50) : s.te()); }; }, this.hf = function () { s.xb.drawArea = null; }, this.show = function () { s.visible = !0, s.ee = !0, s.nav.top.style.display = "", s.u(), s.dh(), s.jf(); }, this.hide = function () { s.visible = !1, s.ee = !1, s.nav.top.style.display = "none"; }, this._f = function (e) { if (!s.events.list)
|
|
3916
3967
|
return null; for (var t = 0; t < this.events.list.length; t++) {
|
|
3917
3968
|
var n = this.events.list[t];
|
|
3918
3969
|
if (s.Uf(n, e)) {
|
|
3919
3970
|
var i = {};
|
|
3920
3971
|
return i.ex = n, i.index = t, i;
|
|
3921
3972
|
}
|
|
3922
|
-
} return null; }, this.
|
|
3973
|
+
} return null; }, this.ii = function () { var e = this.ne(), t = e.xStart, n = e.xEnd - e.xStart, i = e.yStart, a = e.yEnd - e.yStart; this.cellProperties || (this.cellProperties = {}); for (var r = 0; r <= n; r++) {
|
|
3923
3974
|
for (var o = t + r, s = 0; s < a; s++) {
|
|
3924
3975
|
var l = i + s;
|
|
3925
3976
|
this.gd(o, l);
|
|
3926
3977
|
}
|
|
3927
|
-
this.
|
|
3978
|
+
this.ji(o);
|
|
3928
3979
|
} for (var d = this.ug(), l = d.start; l < d.end; l++)
|
|
3929
|
-
this.
|
|
3980
|
+
this.ki(l); }, this.if = function () { if (!s.Q) {
|
|
3930
3981
|
var e = s.rowlist;
|
|
3931
3982
|
if (e && e.length > 0) {
|
|
3932
3983
|
if (this.cellSweeping) {
|
|
3933
3984
|
var t = this.cellSweepingCacheSize;
|
|
3934
3985
|
this.wh(t);
|
|
3935
3986
|
}
|
|
3936
|
-
this.
|
|
3987
|
+
this.ii();
|
|
3937
3988
|
}
|
|
3938
3989
|
this.qf = !1;
|
|
3939
3990
|
} }, this.ne = function () { if (s.xb.drawArea)
|
|
3940
3991
|
return s.xb.drawArea; if (!this.nav.scroll)
|
|
3941
|
-
return null; var e = s.oh, t = {}, n = l.zh(), i = l.rh(), a = s.nh - n, r = a + s.ph + 2 * n, o = 0, d = 0; o = s.Ne(a).x, d = s.Ne(r, !0).x; var c = this.Ff(); d = Math.min(d, c - 1), o = DayPilot.Util.atLeast(o, 0); var u = e - i, h = e + this.nav.scroll.offsetHeight + 2 * i, f = this.Lf(u).i, v = this.Lf(h).i; v < this.rowlist.length && v++, t.xStart = o, t.xEnd = d, t.yStart = f, t.yEnd = v; var p = s.nav.scroll; return 0 === p.clientWidth && (p = s.divTimeScroll), t.pixels = {}, t.pixels.left = p.scrollLeft, t.pixels.right = p.scrollLeft + p.clientWidth, t.pixels.top = p.scrollTop, t.pixels.bottom = p.scrollTop + p.clientHeight, t.pixels.width = p.scrollWidth, t.sw = DayPilot.sw(s.nav.scroll), s.xb.drawArea = t, t; }, this.Fe = function () { return s.Ff() * s.cellWidth; }, this.
|
|
3992
|
+
return null; var e = s.oh, t = {}, n = l.zh(), i = l.rh(), a = s.nh - n, r = a + s.ph + 2 * n, o = 0, d = 0; o = s.Ne(a).x, d = s.Ne(r, !0).x; var c = this.Ff(); d = Math.min(d, c - 1), o = DayPilot.Util.atLeast(o, 0); var u = e - i, h = e + this.nav.scroll.offsetHeight + 2 * i, f = this.Lf(u).i, v = this.Lf(h).i; v < this.rowlist.length && v++, t.xStart = o, t.xEnd = d, t.yStart = f, t.yEnd = v; var p = s.nav.scroll; return 0 === p.clientWidth && (p = s.divTimeScroll), t.pixels = {}, t.pixels.left = p.scrollLeft, t.pixels.right = p.scrollLeft + p.clientWidth, t.pixels.top = p.scrollTop, t.pixels.bottom = p.scrollTop + p.clientHeight, t.pixels.width = p.scrollWidth, t.sw = DayPilot.sw(s.nav.scroll), s.xb.drawArea = t, t; }, this.Fe = function () { return s.Ff() * s.cellWidth; }, this.ki = function (e) { var t = s.rowlist, n = s.divLines, i = "y_" + e; if (!this.xb.linesHorizontal[i]) {
|
|
3942
3993
|
var a = t[e], o = a.height, l = a.top + o - 1, d = this.Fe(), c = r();
|
|
3943
3994
|
c.style.left = "0px", c.style.top = l + "px", c.style.width = d + "px", c.style.height = "1px", c.style.fontSize = "1px", c.style.lineHeight = "1px", c.style.overflow = "hidden", c.style.position = "absolute", c.className = this.L("_matrix_horizontal_line"), n.appendChild(c), this.xb.linesHorizontal[i] = c;
|
|
3944
|
-
} }, this.
|
|
3995
|
+
} }, this.ji = function (e) { var t = s.Oe(e); if (t) {
|
|
3945
3996
|
var n = s.divLines, i = s.ce, a = "x_" + e;
|
|
3946
3997
|
if (!this.xb.linesVertical[a]) {
|
|
3947
3998
|
var o = t.left + t.width - 1, l = r();
|
|
3948
3999
|
l.style.left = o + "px", l.style.top = "0px", l.style.width = "1px", l.style.height = i + "px", l.style.fontSize = "1px", l.style.lineHeight = "1px", l.style.overflow = "hidden", l.style.position = "absolute", l.className = this.L("_matrix_vertical_line"), n.appendChild(l), this.elements.linesVertical.push(l), this.xb.linesVertical[a] = l;
|
|
3949
4000
|
}
|
|
3950
|
-
} }, this.af = function () { s.ce = s.
|
|
4001
|
+
} }, this.af = function () { s.ce = s.li(s.rowlist); }, this.li = function (e) { for (var t = 0, n = 0; n < e.length; n++) {
|
|
3951
4002
|
var i = e[n];
|
|
3952
4003
|
i.top = t, t += i.height;
|
|
3953
|
-
} return t; }, this.ff = function () { s.elements.cells = [], s.xb.cells = [], s.divCells.innerHTML = "", s.
|
|
3954
|
-
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) {
|
|
3955
|
-
|
|
3956
|
-
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
if (
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
switch (l.verticalAlignment) {
|
|
3972
|
-
case "center":
|
|
3973
|
-
c.style.alignItems = "center";
|
|
3974
|
-
break;
|
|
3975
|
-
case "top":
|
|
3976
|
-
c.style.alignItems = "flex-start";
|
|
3977
|
-
break;
|
|
3978
|
-
case "bottom": c.style.alignItems = "flex-end";
|
|
3979
|
-
}
|
|
3980
|
-
}
|
|
3981
|
-
DayPilot.Areas.attach(c, d.cell, { "areas": l.areas });
|
|
3982
|
-
}
|
|
3983
|
-
var u = { start: n.start, end: n.end, resource: i[t].id, div: c, properties: l, x: e, y: t };
|
|
3984
|
-
!function () { if ("function" == typeof s.onBeforeCellDomAdd || "function" == typeof s.onBeforeCellDomRemove) {
|
|
3985
|
-
var e = {};
|
|
3986
|
-
if (e.control = s, e.cell = u, e.element = null, c.domArgs = e, "function" == typeof s.onBeforeCellDomAdd && s.onBeforeCellDomAdd(e), e.element) {
|
|
3987
|
-
var t = c;
|
|
3988
|
-
if (t) {
|
|
3989
|
-
e.Pa = t;
|
|
3990
|
-
var n = DayPilot.Util.isReactComponent(e.element), i = DayPilot.Util.isVueVNode(e.element);
|
|
3991
|
-
if (n) {
|
|
3992
|
-
if (!s.zd.reactDOM)
|
|
3993
|
-
throw new DayPilot.Exception("Can't reach ReactDOM");
|
|
3994
|
-
s.zd.Uc(e.element, t);
|
|
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)
|
|
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";
|
|
3995
4022
|
}
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
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";
|
|
4000
4031
|
}
|
|
4001
|
-
else
|
|
4002
|
-
t.appendChild(e.element);
|
|
4003
4032
|
}
|
|
4033
|
+
DayPilot.Areas.attach(c, d.cell, { "areas": l.areas });
|
|
4004
4034
|
}
|
|
4005
|
-
|
|
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
|
+
}
|
|
4006
4061
|
}
|
|
4007
4062
|
}
|
|
4008
|
-
}
|
|
4009
|
-
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.
|
|
4063
|
+
}, this.oi = function (e, t) { var n = s.Oe(e); if (!n)
|
|
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) {
|
|
4010
4065
|
var d = e + "_" + t;
|
|
4011
4066
|
if (s.beforeCellRenderCaching && s.gf[d])
|
|
4012
4067
|
return l;
|
|
4013
4068
|
s.gf[d] = !0, this.onBeforeCellRender(l);
|
|
4014
|
-
} return l; }, this.clearSelection = function () { this.
|
|
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)
|
|
4015
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)
|
|
4016
|
-
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.
|
|
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) {
|
|
4017
4072
|
var e = l.Le();
|
|
4018
4073
|
return e ? e.weekStarts : 0;
|
|
4019
|
-
} 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) {
|
|
4020
|
-
return "Always" === s.useEventBoxes || "Never" !== s.useEventBoxes && e < 60 * s.Re() * 1e3;
|
|
4021
|
-
}, l.zh = function () { var e = s.dynamicEventRenderingMarginX; if ("number" == typeof e)
|
|
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)
|
|
4022
4075
|
return e; var t = s.dynamicEventRenderingMargin; return "number" == typeof t ? t : 0; }, l.rh = function () { var e = s.dynamicEventRenderingMarginY; if ("number" == typeof e)
|
|
4023
|
-
return e; var t = s.dynamicEventRenderingMargin; return "number" == typeof t ? t : 0; }, this.
|
|
4076
|
+
return e; var t = s.dynamicEventRenderingMargin; return "number" == typeof t ? t : 0; }, this.ni = function (e, t) { var n = e + "_" + t, i = s.rowlist; if (this.cellProperties || (this.cellProperties = {}), this.cellProperties[n])
|
|
4024
4077
|
return this.cellProperties[n]; if (!this.cellProperties[n]) {
|
|
4025
4078
|
var a = i[t], r = a.id, o = s.Oe(e), l = o.start, d = o.end, c = {};
|
|
4026
4079
|
c.start = l, c.end = d, c.resource = r;
|
|
@@ -4041,7 +4094,7 @@ var DayPilot = { Global: {} };
|
|
|
4041
4094
|
return !0;
|
|
4042
4095
|
if (r >= l)
|
|
4043
4096
|
return !1;
|
|
4044
|
-
} return !0; }, this.u = function () { "hidden" === this.nav.top.style.visibility && (this.nav.top.style.visibility = "visible"); }, this.
|
|
4097
|
+
} return !0; }, this.u = function () { "hidden" === this.nav.top.style.visibility && (this.nav.top.style.visibility = "visible"); }, this.si = function (e) { this.heightSpec = "Fixed", this.height = e - (this.He() + 2), this.ma(); }, this.setHeight = this.si, this.le = function (e) { return s.Ig(e)[0]; }, this.wb = function () { if (this.id && this.id.tagName)
|
|
4045
4098
|
this.nav.top = this.id;
|
|
4046
4099
|
else {
|
|
4047
4100
|
if ("string" != typeof this.id)
|
|
@@ -4053,8 +4106,11 @@ var DayPilot = { Global: {} };
|
|
|
4053
4106
|
if (this.nav.top.dp === s)
|
|
4054
4107
|
return s;
|
|
4055
4108
|
throw new DayPilot.Exception("The target placeholder was already initialized by another DayPilot component instance.");
|
|
4056
|
-
} return this.
|
|
4057
|
-
var t = { "resources": { "preInit": function () { var e = this.data; e && (s.resources = e); } }, "events": { "preInit": function () { var e = this.data; e && (DayPilot.isArray(e.list) ? s.events.list = e.list : s.events.list = e); }, "postInit": function () { } }, "scrollTo": { "preInit": function () { }, "postInit": function () { this.data && s.he(this.data); } }, "scrollX": { "postInit": function () { this.data && s.ke(this.data); } }, "scrollY": { "postInit": function () { this.data && s.Ge(this.data); } }
|
|
4109
|
+
} return this.vi(), this.ch(), this; }, this.vi = function () { this.Qg(), this.pb(), this.ba(), this.mh(), s.zoomLevels && s.zoomLevels[s.zoom.active] && s.zoom.setActive(s.zoom.active), this.qb(); var angular = s.Ee.enabled; s.scrollToDate ? s.scrollTo(s.scrollToDate) : s.scrollX || s.scrollY ? s.setScroll(s.scrollX, s.scrollY) : angular || s.jf(), s.scrollToResourceId && (s.scrollToResource(s.scrollToResourceId), s.scrollToResourceId = null); var e = function () { s.scrollY && s.setScroll(s.scrollX, s.scrollY); }; setTimeout(e, 200), this.hf(), this.vb(), this.La = !0; var t = s.ie; t ? s.scrollTo(t) : s.jf(); }, this.ub = null, this.sb = function (e) { if (e) {
|
|
4110
|
+
var t = { "resources": { "preInit": function () { var e = this.data; e && (s.resources = e); } }, "events": { "preInit": function () { var e = this.data; e && (DayPilot.isArray(e.list) ? s.events.list = e.list : s.events.list = e); }, "postInit": function () { } }, "scrollTo": { "preInit": function () { }, "postInit": function () { this.data && s.he(this.data); } }, "scrollX": { "postInit": function () { this.data && s.ke(this.data); } }, "scrollY": { "postInit": function () { this.data && s.Ge(this.data); } }, "zoom": { "preInit": function () { var e = this.data; if ("string" == typeof e) {
|
|
4111
|
+
var t = e;
|
|
4112
|
+
e = s.zoom.ei(t);
|
|
4113
|
+
} var n = e !== s.zoom.active, i = s.zoom.Qd(); s.zoom.fi(e, i), n ? this.date = i : this.date = null; }, "postInit": function () { this.date && s.he(this.date, !1, s.zoomPosition); } } };
|
|
4058
4114
|
s.ub = t, s.Ee.scrollToRequested && (t.scrollTo.data = s.Ee.scrollToRequested, s.Ee.scrollToRequested = null), s.Ee.scrollXRequested && (t.scrollX.data = s.Ee.scrollXRequested, s.Ee.scrollXRequested = null), s.Ee.scrollYRequested && (t.scrollY.data = s.Ee.scrollYRequested, s.Ee.scrollYRequested = null);
|
|
4059
4115
|
for (var n in e)
|
|
4060
4116
|
t[n] || (s[n] = e[n]);
|
|
@@ -4085,8 +4141,8 @@ var DayPilot = { Global: {} };
|
|
|
4085
4141
|
} }, this.Ra.Ta = function (e) { var t = s.Ra.Qa; "function" == typeof t.render && t.render(null, e); }, this.internal = {}, this.internal.adjustEndIn = s.vf, this.internal.adjustEndNormalize = s.wf, this.internal.xssTextHtml = s.$a, this.internal.touch = s.fe, this.internal.skipUpdate = s.Ee.skipUpdate, this.internal.skipped = s.Ee.skipped, this.internal.loadOptions = s.sb, this.internal.postInit = s.vb, this.internal.enableAngular2 = function () { s.Ee.enabled = !0; }, this.internal.eventsFromAttr = function () { s.Ee.Zf = !0; }, this.internal.resourcesFromAttr = function () { s.Ee.gg = !0; }, this.internal.evImmediateRefresh = function () { s.events.zf(); }, this.internal.upd = function (e) { s.update(e); }, this.internal.enableReact = function (e, t) { s.zd.react = e, s.zd.reactDOM = t; }, this.internal.reactRefs = function () { return DayPilot.Util.copyProps(s.zd, {}, ["react", "reactDOM"]); }, this.internal.enableVue = function (e) { s.Ra.Qa = e; }, this.internal.vueRef = function () { return s.Ra.Qa; }, this.internal.vueRendering = function () { return s.Ra.Sa; }, this.sb(o);
|
|
4086
4142
|
}, i = "${v}" === (new DayPilot.Scheduler).v, DayPilot.Row = function (e, t) { if (!e)
|
|
4087
4143
|
throw new DayPilot.Exception("Now row object supplied when creating DayPilot.Row"); if (!t)
|
|
4088
|
-
throw new DayPilot.Exception("No parent control supplied when creating DayPilot.Row"); this.
|
|
4089
|
-
e.push(i.
|
|
4144
|
+
throw new DayPilot.Exception("No parent control supplied when creating DayPilot.Row"); this.wi = {}; var n = this.wi; n.id = e.id, n.name = e.name, n.data = e.resource, n.tags = e.tags; var i = this; i.isRow = !0, i.menuType = "resource", i.name = e.name, i.id = e.id, i.tags = e.tags, i.index = e.index, i.calendar = t, i.data = e.resource, i.xi = e, i.$ = {}, i.$.row = e, i.toJSON = function () { var e = {}; return e.start = this.start, e.name = this.name, e.id = this.id, e.index = this.index, e; }, i.events = {}, i.events.all = function () { for (var e = [], t = 0; t < i.xi.events.length; t++)
|
|
4145
|
+
e.push(i.xi.events[t]); return e; }, i.events.isEmpty = function () { return 0 === i.xi.events.length; }, i.events.forRange = function (e, t) { return i.xi.events.forRange(e, t); }, i.events.totalDuration = function () { var e = 0; return i.events.all().forEach(function (t) { e += t.part.end.getTime() - t.part.start.getTime(); }), new DayPilot.Duration(e); }, i.remove = function () { t.rows.remove(i); }, i.addClass = function (e) { var n = t.divHeader, a = n.rows[i.index]; DayPilot.Util.addClass(a, e), i.$.row.cssClass = DayPilot.Util.addClassToString(i.$.row.cssClass, e), i.data.cssClass = e; }, i.removeClass = function (e) { var n = t.divHeader, a = n.rows[i.index]; DayPilot.Util.removeClass(a, e), i.$.row.cssClass = DayPilot.Util.removeClassFromString(i.$.row.cssClass, e), i.data.cssClass = DayPilot.Util.removeClassFromString(i.data.cssClass, e); }; }, t.Ue = null, t.rg = null, t.Jh = null, t.kg = null, t.og = null, t.Te = !1, t.jh = !1, t._h = null, t.yi = null, t.pc = function () { DayPilot.ue(document, "mouseup", t.be), DayPilot.ue(document, "touchmove", t.kh), DayPilot.ue(document, "touchend", t.lh), t.jh = !1; }, t.kh = function (e) { if (t.kg) {
|
|
4090
4146
|
var n = t.kg.event.calendar;
|
|
4091
4147
|
n.coords = n.fe.Nh(e), n.fe.Sh(), e.preventDefault();
|
|
4092
4148
|
} if (t.Ue) {
|
|
@@ -4094,7 +4150,7 @@ var DayPilot = { Global: {} };
|
|
|
4094
4150
|
var n = t.rg.calendar;
|
|
4095
4151
|
n.coords = n.fe.Nh(e), n.fe.Th();
|
|
4096
4152
|
} }, t.lh = function (e) { t.$g = !1, t.be(e); }, t.be = function (e) { if (t.kg) {
|
|
4097
|
-
var i = function () { var e = t.og, n = e.calendar; a().style.cursor = "", t.kg = null, t.og = null, DayPilot.de(t.ng), t.ng = null, n && (n.
|
|
4153
|
+
var i = function () { var e = t.og, n = e.calendar; a().style.cursor = "", t.kg = null, t.og = null, DayPilot.de(t.ng), t.ng = null, n && (n.zi = null); };
|
|
4098
4154
|
if (setTimeout(function () { t.Te = !1; }), !t.ng)
|
|
4099
4155
|
return void i();
|
|
4100
4156
|
var r = t.og, o = r.calendar, s = t.ng.start, l = t.ng.end, d = "left" === t.kg.dpBorder ? "start" : "end";
|
|
@@ -4114,7 +4170,7 @@ var DayPilot = { Global: {} };
|
|
|
4114
4170
|
}
|
|
4115
4171
|
else if (t.Qh) {
|
|
4116
4172
|
var u = DayPilot.Util.mouseButton(e), h = t.Qh, f = h.calendar, i = function () { };
|
|
4117
|
-
if (f.
|
|
4173
|
+
if (f.ri = null, t._h)
|
|
4118
4174
|
return clearTimeout(t._h), t._h = null, void i();
|
|
4119
4175
|
f.Df = h, t.Qh = null;
|
|
4120
4176
|
var v = function (e) { return function () { t._h = null, f.Af(e), "Hold" !== f.timeRangeSelectedHandling && "HoldForever" !== f.timeRangeSelectedHandling ? n() : f.Df = e; }; }, p = f.di(h);
|