@daypilot/daypilot-lite-angular 4.8.0 → 4.8.1
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.
- package/esm2020/lib/core/daypilot-core.mjs +136 -123
- package/fesm2015/daypilot-daypilot-lite-angular.mjs +177 -162
- package/fesm2015/daypilot-daypilot-lite-angular.mjs.map +1 -1
- package/fesm2020/daypilot-daypilot-lite-angular.mjs +135 -122
- package/fesm2020/daypilot-daypilot-lite-angular.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -132,7 +132,7 @@ DayPilot Lite
|
|
|
132
132
|
Copyright (c) 2005 - 2025 Annpoint s.r.o.
|
|
133
133
|
https://www.daypilot.org/
|
|
134
134
|
Licensed under Apache Software License 2.0
|
|
135
|
-
Version: 2025.4.
|
|
135
|
+
Version: 2025.4.754-lite
|
|
136
136
|
*/
|
|
137
137
|
"use strict";
|
|
138
138
|
var DayPilot = { Global: {} };
|
|
@@ -2388,11 +2388,21 @@ var DayPilot = { Global: {} };
|
|
|
2388
2388
|
this.selectionEnd = e;
|
|
2389
2389
|
break;
|
|
2390
2390
|
default: throw "Unknown selectMode value.";
|
|
2391
|
-
} }, this.Ed = null, this.select = function (e, t, n) {
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2391
|
+
} }, this.Ed = null, this.select = function (e, t, n) { if (!this.Q) {
|
|
2392
|
+
var a = t && (t instanceof DayPilot.Date || "string" == typeof t), r = t && "object" == typeof t || "boolean" == typeof t, o = e, s = a ? t : null, l = r ? t : n;
|
|
2393
|
+
if (!this.La)
|
|
2394
|
+
return void (this.Ed = { "date1": o, "date2": s, "options": l });
|
|
2395
|
+
var d = !0, c = !0;
|
|
2396
|
+
l && "object" == typeof l ? (l.dontFocus && (d = !1), l.dontNotify && (c = !1)) : "boolean" == typeof l && (d = !l);
|
|
2397
|
+
var u = this.selectionStart, h = this.selectionEnd;
|
|
2398
|
+
this.selectionStart = new DayPilot.Date(o).getDatePart(), this.selectionDay = this.selectionStart;
|
|
2399
|
+
var f = !1;
|
|
2400
|
+
if (d) {
|
|
2401
|
+
var v = this.startDate;
|
|
2402
|
+
(this.selectionStart < this.Fd() || this.selectionStart >= this.Gd()) && (v = this.selectionStart.firstDayOfMonth()), v.toStringSortable() !== this.startDate.toStringSortable() && (f = !0), this.startDate = v;
|
|
2403
|
+
}
|
|
2404
|
+
s && i.freeHandSelectionEnabled ? i.selectionEnd = new DayPilot.Date(s) : this.Dd(), this.cd(), this.jd(), this.Hd(), this.Bd(), this.Cd(), !c || u.equals(this.selectionStart) && h.equals(this.selectionEnd) || this.O(), f && this.Id();
|
|
2405
|
+
} }, this.update = function (e) { i.Jd(e); }, this.Jd = function (e) { if (i.sb(e), this.La) {
|
|
2396
2406
|
if (i.Q)
|
|
2397
2407
|
throw new DayPilot.Exception("You are trying to update a DayPilot.Navigator instance that has been disposed.");
|
|
2398
2408
|
i.Kd();
|
|
@@ -2804,8 +2814,9 @@ var DayPilot = { Global: {} };
|
|
|
2804
2814
|
return void s.sf(); switch (t = r.newStart, n = r.newEnd, s.eventMoveHandling) {
|
|
2805
2815
|
case "Update": s.Se(r);
|
|
2806
2816
|
} s.sf(), "function" == typeof s.onEventMoved && s.onEventMoved(r); };
|
|
2807
|
-
r.async = !1, r.loaded = function () {
|
|
2808
|
-
|
|
2817
|
+
r.async = !1, r.loaded = function () {
|
|
2818
|
+
o();
|
|
2819
|
+
}, "function" == typeof s.onEventMove && s.onEventMove(r), r.async || o();
|
|
2809
2820
|
}
|
|
2810
2821
|
}, this.Se = function (e) { var t = e.e, n = e.newStart, a = e.newEnd, i = e.newResource; t.start(n), t.end(a), t.resource(i), s.events.update(t), s.events.tf(); }, this.uf = function (e) { if (e)
|
|
2811
2822
|
if (e.args)
|
|
@@ -3195,8 +3206,8 @@ var DayPilot = { Global: {} };
|
|
|
3195
3206
|
var t = this.ge;
|
|
3196
3207
|
t.style.userSelect = "none", t.style.webkitUserSelect = "none", t.calendar = this, t.style.position = "absolute";
|
|
3197
3208
|
var n = this.ze();
|
|
3198
|
-
return n > 0 && (t.style.width = n + "px"), t.onmousedown = this.ah, t.onmousemove = this.bh, t.onmouseup = this.ch, t.oncontextmenu = this.dh, t.className = this.L("_matrix"), this.divStretch = r(), this.divStretch.style.position = "absolute", this.divStretch.style.height = "1px", t.appendChild(this.divStretch), this.divCells = r(), this.divCells.style.position = "absolute", this.divCells.oncontextmenu = this.dh, t.appendChild(this.divCells), this.divLines = r(), this.divLines.style.position = "absolute", this.divLines.oncontextmenu = this.dh, t.appendChild(this.divLines), this.divSeparators = r(), this.divSeparators.style.position = "absolute",
|
|
3199
|
-
t.appendChild(this.divSeparators), this.divRange = r(), this.divRange.style.position = "absolute", this.divRange.oncontextmenu = this.dh, t.appendChild(this.divRange), this.divEvents = r(), this.divEvents.style.position = "absolute", t.appendChild(this.divEvents), this.divShadow = r(), this.divShadow.style.position = "absolute", t.appendChild(this.divShadow), e.appendChild(t), e;
|
|
3209
|
+
return n > 0 && (t.style.width = n + "px"), t.onmousedown = this.ah, t.onmousemove = this.bh, t.onmouseup = this.ch, t.oncontextmenu = this.dh, t.className = this.L("_matrix"), this.divStretch = r(), this.divStretch.style.position = "absolute", this.divStretch.style.height = "1px", t.appendChild(this.divStretch), this.divCells = r(), this.divCells.style.position = "absolute", this.divCells.oncontextmenu = this.dh, t.appendChild(this.divCells), this.divLines = r(), this.divLines.style.position = "absolute", this.divLines.oncontextmenu = this.dh, t.appendChild(this.divLines), this.divSeparators = r(), this.divSeparators.style.position = "absolute",
|
|
3210
|
+
this.divSeparators.oncontextmenu = this.dh, t.appendChild(this.divSeparators), this.divRange = r(), this.divRange.style.position = "absolute", this.divRange.oncontextmenu = this.dh, t.appendChild(this.divRange), this.divEvents = r(), this.divEvents.style.position = "absolute", t.appendChild(this.divEvents), this.divShadow = r(), this.divShadow.style.position = "absolute", t.appendChild(this.divShadow), e.appendChild(t), e;
|
|
3200
3211
|
}, this.pb = function () { t.eh || (t.eh = !0, DayPilot.re(document, "mouseup", t.$d), DayPilot.reNonPassive(document, "touchmove", t.fh), DayPilot.re(document, "touchend", t.gh)); }, this.hh = function () { this.nav.scroll.root = this, this.nav.scroll.onscroll = this.df, s.ih = this.nav.scroll.scrollLeft, s.jh = this.nav.scroll.scrollTop, this.divNorth && (s.kh = this.divNorth.clientWidth); }, this.lh = {}, this.lh.step = 300, this.lh.delay = 10, this.lh.mode = "display", this.lh.layers = !1, this.Fg = function (e) { for (var t = 0, n = 0; n < e.lines.length; n++) {
|
|
3201
3212
|
for (var a = e.lines[n], i = 0; i < a.length; i++) {
|
|
3202
3213
|
var r = a[i];
|
|
@@ -3207,7 +3218,7 @@ var DayPilot = { Global: {} };
|
|
|
3207
3218
|
var t = this.lh.step;
|
|
3208
3219
|
"display" === this.lh.mode ? this.divEvents.style.display = "none" : "visibility" === this.lh.mode && (this.divEvents.style.visibility = "hidden"), this.divEvents.setAttribute("role", "region"), this.divEvents.setAttribute("aria-label", "scheduler events");
|
|
3209
3220
|
var n = "Progressive" === this.dynamicEventRendering, a = this.ke(), i = a.pixels.top, r = a.pixels.bottom;
|
|
3210
|
-
s.rowlist.filter(function (e) { var t = e.top -
|
|
3221
|
+
s.rowlist.filter(function (e) { var t = e.top - l.mh(), a = t + e.height + 2 * l.mh(); return !n || !(a <= i || t >= r); }).forEach(function (n) { s.Fg(n); for (var a = 0; a < n.lines.length; a++)
|
|
3211
3222
|
for (var i = n.lines[a], r = 0; r < i.length; r++) {
|
|
3212
3223
|
var o = i[r], l = s.Ua(o);
|
|
3213
3224
|
if (e && l && (t--, t <= 0))
|
|
@@ -3232,19 +3243,19 @@ var DayPilot = { Global: {} };
|
|
|
3232
3243
|
var n = t && t.Pa;
|
|
3233
3244
|
if (n) {
|
|
3234
3245
|
var a = s.bg.reactDOM && DayPilot.Util.isReactComponent(t.element), i = s.Ra.Qa && DayPilot.Util.isVueVNode(t.element);
|
|
3235
|
-
a ? s.bg.
|
|
3246
|
+
a ? s.bg.nh(n) : i && (s.Ra.Sa = !0, s.Ra.Ta(n), s.Ra.Sa = !1);
|
|
3236
3247
|
}
|
|
3237
|
-
} e.remove(), e.onclick = null, e.oncontextmenu = null, e.onmouseover = null, e.onmouseout = null, e.onmousemove = null, e.onmousedown = null, e.ondblclick = null, e.event && (e.event.rendered = null, e.event = null); }, this.
|
|
3248
|
+
} e.remove(), e.onclick = null, e.oncontextmenu = null, e.onmouseover = null, e.onmouseout = null, e.onmousemove = null, e.onmousedown = null, e.ondblclick = null, e.event && (e.event.rendered = null, e.event = null); }, this.oh = function () { if ("Progressive" === this.dynamicEventRendering) {
|
|
3238
3249
|
if (s.dynamicEventRenderingCacheSweeping) {
|
|
3239
3250
|
var e = s.dynamicEventRenderingCacheSize || 0;
|
|
3240
3251
|
this.divEvents.style.display = "none";
|
|
3241
3252
|
for (var t = [], n = this.elements.events.length, a = n - 1; a >= 0; a--) {
|
|
3242
3253
|
var i = this.elements.events[a];
|
|
3243
|
-
this.
|
|
3254
|
+
this.ph(i.event) ? e > 0 ? (e--, t.unshift(i)) : this.Oa(i) : t.unshift(i);
|
|
3244
3255
|
}
|
|
3245
3256
|
this.elements.events = t, this.divEvents.style.display = "";
|
|
3246
3257
|
}
|
|
3247
|
-
} }, this.
|
|
3258
|
+
} }, this.qh = function (e) { for (var t = this.ke(), n = this.elements.cells.length, a = n - 1; a >= 0; a--) {
|
|
3248
3259
|
var i = this.elements.cells[a];
|
|
3249
3260
|
t.xStart < i.coords.x && i.coords.x <= t.xEnd && t.yStart < i.coords.y && i.coords.y <= t.yEnd || (e > 0 ? e-- : this.fb(i));
|
|
3250
3261
|
} }, this.fb = function (e) { if (e && e.coords) {
|
|
@@ -3253,31 +3264,31 @@ var DayPilot = { Global: {} };
|
|
|
3253
3264
|
var n = t && t.Pa;
|
|
3254
3265
|
if (n) {
|
|
3255
3266
|
var a = s.bg.reactDOM && DayPilot.Util.isReactComponent(t.element), i = s.Ra.Qa && DayPilot.Util.isVueVNode(t.element);
|
|
3256
|
-
a ? s.bg.
|
|
3267
|
+
a ? s.bg.nh(n) : i && (s.Ra.Sa = !0, s.Ra.Ta(n), s.Ra.Sa = !1);
|
|
3257
3268
|
}
|
|
3258
3269
|
} }(), DayPilot.rfa(s.elements.cells, e), DayPilot.de(e), s.xb.cells[t + "_" + n] = null;
|
|
3259
|
-
} }, this.
|
|
3260
|
-
return !1; for (var t = this.nav.scroll.scrollTop, n = t + this.nav.scroll.clientHeight, a = 0; a < this.rowlist.length; a++) {
|
|
3270
|
+
} }, this.rh = function () { var e = "Progressive" === this.dynamicEventRendering; if (!this.nav.scroll)
|
|
3271
|
+
return !1; for (var t = this.nav.scroll.scrollTop - l.mh(), n = t + this.nav.scroll.clientHeight + 2 * l.mh(), a = 0; a < this.rowlist.length; a++) {
|
|
3261
3272
|
var i = this.rowlist[a], r = i.top, o = i.top + i.height;
|
|
3262
|
-
if (!e || !(
|
|
3273
|
+
if (!e || !(r >= n || o <= t))
|
|
3263
3274
|
for (var s = 0; s < i.lines.length; s++)
|
|
3264
|
-
for (var
|
|
3265
|
-
var
|
|
3266
|
-
if (this.
|
|
3275
|
+
for (var d = i.lines[s], c = 0; c < d.length; c++) {
|
|
3276
|
+
var u = d[c];
|
|
3277
|
+
if (this.uh(u))
|
|
3267
3278
|
return !0;
|
|
3268
3279
|
}
|
|
3269
|
-
} return !1; }, this.
|
|
3270
|
-
return !1; var t = "Progressive" === this.dynamicEventRendering, n = this.nav.scroll.scrollLeft, a = n + this.nav.scroll.clientWidth, i = e.part.left, r = e.part.left + e.part.width; return !t || !(a <= i || n >= r); }, this.
|
|
3280
|
+
} return !1; }, this.uh = function (e) { if (e.rendered)
|
|
3281
|
+
return !1; var t = "Progressive" === this.dynamicEventRendering, n = this.nav.scroll.scrollLeft - l.vh(), a = n + this.nav.scroll.clientWidth + 2 * l.vh(), i = e.part.left, r = e.part.left + e.part.width; return !t || !(a <= i || n >= r); }, this.ph = function (e) { if (!e.rendered)
|
|
3271
3282
|
return !0; var t = this.ke(), n = t.pixels.top, a = t.pixels.bottom, i = t.pixels.left - this.dynamicEventRenderingMargin, r = t.pixels.right + this.dynamicEventRenderingMargin, o = e.part.left, l = e.part.right, d = e.part.top, c = e.part.top + s.eventHeight; return r <= o || i >= l || (a <= d || n >= c); }, this.Ua = function (e, t) { t = t || {}; var n = t.forced; if (e.rendered)
|
|
3272
|
-
return !1; var a = "Progressive" === this.dynamicEventRendering, i = e.part.dayIndex, o = s.divEvents,
|
|
3273
|
-
return !1; var
|
|
3274
|
-
var
|
|
3275
|
-
|
|
3276
|
-
var
|
|
3277
|
-
|
|
3278
|
-
}
|
|
3279
|
-
return void s.
|
|
3280
|
-
var n =
|
|
3283
|
+
return !1; var a = "Progressive" === this.dynamicEventRendering, i = e.part.dayIndex, o = s.divEvents, c = s.rowlist, u = c[i], h = u.top, f = this.ke(), v = f.pixels.left - l.vh(), p = f.pixels.right + l.vh(), m = f.pixels.top, g = f.pixels.bottom, y = e.part.left, b = e.part.left + e.part.width, w = e.part.top + h, x = w + s.eventHeight, _ = p <= y || v >= b, C = g <= w || m >= x; if (!n && a && (_ || C))
|
|
3284
|
+
return !1; var k = e.part.width, D = s.eventHeight, S = e.cache || e.data, M = S.borderRadius || s.eventBorderRadius; "number" == typeof M && (M += "px"); var T = S.padding || s.eventPadding; "number" == typeof T && (T += "px"), k = DayPilot.Util.atLeast(0, k), D = DayPilot.Util.atLeast(0, D); var A = r(); A.style.position = "absolute", A.style.left = e.part.left + "px", A.style.top = h + e.part.top + "px", A.style.width = k + "px", A.style.height = D + "px", s.eventTextWrappingEnabled || (A.style.whiteSpace = "nowrap"), A.style.overflow = "hidden", A.className = this.L("_event"), S.cssClass && DayPilot.Util.addClass(A, S.cssClass); "number" == typeof e.part.line && DayPilot.Util.addClass(A, this.L("_event_line" + e.part.line)), M && (A.style.borderRadius = M), this.showToolTip && (A.title = e.client.toolTip() || ""), A.onmousemove = this.wh, A.onmousedown = this.xh, A.onmouseup = this.yh, A.ontouchstart = d.zh, A.ontouchmove = d.Ah, A.ontouchend = d.Bh, e.client.clickEnabled() && (A.onclick = this.Me), "undefined" != typeof S.ariaLabel ? A.setAttribute("aria-label", S.ariaLabel) : A.setAttribute("aria-label", S.text), A.setAttribute("tabindex", "-1"); var E = r(); E.className = s.L("_event_inner"), M && (E.style.borderRadius = M), T && (E.style.padding = T), S.backColor && (E.style.background = S.backColor), S.fontColor && (E.style.color = S.fontColor), "darker" === S.borderColor && S.backColor ? E.style.borderColor = DayPilot.ColorUtil.darker(S.backColor, 2) : E.style.borderColor = S.borderColor, S.backImage && (E.style.backgroundImage = "url(" + S.backImage + ")", S.backRepeat && (E.style.backgroundRepeat = S.backRepeat)), A.appendChild(E); var H = e.start().getTime() === e.part.start.getTime(), R = e.rawend().getTime() === e.part.end.getTime(); if (H || DayPilot.Util.addClass(A, this.L("_event_continueleft")), R || DayPilot.Util.addClass(A, this.L("_event_continueright")), e.client.barVisible() && k > 0) {
|
|
3285
|
+
var N = 100 * e.part.barLeft / k, I = Math.ceil(100 * e.part.barWidth / k), L = r();
|
|
3286
|
+
L.className = this.L("_event_bar"), L.style.position = "absolute", S.barBackColor && (L.style.backgroundColor = S.barBackColor);
|
|
3287
|
+
var P = r();
|
|
3288
|
+
P.className = this.L("_event_bar_inner"), P.style.left = N + "%", 0 < I && I <= 1 ? P.style.width = "1px" : P.style.width = I + "%", S.barColor && (P.style.backgroundColor = S.barColor), S.barImageUrl && (P.style.backgroundImage = "url(" + S.barImageUrl + ")"), L.appendChild(P), A.appendChild(L);
|
|
3289
|
+
} A.row = i, A.event = e, function () { if ("function" != typeof s.onBeforeEventDomAdd && "function" != typeof s.onBeforeEventDomRemove)
|
|
3290
|
+
return void s.Ch(E, S.text, S.html); var t = {}; if (t.control = s, t.e = e, t.element = null, A.domArgs = t, "function" == typeof s.onBeforeEventDomAdd && s.onBeforeEventDomAdd(t), t.element) {
|
|
3291
|
+
var n = E;
|
|
3281
3292
|
if (n) {
|
|
3282
3293
|
t.Pa = n;
|
|
3283
3294
|
var a = DayPilot.Util.isReactComponent(t.element), i = DayPilot.Util.isVueVNode(t.element);
|
|
@@ -3296,53 +3307,53 @@ var DayPilot = { Global: {} };
|
|
|
3296
3307
|
}
|
|
3297
3308
|
}
|
|
3298
3309
|
else
|
|
3299
|
-
|
|
3310
|
+
E.innerHTML = e.client.innerHTML(); }(); var B = []; return function () { if ("Disabled" !== s.eventDeleteHandling && !S.deleteDisabled) {
|
|
3300
3311
|
var e = s.durationBarVisible ? s.durationBarHeight : 0;
|
|
3301
|
-
|
|
3302
|
-
} }(),
|
|
3312
|
+
B.push({ v: "Hover", w: 17, h: 17, top: e + 2, right: 2, css: s.L("_event_delete"), onClick: function (e) { s.ya(e.source); } });
|
|
3313
|
+
} }(), S.areas && (B = B.concat(S.areas)), DayPilot.Areas.attach(A, e, { areas: B }), 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.Ch = 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.nf = function () { for (var e = 0; e < this.elements.events.length; e++) {
|
|
3303
3314
|
var t = this.elements.events[e], n = t.event, a = n.part.dayIndex, i = s.rowlist[a], r = i.top, o = r + n.part.top, l = i.height, d = s.eventHeight;
|
|
3304
3315
|
n.part.top + d > l && (d = Math.max(0, l - n.part.top)), t.style.top = o + "px", t.style.height = d + "px";
|
|
3305
|
-
} }, this.
|
|
3316
|
+
} }, this.Dh = function (e) { if (!e)
|
|
3306
3317
|
return null; for (var t = 0; t < s.elements.events.length; t++) {
|
|
3307
3318
|
var n = s.elements.events[t];
|
|
3308
3319
|
if (n.event === e || n.event.data === e.data)
|
|
3309
3320
|
return n;
|
|
3310
3321
|
} return null; }, this.Kf = function (e) { var t = s.events.Pf(e.data); if (!t)
|
|
3311
|
-
return null; var n = s.rowlist[t.part.dayIndex]; return s.Fg(n), s.Ua(t, { "forced": !0 }), s.
|
|
3312
|
-
t = t.parentNode; s.
|
|
3322
|
+
return null; var n = s.rowlist[t.part.dayIndex]; return s.Fg(n), s.Ua(t, { "forced": !0 }), s.Dh(t); }, this.wh = function (e) { for (var t = e.currentTarget; t && !t.event;)
|
|
3323
|
+
t = t.parentNode; s.Eh(t, e), s.Qe(e); }, this.Oe = {}, this.xh = function (e) { s.Qe(e); var n = DayPilot.Util.mouseButton(e); e.preventDefault(), e.stopPropagation(), n.left && ("w-resize" === this.style.cursor || "e-resize" === this.style.cursor ? (t.Ne = !0, t.fg = this, t.jg = this.event, t.Fh = DayPilot.mc(e), i().style.cursor = this.style.cursor) : ("move" === this.style.cursor || this.event.client.moveEnabled()) && s.Gh(this, e)); }, this.yh = function (e) { DayPilot.Util.mouseButton(e).right && s.xa.call(this, e); }, this.Gh = function (e, t) { var n = s.Oe; s.Qe(t), n.Hh = !0, n.Oe = e, n.mg = e.event, n.Fh = DayPilot.mc(t), n.Ih = DayPilot.mo3(e, t).x, n.eg = s.getDate(s.coords.x, !0); }, "undefined" == typeof DayPilot.Global.touch && (DayPilot.Global.touch = {}), DayPilot.Global.touch.active = !1, DayPilot.Global.touch.start = !1;
|
|
3313
3324
|
d.Gf = [];
|
|
3314
|
-
d.relativeCoords = function (e) { return d.
|
|
3315
|
-
t.stopPropagation(), d.
|
|
3325
|
+
d.relativeCoords = function (e) { return d.Jh(e); }, d.startResizing = function (e, t) { d.Kh(e, t); }, d.startMoving = function (e, t) { d.Gh(e, t); }, d.zh = function (t) { if (!DayPilot.Global.touch.active && !DayPilot.Global.touch.start) {
|
|
3326
|
+
t.stopPropagation(), d.Lh(), DayPilot.Global.touch.start = !0, DayPilot.Global.touch.active = !1;
|
|
3316
3327
|
var n = t.currentTarget;
|
|
3317
|
-
s.coords = d.
|
|
3328
|
+
s.coords = d.Jh(t);
|
|
3318
3329
|
var a = s.tapAndHoldTimeout;
|
|
3319
3330
|
d.Gf.push(setTimeout(function () { DayPilot.Global.touch.active = !0, DayPilot.Global.touch.start = !1, t.preventDefault(); var a = n.event; switch (s.eventTapAndHoldHandling) {
|
|
3320
3331
|
case "Move": if (a.client.moveEnabled()) {
|
|
3321
3332
|
var i = e(t);
|
|
3322
|
-
d.
|
|
3333
|
+
d.Gh(n, i);
|
|
3323
3334
|
}
|
|
3324
3335
|
} }, a));
|
|
3325
|
-
} }, d.
|
|
3326
|
-
if (d.
|
|
3336
|
+
} }, d.Ah = function () { d.Lh(), DayPilot.Global.touch.start = !1; }, d.Bh = function (e) { if (!DayPilot.Util.isMouseEvent(e)) {
|
|
3337
|
+
if (d.Lh(), DayPilot.Global.touch.start) {
|
|
3327
3338
|
DayPilot.Global.touch.start = !1, e.preventDefault(), e.stopPropagation();
|
|
3328
3339
|
var t = e.currentTarget;
|
|
3329
3340
|
setTimeout(function () { s.Pe(t, e); });
|
|
3330
3341
|
}
|
|
3331
3342
|
setTimeout(function () { DayPilot.Global.touch.start = !1, DayPilot.Global.touch.active = !1; }, 500);
|
|
3332
3343
|
} }, d.Mg = function (e) { if (!(DayPilot.Global.touch.active || DayPilot.Global.touch.start || e.touches.length > 1 || "Disabled" === s.timeRangeSelectedHandling)) {
|
|
3333
|
-
d.
|
|
3344
|
+
d.Lh(), DayPilot.Global.touch.start = !0, DayPilot.Global.touch.active = !1;
|
|
3334
3345
|
var t = s.tapAndHoldTimeout;
|
|
3335
|
-
d.Gf.push(setTimeout(function () { DayPilot.Global.touch.active = !0, DayPilot.Global.touch.start = !1, e.preventDefault(), s.coords = d.
|
|
3336
|
-
s.coords = d.
|
|
3337
|
-
} }, d.Ng = function (e) { if (d.
|
|
3338
|
-
return e.preventDefault(), void d.
|
|
3339
|
-
if (e.preventDefault(), s.coords = d.
|
|
3340
|
-
return void d.
|
|
3341
|
-
if (d.
|
|
3342
|
-
var n = d.
|
|
3346
|
+
d.Gf.push(setTimeout(function () { DayPilot.Global.touch.active = !0, DayPilot.Global.touch.start = !1, e.preventDefault(), s.coords = d.Jh(e), d.Mh = s.Nh(); }, t));
|
|
3347
|
+
s.coords = d.Jh(e);
|
|
3348
|
+
} }, d.Ng = function (e) { if (d.Lh(), DayPilot.Global.touch.start = !1, t.fg)
|
|
3349
|
+
return e.preventDefault(), void d.Oh(); if (DayPilot.Global.touch.active) {
|
|
3350
|
+
if (e.preventDefault(), s.coords = d.Jh(e), t.Oe)
|
|
3351
|
+
return void d.Ph();
|
|
3352
|
+
if (d.Mh) {
|
|
3353
|
+
var n = d.Mh;
|
|
3343
3354
|
n.end = { x: Math.floor(s.coords.x / s.cellWidth), "time": s.getDate(s.coords.x, !0) }, s.yf(n);
|
|
3344
3355
|
}
|
|
3345
|
-
} }, d.debug = function () { }, d.Og = function (e) { d.
|
|
3356
|
+
} }, d.debug = function () { }, d.Og = function (e) { d.Lh(); if (DayPilot.Global.touch.active) {
|
|
3346
3357
|
if (t.Oe) {
|
|
3347
3358
|
e.preventDefault();
|
|
3348
3359
|
var n = t.mg;
|
|
@@ -3351,9 +3362,9 @@ var DayPilot = { Global: {} };
|
|
|
3351
3362
|
var a = t.ng.start, r = t.ng.end, o = t.ng.row.id;
|
|
3352
3363
|
DayPilot.Util.removeClass(t.Oe, s.L("_event_moving_source")), DayPilot.de(t.ng), t.ng.calendar = null, i().style.cursor = "", t.Oe = null, t.mg = null, t.ng = null, s.M(n, a, r, o);
|
|
3353
3364
|
}
|
|
3354
|
-
if (d.
|
|
3355
|
-
var l = d.
|
|
3356
|
-
d.
|
|
3365
|
+
if (d.Mh) {
|
|
3366
|
+
var l = d.Mh;
|
|
3367
|
+
d.Mh = null;
|
|
3357
3368
|
var c = s.elements.range2;
|
|
3358
3369
|
c && c.overlapping ? s.clearSelection() : s.uf(l);
|
|
3359
3370
|
}
|
|
@@ -3361,33 +3372,33 @@ var DayPilot = { Global: {} };
|
|
|
3361
3372
|
else if (DayPilot.Global.touch.start) {
|
|
3362
3373
|
if (s.coords.x < s.getScrollX())
|
|
3363
3374
|
return;
|
|
3364
|
-
var l = s.
|
|
3375
|
+
var l = s.Nh();
|
|
3365
3376
|
s.yf(l);
|
|
3366
3377
|
var c = s.elements.range2;
|
|
3367
3378
|
c && c.overlapping ? s.clearSelection() : s.uf(l);
|
|
3368
|
-
} setTimeout(function () { DayPilot.Global.touch.start = !1, DayPilot.Global.touch.active = !1; }, 500); }, d.
|
|
3369
|
-
clearTimeout(d.Gf[e]); d.Gf = []; }, d.
|
|
3379
|
+
} setTimeout(function () { DayPilot.Global.touch.start = !1, DayPilot.Global.touch.active = !1; }, 500); }, d.Lh = function () { for (var e = 0; e < d.Gf.length; e++)
|
|
3380
|
+
clearTimeout(d.Gf[e]); d.Gf = []; }, d.Jh = function (e) { function t(e, t, n) { var a = DayPilot.abs(n); return { x: e - a.x, y: t - a.y, toString: function () { return "x: " + this.x + ", y:" + this.y; } }; } var n = s.ge, a = e.touches ? e.touches[0] : e; return t(a.pageX, a.pageY, n); }, d.Gh = function (e, n) { t.Oe = e, t.mg = e.event, t.Fh = n; var a = DayPilot.abs(e); t.Ih = n.x - a.x, t.eg = s.getDate(s.coords.x, !0), t.ng = s.ca(e), s.lg(); }, d.Kh = function (e, n) { t.fg = e, t.jg = e.event, t.fg.dpBorder = n, t.ig || (t.ig = s.ca(e)), s.kg(); }, d.Oh = function () { if (!t.ig) {
|
|
3370
3381
|
var e = t.fg;
|
|
3371
3382
|
t.ig = s.ca(e);
|
|
3372
|
-
} s.kg(); }, d.
|
|
3383
|
+
} s.kg(); }, d.Ph = function () { if (!t.ng) {
|
|
3373
3384
|
var e = t.Oe;
|
|
3374
3385
|
t.ng = s.ca(e);
|
|
3375
|
-
} t.ng.calendar.lg(); }, this.
|
|
3386
|
+
} t.ng.calendar.lg(); }, this.Eh = function (e, n) { var a = this.eventResizeMargin, i = e; if ("undefined" != typeof t) {
|
|
3376
3387
|
var r = DayPilot.mo3(e, n);
|
|
3377
3388
|
if (r && (s.eventOffset = r, !t.fg && !t.Oe)) {
|
|
3378
3389
|
var o = i.event.part.start.toString() === i.event.start().toString(), l = i.event.part.end.toString() === i.event.rawend().toString();
|
|
3379
3390
|
r.x <= a && i.event.client.resizeEnabled() ? o ? (e.style.cursor = "w-resize", e.dpBorder = "left") : e.style.cursor = "not-allowed" : e.offsetWidth - r.x <= a && i.event.client.resizeEnabled() ? l ? (e.style.cursor = "e-resize", e.dpBorder = "right") : e.style.cursor = "not-allowed" : t.fg || t.Oe || (i.event.client.clickEnabled() ? e.style.cursor = "pointer" : e.style.cursor = "default");
|
|
3380
3391
|
}
|
|
3381
|
-
} }, this.zf = function () { var e = s.Le(); return s.days * (1440 / e); }, this.vf = function (e) { if (e = e || t.
|
|
3392
|
+
} }, this.zf = function () { var e = s.Le(); return s.days * (1440 / e); }, this.vf = function (e) { if (e = e || t.Mh || s.xf, !e)
|
|
3382
3393
|
return null; var n = s.rowlist[e.start.y]; if (!n)
|
|
3383
3394
|
return null; var a, i, r = e, o = r.end.time > r.start.time, l = n.id, d = o ? r.start.x : r.end.x, c = o ? r.end.x : r.start.x, u = s.snapToGrid; u ? (a = s.Ie(d).start, i = s.Ie(c).end) : o ? (a = r.start.time, i = r.end.time) : (a = r.end.time, i = r.start.time); var h = new DayPilot.Selection(a, i, l, s); return h.allowed = !e.div || !e.div.overlapping, h; }, this.Ye = function () { this.xb.timeHeader = {}, s.elements.timeHeader.length > 0 && (s.elements.timeHeader = []); var e = r(); e.style.position = "relative", this.nav.timeHeader = e; for (var t = 0; t < this.timeHeader.length; t++)
|
|
3384
3395
|
for (var n = this.timeHeader[t], a = 0; a < n.length; a++)
|
|
3385
|
-
this.
|
|
3396
|
+
this.Qh(a, t); var i = this.divNorth; 1 === i.childNodes.length ? i.replaceChild(e, i.childNodes[0]) : (i.innerHTML = "", i.appendChild(e)); var o = this.ze(); i.style.width = o + 5e3 + "px", o > 0 && (this.divStretch.style.width = o + "px"); }, this.Ge = function (e, t) { var n = null, a = this.R.Fe(); t = t || this.cellGroupBy; var i = e.start; switch (t) {
|
|
3386
3397
|
case "Minute":
|
|
3387
3398
|
n = i.toString("m");
|
|
3388
3399
|
break;
|
|
3389
3400
|
case "Hour":
|
|
3390
|
-
n = "Clock12Hours" === s.R.
|
|
3401
|
+
n = "Clock12Hours" === s.R.Rh() ? i.toString("h tt", a) : i.toString("H", a);
|
|
3391
3402
|
break;
|
|
3392
3403
|
case "Day":
|
|
3393
3404
|
n = i.toString(a.datePattern);
|
|
@@ -3409,10 +3420,10 @@ var DayPilot = { Global: {} };
|
|
|
3409
3420
|
break;
|
|
3410
3421
|
case "Cell":
|
|
3411
3422
|
var r = (e.end.ticks - e.start.ticks) / 6e4;
|
|
3412
|
-
n = this.
|
|
3423
|
+
n = this.Sh(i, r);
|
|
3413
3424
|
break;
|
|
3414
3425
|
default: throw new DayPilot.Exception("Invalid groupBy value: " + t);
|
|
3415
|
-
} return n; }, this.
|
|
3426
|
+
} return n; }, this.Sh = function (e, t) { var n = this.R.Fe(); return t = t || this.cellDuration, t < 1 ? e.toString("ss") : t < 60 ? e.toString("mm") : t < 1440 ? "Clock12Hours" === s.R.Rh() ? e.toString("h tt", n) : e.toString("H", n) : t < 10080 ? e.toString("d") : 10080 === t ? 1 === l.ea() ? e.weekNumberISO() : e.weekNumber() : e.toString("MMMM yyyy", n); }, this.Ee = function (e, t, n) { var a, i = s.startDate.addDays(s.days); t = t || this.cellGroupBy; var r = 60; switch (t) {
|
|
3416
3427
|
case "Minute":
|
|
3417
3428
|
e.getMinutes() + e.getSeconds() + e.getMilliseconds() > 0 && (e = e.getDatePart().addHours(e.getHours()).addMinutes(e.getMinutes())), a = e.addMinutes(1);
|
|
3418
3429
|
break;
|
|
@@ -3450,7 +3461,7 @@ var DayPilot = { Global: {} };
|
|
|
3450
3461
|
d.current && (a = d.current.end);
|
|
3451
3462
|
break;
|
|
3452
3463
|
default: throw n ? new DayPilot.Exception("Invalid scale value: " + t) : new DayPilot.Exception("Invalid groupBy value: " + t);
|
|
3453
|
-
} return a.getTime() > i.getTime() && (a = i), a; }, this.
|
|
3464
|
+
} return a.getTime() > i.getTime() && (a = i), a; }, this.Qh = function (e, t) { var n = this.nav.timeHeader, a = this.timeHeader[t][e], i = t < this.timeHeader.length - 1, o = a.left, l = a.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", a.toolTip && (u.title = a.toolTip), u.setAttribute("aria-hidden", "true"), a.cssClass && DayPilot.Util.addClass(u, a.cssClass), u.style.userSelect = "none", u.style.webkitUserSelect = "none", u.oncontextmenu = function () { return !1; }, u.cell = {}, u.cell.start = a.start, u.cell.end = a.end, u.cell.level = t, u.cell.th = a, u.onclick = this.Ag, u.oncontextmenu = this.Bg, 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(a.text, a.html), a.backColor && (h.style.background = a.backColor), a.fontColor && (h.style.color = a.fontColor); var f = this.L("_timeheadercol"), v = this.L("_timeheadercol_inner"); i && (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, a, { areas: a.areas }), this.xb.timeHeader[e + "_" + t] = u, this.elements.timeHeader.push(u), n.appendChild(u); }, this._f = function () { s.rowlist.forEach(function (e) { var t = e.getHeight() + s.rowMarginTop + s.rowMarginBottom; e.height !== t && (s.kf = !0), e.height = t; }), s.kf && (s.xb.drawArea = null); }, this.Ze = function () { s.rowlist.forEach(function (e) { var t = s.divHeader; if (t) {
|
|
3454
3465
|
var n = e.index;
|
|
3455
3466
|
if (t.rows[n]) {
|
|
3456
3467
|
var a = t.rows[n];
|
|
@@ -3460,31 +3471,31 @@ var DayPilot = { Global: {} };
|
|
|
3460
3471
|
}
|
|
3461
3472
|
} }), s.rg && s.nav.resScrollSpace && (s.nav.resScrollSpace.style.top = s._d + "px"); }, this.ah = function (e) { if (DayPilot.Global.touch.start || DayPilot.Global.touch.active)
|
|
3462
3473
|
return !1; if (s.Qe(e), "Disabled" === s.timeRangeSelectedHandling)
|
|
3463
|
-
return !1; var n = DayPilot.Util.mouseButton(e); if (s.
|
|
3474
|
+
return !1; var n = DayPilot.Util.mouseButton(e); if (s.Th())
|
|
3464
3475
|
return !1; if (n.middle || n.right)
|
|
3465
|
-
return !1; if (s.
|
|
3466
|
-
return !1; var a = n.left ? "left" : n.right ? "right" : n.middle ? "middle" : "unknown"; return s.
|
|
3476
|
+
return !1; if (s.Uh(s.coords))
|
|
3477
|
+
return !1; var a = n.left ? "left" : n.right ? "right" : n.middle ? "middle" : "unknown"; return s.Vh = a, t.Mh = s.Nh(), t.Mh && (t.Wh = s), !1; }, this.Nh = function () { var e = {}, t = s.He(s.coords.x).x, n = s.getDate(s.coords.x, !0); return e.start = { y: s.Ff(s.coords.y).i, x: t, "time": n }, e.end = { x: t, "time": n }, e.calendar = s, s.yf(e), e; }, this.ch = function (e) { if (s.Oe = {}, s.xf) {
|
|
3467
3478
|
if (DayPilot.Util.mouseButton(e).left) {
|
|
3468
3479
|
var n = s.xf;
|
|
3469
|
-
if (s.
|
|
3470
|
-
var a = function (e) { return function () { t.
|
|
3480
|
+
if (s.Uh(s.coords)) {
|
|
3481
|
+
var a = function (e) { return function () { t.Xh = null; var n = s.vf(e); if (n) {
|
|
3471
3482
|
var a = {};
|
|
3472
3483
|
a.start = n.start, a.end = n.end, a.resource = n.resource, a.preventDefault = function () { a.preventDefault.value = !0; }, "function" == typeof s.onTimeRangeClick && s.onTimeRangeClick(a), a.preventDefault.value || "function" == typeof s.onTimeRangeClicked && s.onTimeRangeClicked(a);
|
|
3473
3484
|
} }; };
|
|
3474
3485
|
"Disabled" !== s.timeRangeClickHandling && a(n)();
|
|
3475
3486
|
}
|
|
3476
3487
|
}
|
|
3477
|
-
} }, this.
|
|
3488
|
+
} }, this.Th = function () { return !!(t.fg || t.Oe || t.Mh) || !!s.Oe.Hh; }, this.dragInProgress = function () { return s.Th(); }, this.Qe = function (e) { var t = DayPilot.mo3(s.ge, e); t = t || {}, t.stamp = t.x + "_" + t.y, s.coords && s.coords.stamp === t.stamp || (s.coords = t); }, this.bh = function (e) { if (!DayPilot.Global.touch.active) {
|
|
3478
3489
|
var n = DayPilot.mc(e);
|
|
3479
|
-
if (s.Qe(e), s.Oe.
|
|
3480
|
-
DayPilot.distance(s.Oe.
|
|
3490
|
+
if (s.Qe(e), s.Oe.Hh) {
|
|
3491
|
+
DayPilot.distance(s.Oe.Fh, n) > 2 && (DayPilot.Util.copyProps(s.Oe, t), i().style.cursor = "move", s.Oe = {});
|
|
3481
3492
|
}
|
|
3482
|
-
t.fg && t.jg.calendar === s ? (t.fg.event || (t.fg.event = t.jg), s.
|
|
3483
|
-
} }, this
|
|
3493
|
+
t.fg && t.jg.calendar === s ? (t.fg.event || (t.fg.event = t.jg), s.Yh()) : t.mg ? s.Zh() : t.Mh && t.Mh.calendar === s && (t.Mh.moved = !0, s.$h());
|
|
3494
|
+
} }, this.$h = function () { var e = t.Mh, n = s.He(s.coords.x).x, a = s.getDate(s.coords.x, !0); e.end = { x: n, "time": a }, s.yf(e); }, this.Yh = function () { t.ig || (t.ig = s.ca(t.fg)), s.kg(); }, this.Zh = function () { if (!t.ng) {
|
|
3484
3495
|
DayPilot.Util.addClass(t.Oe, s.L("_event_moving_source"));
|
|
3485
3496
|
var e = t.mg;
|
|
3486
3497
|
t.ng = s.ca(e);
|
|
3487
|
-
} s.lg(); }, this.dh = function (e) { return e.cancelBubble = !0, !1; }, this.
|
|
3498
|
+
} s.lg(); }, this.dh = function (e) { return e.cancelBubble = !0, !1; }, this.Uh = function (e) { var t = s.xf; if (!t || !t.start || !t.end)
|
|
3488
3499
|
return !1; var n = this.If(t.start.y), a = t.start.x < t.end.x, i = (a ? t.start.x : t.end.x) * this.cellWidth, r = (a ? t.end.x : t.start.x) * this.cellWidth + this.cellWidth, o = n.top, l = n.bottom; return e.x >= i && e.x <= r && e.y >= o && e.y <= l; }, this.yf = function (e) { function n(e) { var t, n, l, d, c = e.end.time > e.start.time, u = e.start.y, h = e.start.time && e.end.time; if (i || !h) {
|
|
3489
3500
|
var f = c ? e.start.x : e.end.x, v = c ? e.end.x : e.start.x, p = s.Ie(f), m = s.Ie(v);
|
|
3490
3501
|
t = p.left, n = m.left + m.width;
|
|
@@ -3494,66 +3505,66 @@ var DayPilot = { Global: {} };
|
|
|
3494
3505
|
y = r(), y.style.position = "absolute";
|
|
3495
3506
|
var b = r();
|
|
3496
3507
|
b.className = s.L("_shadow_inner"), a && (y.style.borderRadius = a, b.style.borderRadius = a), y.appendChild(b), s.divShadow.appendChild(y);
|
|
3497
|
-
} return y.className = s.L("_shadow"), y.firstChild.innerHTML = "", y.style.left = t + "px", y.style.top = o[u].top + "px", y.style.width = g + "px", y.style.height = o[u].height - 1 + "px", y.calendar = s, s.elements.range2 = y, y; } if (e = e || t.
|
|
3508
|
+
} return y.className = s.L("_shadow"), y.firstChild.innerHTML = "", y.style.left = t + "px", y.style.top = o[u].top + "px", y.style.width = g + "px", y.style.height = o[u].height - 1 + "px", y.calendar = s, s.elements.range2 = y, y; } if (e = e || t.Mh) {
|
|
3498
3509
|
var a = s.eventBorderRadius;
|
|
3499
3510
|
"number" == typeof a && (a += "px");
|
|
3500
3511
|
var i = s.snapToGrid, o = s.rowlist;
|
|
3501
3512
|
n(e);
|
|
3502
|
-
} }, this.
|
|
3513
|
+
} }, this._h = 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)
|
|
3503
3514
|
return null; var e = {}; e.x = s.coords.x, e.y = s.coords.y; var t = s.Ff(e.y, e.grid).element; return e.row = s.zg(t), e.time = s.getDate(e.x, !0), e; }, this.Gf = {}, this.Gf.na = null, this.Gf.drawCells = null, this.Gf.drawRows = null, this.Gf.click = null, this.Gf.resClick = [], this.Gf.updateFloats = null, this.df = function () { if (!s.Q) {
|
|
3504
3515
|
s.bf();
|
|
3505
3516
|
var e = s.nav.scroll;
|
|
3506
3517
|
if (s.ih = e.scrollLeft, s.jh = e.scrollTop, s.kh = e.clientWidth, s.divTimeScroll && (s.divTimeScroll.scrollLeft = s.ih), DayPilot.browser.ios && t.Vg ? n() : s.divResScroll.scrollTop = s.jh, s.progressiveRowRendering && (s.Gf.drawRows && (clearTimeout(s.Gf.drawRows), s.Gf.drawRows = null), s.scrollDelayRows > 0 ? s.Gf.drawRows = setTimeout(function () { s.ug(); }, s.scrollDelayRows) : s.ug()), s.Gf.drawCells && (clearTimeout(s.Gf.drawCells), s.Gf.drawCells = null), s.scrollDelayCells > 0)
|
|
3507
|
-
s.Gf.drawCells = setTimeout(s
|
|
3518
|
+
s.Gf.drawCells = setTimeout(s.ai(), s.scrollDelayCells);
|
|
3508
3519
|
else {
|
|
3509
|
-
s
|
|
3520
|
+
s.ai()();
|
|
3510
3521
|
}
|
|
3511
|
-
s.Gf.na && (clearTimeout(s.Gf.na), s.Gf.na = null), s.scrollDelayEvents > 0 ? s.Gf.na = setTimeout(s.
|
|
3512
|
-
} }, this
|
|
3522
|
+
s.Gf.na && (clearTimeout(s.Gf.na), s.Gf.na = null), s.scrollDelayEvents > 0 ? s.Gf.na = setTimeout(s.bi(), s.scrollDelayEvents) : s.na(), s.Gf.updateFloats && (clearTimeout(s.Gf.updateFloats), s.Gf.updateFloats = null), s.scrollDelayFloats > 0 ? s.Gf.updateFloats = setTimeout(function () { s.ne(); }, s.scrollDelayFloats) : s.ne(), s.onScrollCalled = !0;
|
|
3523
|
+
} }, this.ai = function () { return function () { s && s.cf(); }; }, this.bi = function () { return function () { s && (s.rh() ? setTimeout(function () { s.oh(), setTimeout(function () { s.na(!0); }, 50); }, 50) : s.oe()); }; }, this.bf = function () { s.xb.drawArea = null; }, this.show = function () { s.visible = !0, s.ae = !0, s.nav.top.style.display = "", s.u(), s.$g(), s.df(); }, this.hide = function () { s.visible = !1, s.ae = !1, s.nav.top.style.display = "none"; }, this.Vf = function (e) { if (!s.events.list)
|
|
3513
3524
|
return null; for (var t = 0; t < this.events.list.length; t++) {
|
|
3514
3525
|
var n = this.events.list[t];
|
|
3515
3526
|
if (s.Of(n, e)) {
|
|
3516
3527
|
var a = {};
|
|
3517
3528
|
return a.ex = n, a.index = t, a;
|
|
3518
3529
|
}
|
|
3519
|
-
} return null; }, this.
|
|
3530
|
+
} return null; }, this.ci = function () { var e = this.ke(), t = e.xStart, n = e.xEnd - e.xStart, a = e.yStart, i = e.yEnd - e.yStart; this.cellProperties || (this.cellProperties = {}); for (var r = 0; r <= n; r++) {
|
|
3520
3531
|
for (var o = t + r, s = 0; s < i; s++) {
|
|
3521
3532
|
var l = a + s;
|
|
3522
3533
|
this.gd(o, l);
|
|
3523
3534
|
}
|
|
3524
|
-
this.
|
|
3535
|
+
this.di(o);
|
|
3525
3536
|
} for (var d = this.pg(), l = d.start; l < d.end; l++)
|
|
3526
|
-
this.
|
|
3537
|
+
this.ei(l); }, this.cf = function () { if (!s.Q) {
|
|
3527
3538
|
var e = s.rowlist;
|
|
3528
3539
|
if (e && e.length > 0) {
|
|
3529
3540
|
if (this.cellSweeping) {
|
|
3530
3541
|
var t = this.cellSweepingCacheSize;
|
|
3531
|
-
this.
|
|
3542
|
+
this.qh(t);
|
|
3532
3543
|
}
|
|
3533
|
-
this.
|
|
3544
|
+
this.ci();
|
|
3534
3545
|
}
|
|
3535
3546
|
this.kf = !1;
|
|
3536
3547
|
} }, this.ke = function () { if (s.xb.drawArea)
|
|
3537
3548
|
return s.xb.drawArea; if (!this.nav.scroll)
|
|
3538
|
-
return null; var e = s.jh, t = {}, n =
|
|
3549
|
+
return null; var e = s.jh, t = {}, n = l.vh(), a = l.mh(), i = s.ih - n, r = i + s.kh + 2 * n, o = 0, d = 0; o = s.He(i).x, d = s.He(r, !0).x; var c = this.zf(); d = Math.min(d, c - 1), o = DayPilot.Util.atLeast(o, 0); var u = e - a, h = e + this.nav.scroll.offsetHeight + 2 * a, f = this.Ff(u).i, v = this.Ff(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.ze = function () { return s.zf() * s.cellWidth; }, this.ei = function (e) { var t = s.rowlist, n = s.divLines, a = "y_" + e; if (!this.xb.linesHorizontal[a]) {
|
|
3539
3550
|
var i = t[e], o = i.height, l = i.top + o - 1, d = this.ze(), c = r();
|
|
3540
3551
|
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[a] = c;
|
|
3541
|
-
} }, this.
|
|
3552
|
+
} }, this.di = function (e) { var t = s.Ie(e); if (t) {
|
|
3542
3553
|
var n = s.divLines, a = s._d, i = "x_" + e;
|
|
3543
3554
|
if (!this.xb.linesVertical[i]) {
|
|
3544
3555
|
var o = t.left + t.width - 1, l = r();
|
|
3545
3556
|
l.style.left = o + "px", l.style.top = "0px", l.style.width = "1px", l.style.height = a + "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[i] = l;
|
|
3546
3557
|
}
|
|
3547
|
-
} }, this.We = function () { s._d = s.
|
|
3558
|
+
} }, this.We = function () { s._d = s.fi(s.rowlist); }, this.fi = function (e) { for (var t = 0, n = 0; n < e.length; n++) {
|
|
3548
3559
|
var a = e[n];
|
|
3549
3560
|
a.top = t, t += a.height;
|
|
3550
|
-
} return t; }, this._e = function () { s.elements.cells = [], s.xb.cells = [], s.divCells.innerHTML = "", s.
|
|
3561
|
+
} return t; }, this._e = function () { s.elements.cells = [], s.xb.cells = [], s.divCells.innerHTML = "", s.gi(); }, this.gi = function () { s.divLines.innerHTML = "", s.xb.linesVertical = {}, s.xb.linesHorizontal = {}, s.elements.linesVertical = []; }, this.of = function (e) { var t = []; for (var n in s.xb.cells)
|
|
3551
3562
|
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) {
|
|
3552
3563
|
var n = s.Ie(e);
|
|
3553
3564
|
if (n) {
|
|
3554
3565
|
var a = s.rowlist, i = s.divCells, o = e + "_" + t;
|
|
3555
3566
|
if (!this.xb.cells[o]) {
|
|
3556
|
-
var l = this.
|
|
3567
|
+
var l = this.hi(e, t), d = s.ii(e, t), c = r();
|
|
3557
3568
|
if (c.style.left = n.left + "px", c.style.top = a[t].top + "px", c.style.width = n.width + "px", c.style.height = a[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) {
|
|
3558
3569
|
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) {
|
|
3559
3570
|
switch (c.style.display = "flex", l.horizontalAlignment) {
|
|
@@ -3602,18 +3613,20 @@ var DayPilot = { Global: {} };
|
|
|
3602
3613
|
} }(), i.appendChild(c), this.elements.cells.push(c), this.xb.cells[o] = c;
|
|
3603
3614
|
}
|
|
3604
3615
|
}
|
|
3605
|
-
} }, this.
|
|
3606
|
-
return null; var a = s.rowlist[t], i = a.id, r = n.start, o = n.end, l = {}; if (l.cell = { x: e, y: t, start: r, end: o, resource: i, row: s.zg(a), properties: s.
|
|
3616
|
+
} }, this.ii = function (e, t) { var n = s.Ie(e); if (!n)
|
|
3617
|
+
return null; var a = s.rowlist[t], i = a.id, r = n.start, o = n.end, l = {}; if (l.cell = { x: e, y: t, start: r, end: o, resource: i, row: s.zg(a), properties: s.hi(e, t) }, l.control = s, "function" == typeof this.onBeforeCellRender) {
|
|
3607
3618
|
var d = e + "_" + t;
|
|
3608
3619
|
if (s.beforeCellRenderCaching && s.af[d])
|
|
3609
3620
|
return l;
|
|
3610
3621
|
s.af[d] = !0, this.onBeforeCellRender(l);
|
|
3611
|
-
} return l; }, this.clearSelection = function () { this.
|
|
3622
|
+
} return l; }, this.clearSelection = function () { this.ji(); }, this.ki = function (e, t, n) { e = new DayPilot.Date(e), t = new DayPilot.Date(t); var a = s.ie(n), i = s.Ke(e); if (!i.current)
|
|
3612
3623
|
throw new DayPilot.Exception("Time range selection 'start' out of timeline"); var r = s.Ke(new DayPilot.Date(t).addMilliseconds(-1)); if (!r.current)
|
|
3613
|
-
throw new DayPilot.Exception("Time range selection 'end' out of timeline"); var o = {}; return o.start = { y: a.index, x: i.i, "time": e }, o.end = { x: r.i, "time": t }, o.calendar = this, o; }, this.selectTimeRange = function (e, t, n, a) { var i = s.
|
|
3624
|
+
throw new DayPilot.Exception("Time range selection 'end' out of timeline"); var o = {}; return o.start = { y: a.index, x: i.i, "time": e }, o.end = { x: r.i, "time": t }, o.calendar = this, o; }, this.selectTimeRange = function (e, t, n, a) { var i = s.ki(e, t, n); s.yf(i), a || setTimeout(function () { s.uf(i); }, 0); }, this.sf = function () { var e = t.ng && t.ng.source; e && DayPilot.Util.removeClass(e, s.L("_event_moving_source")), DayPilot.de(t.ng), t.ng = null, DayPilot.Global.movingLink && (DayPilot.Global.movingLink.clear(), DayPilot.Global.movingLink = null); }, this.ji = function () { s.divShadow && (s.divShadow.innerHTML = ""), s.elements.range = [], s.elements.range2 = null, s.xf = null, s.li = null; }, l.Kd = function () { delete s.xb.headerHeight; }, l.da = function () { return "Disabled" !== s.xssProtection; }, l.Fe = function () { return DayPilot.Locale.find(s.locale); }, l.Rh = function () { return "Auto" !== s.timeFormat ? s.timeFormat : l.Fe().timeFormat; }, l.ea = function () { if ("Auto" === s.weekStarts) {
|
|
3614
3625
|
var e = l.Fe();
|
|
3615
3626
|
return e ? e.weekStarts : 0;
|
|
3616
|
-
} return s.weekStarts || 0; }, l.wg = function () { var e = navigator.userAgent.toLowerCase(); return e.indexOf("mobile") !== -1 || e.indexOf("android") != -1; }, l.dg = function (e) { return "Always" === s.useEventBoxes || "Never" !== s.useEventBoxes && e < 60 * s.Le() * 1e3; },
|
|
3627
|
+
} return s.weekStarts || 0; }, l.wg = function () { var e = navigator.userAgent.toLowerCase(); return e.indexOf("mobile") !== -1 || e.indexOf("android") != -1; }, l.dg = function (e) { return "Always" === s.useEventBoxes || "Never" !== s.useEventBoxes && e < 60 * s.Le() * 1e3; }, l.vh = function () { var e = s.dynamicEventRenderingMarginX; if ("number" == typeof e)
|
|
3628
|
+
return e; var t = s.dynamicEventRenderingMargin; return "number" == typeof t ? t : 0; }, l.mh = function () { var e = s.dynamicEventRenderingMarginY; if ("number" == typeof e)
|
|
3629
|
+
return e; var t = s.dynamicEventRenderingMargin; return "number" == typeof t ? t : 0; }, this.hi = function (e, t) { var n = e + "_" + t, a = s.rowlist; if (this.cellProperties || (this.cellProperties = {}), this.cellProperties[n])
|
|
3617
3630
|
return this.cellProperties[n]; if (!this.cellProperties[n]) {
|
|
3618
3631
|
var i = a[t], r = i.id, o = s.Ie(e), l = o.start, d = o.end, c = {};
|
|
3619
3632
|
c.start = l, c.end = d, c.resource = r;
|
|
@@ -3634,7 +3647,7 @@ var DayPilot = { Global: {} };
|
|
|
3634
3647
|
return !0;
|
|
3635
3648
|
if (r >= l)
|
|
3636
3649
|
return !1;
|
|
3637
|
-
} return !0; }, this.u = function () { "hidden" === this.nav.top.style.visibility && (this.nav.top.style.visibility = "visible"); }, this.
|
|
3650
|
+
} return !0; }, this.u = function () { "hidden" === this.nav.top.style.visibility && (this.nav.top.style.visibility = "visible"); }, this.mi = function (e) { this.heightSpec = "Fixed", this.height = e - (this.Be() + 2), this.ma(); }, this.setHeight = this.mi, this.ie = function (e) { return s.Dg(e)[0]; }, this.wb = function () { if (this.id && this.id.tagName)
|
|
3638
3651
|
this.nav.top = this.id;
|
|
3639
3652
|
else {
|
|
3640
3653
|
if ("string" != typeof this.id)
|
|
@@ -3649,8 +3662,8 @@ var DayPilot = { Global: {} };
|
|
|
3649
3662
|
return s;
|
|
3650
3663
|
throw new DayPilot.Exception("The target placeholder was already initialized by another DayPilot component instance.");
|
|
3651
3664
|
}
|
|
3652
|
-
return this.
|
|
3653
|
-
}, this.
|
|
3665
|
+
return this.ni(), this.Zg(), this;
|
|
3666
|
+
}, this.ni = function () { this.Lg(), this.pb(), this.ba(), this.hh(), this.qb(); var angular = s.ye.enabled; s.scrollToDate ? s.scrollTo(s.scrollToDate) : s.scrollX || s.scrollY ? s.setScroll(s.scrollX, s.scrollY) : angular || s.df(), s.scrollToResourceId && (s.scrollToResource(s.scrollToResourceId), s.scrollToResourceId = null); var e = function () { s.scrollY && s.setScroll(s.scrollX, s.scrollY); }; setTimeout(e, 200), this.bf(), this.vb(), this.La = !0; var t = s.fe; t ? s.scrollTo(t) : s.df(); }, this.ub = null, this.sb = function (e) { if (e) {
|
|
3654
3667
|
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.ee(this.data); } }, "scrollX": { "postInit": function () { this.data && s.he(this.data); } }, "scrollY": { "postInit": function () { this.data && s.Ae(this.data); } } };
|
|
3655
3668
|
s.ub = t, s.ye.scrollToRequested && (t.scrollTo.data = s.ye.scrollToRequested, s.ye.scrollToRequested = null), s.ye.scrollXRequested && (t.scrollX.data = s.ye.scrollXRequested, s.ye.scrollXRequested = null), s.ye.scrollYRequested && (t.scrollY.data = s.ye.scrollYRequested, s.ye.scrollYRequested = null);
|
|
3656
3669
|
for (var n in e)
|
|
@@ -3664,13 +3677,13 @@ var DayPilot = { Global: {} };
|
|
|
3664
3677
|
var n = e[t];
|
|
3665
3678
|
n.postInit && n.postInit();
|
|
3666
3679
|
} s.ub = {}; }, this.bg = {}, this.bg.reactDOM = null, this.bg.react = null, this.bg.Uc = function (e, t) { var n = s.bg.reactDOM; if ("function" == typeof n.createRoot) {
|
|
3667
|
-
var a = t.
|
|
3668
|
-
a || (a = n.createRoot(t), t.
|
|
3680
|
+
var a = t.oi;
|
|
3681
|
+
a || (a = n.createRoot(t), t.oi = a), a.render(e);
|
|
3669
3682
|
}
|
|
3670
3683
|
else
|
|
3671
|
-
n.render(e, t); }, this.bg.
|
|
3672
|
-
var n = e.
|
|
3673
|
-
setTimeout(function () { n.unmount(), e.
|
|
3684
|
+
n.render(e, t); }, this.bg.nh = function (e) { var t = s.bg.reactDOM; if ("function" == typeof t.createRoot) {
|
|
3685
|
+
var n = e.oi;
|
|
3686
|
+
setTimeout(function () { n.unmount(), e.oi = null; }, 0);
|
|
3674
3687
|
}
|
|
3675
3688
|
else
|
|
3676
3689
|
t.unmountComponentAtNode(e); }, this.Ra = {}, this.Ra.Qa = null, this.Ra.Lb = function (e, t, n) { var a = s.Ra.Qa; if ("function" == typeof a.createVNode && "function" == typeof a.render) {
|
|
@@ -3682,16 +3695,16 @@ var DayPilot = { Global: {} };
|
|
|
3682
3695
|
} }, this.Ra.Ta = function (e) { var t = s.Ra.Qa; "function" == typeof t.render && t.render(null, e); }, this.internal = {}, this.internal.adjustEndIn = s.pf, this.internal.adjustEndNormalize = s.qf, this.internal.xssTextHtml = s.$a, this.internal.touch = s.be, this.internal.skipUpdate = s.ye.skipUpdate, this.internal.skipped = s.ye.skipped, this.internal.loadOptions = s.sb, this.internal.postInit = s.vb, this.internal.enableAngular2 = function () { s.ye.enabled = !0; }, this.internal.eventsFromAttr = function () { s.ye.Tf = !0; }, this.internal.resourcesFromAttr = function () { s.ye.ag = !0; }, this.internal.evImmediateRefresh = function () { s.events.tf(); }, this.internal.enableReact = function (e, t) { s.bg.react = e, s.bg.reactDOM = t; }, this.internal.reactRefs = function () { return DayPilot.Util.copyProps(s.bg, {}, ["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);
|
|
3683
3696
|
}, a = "${v}" === (new DayPilot.Scheduler).v, DayPilot.Row = function (e, t) { if (!e)
|
|
3684
3697
|
throw new DayPilot.Exception("Now row object supplied when creating DayPilot.Row"); if (!t)
|
|
3685
|
-
throw new DayPilot.Exception("No parent control supplied when creating DayPilot.Row"); this.
|
|
3686
|
-
e.push(a.
|
|
3698
|
+
throw new DayPilot.Exception("No parent control supplied when creating DayPilot.Row"); this.pi = {}; var n = this.pi; n.id = e.id, n.name = e.name, n.data = e.resource, n.tags = e.tags; var a = this; a.isRow = !0, a.menuType = "resource", a.name = e.name, a.id = e.id, a.tags = e.tags, a.index = e.index, a.calendar = t, a.data = e.resource, a.qi = e, a.$ = {}, a.$.row = e, a.toJSON = function () { var e = {}; return e.start = this.start, e.name = this.name, e.id = this.id, e.index = this.index, e; }, a.events = {}, a.events.all = function () { for (var e = [], t = 0; t < a.qi.events.length; t++)
|
|
3699
|
+
e.push(a.qi.events[t]); return e; }, a.events.isEmpty = function () { return 0 === a.qi.events.length; }, a.events.forRange = function (e, t) { return a.qi.events.forRange(e, t); }, a.events.totalDuration = function () { var e = 0; return a.events.all().forEach(function (t) { e += t.part.end.getTime() - t.part.start.getTime(); }), new DayPilot.Duration(e); }, a.remove = function () { t.rows.remove(a); }, a.addClass = function (e) { var n = t.divHeader, i = n.rows[a.index]; DayPilot.Util.addClass(i, e), a.$.row.cssClass = DayPilot.Util.addClassToString(a.$.row.cssClass, e), a.data.cssClass = e; }, a.removeClass = function (e) { var n = t.divHeader, i = n.rows[a.index]; DayPilot.Util.removeClass(i, e), a.$.row.cssClass = DayPilot.Util.removeClassFromString(a.$.row.cssClass, e), a.data.cssClass = DayPilot.Util.removeClassFromString(a.data.cssClass, e); }; }, t.Oe = null, t.mg = null, t.Fh = null, t.fg = null, t.jg = null, t.Ne = !1, t.eh = !1, t.Xh = null, t.ri = null, t.pc = function () { DayPilot.ue(document, "mouseup", t.$d), DayPilot.ue(document, "touchmove", t.fh), DayPilot.ue(document, "touchend", t.gh), t.eh = !1; }, t.fh = function (e) { if (t.fg) {
|
|
3687
3700
|
var n = t.fg.event.calendar;
|
|
3688
|
-
n.coords = n.be.
|
|
3701
|
+
n.coords = n.be.Jh(e), n.be.Oh(), e.preventDefault();
|
|
3689
3702
|
} if (t.Oe) {
|
|
3690
3703
|
e.preventDefault();
|
|
3691
3704
|
var n = t.mg.calendar;
|
|
3692
|
-
n.coords = n.be.
|
|
3705
|
+
n.coords = n.be.Jh(e), n.be.Ph();
|
|
3693
3706
|
} }, t.gh = function (e) { t.Vg = !1, t.$d(e); }, t.$d = function (e) { if (t.fg) {
|
|
3694
|
-
var a = function () { var e = t.jg, n = e.calendar; i().style.cursor = "", t.fg = null, t.jg = null, DayPilot.de(t.ig), t.ig = null, n && (n.
|
|
3707
|
+
var a = function () { var e = t.jg, n = e.calendar; i().style.cursor = "", t.fg = null, t.jg = null, DayPilot.de(t.ig), t.ig = null, n && (n.si = null); };
|
|
3695
3708
|
if (setTimeout(function () { t.Ne = !1; }), !t.ig)
|
|
3696
3709
|
return void a();
|
|
3697
3710
|
var r = t.jg, o = r.calendar, s = t.ig.start, l = t.ig.end, d = "left" === t.fg.dpBorder ? "start" : "end";
|
|
@@ -3709,14 +3722,14 @@ var DayPilot = { Global: {} };
|
|
|
3709
3722
|
var s = t.ng.start, l = t.ng.end, c = t.ng.row.id;
|
|
3710
3723
|
t.ng.calendar = null, i().style.cursor = "", t.Oe = null, t.mg = null, o.M(r, s, l, c, e), DayPilot.Global.movingAreaData = null;
|
|
3711
3724
|
}
|
|
3712
|
-
else if (t.
|
|
3713
|
-
var u = DayPilot.Util.mouseButton(e), h = t.
|
|
3714
|
-
if (f.
|
|
3715
|
-
return clearTimeout(t.
|
|
3716
|
-
f.xf = h, t.
|
|
3717
|
-
var v = function (e) { return function () { t.
|
|
3718
|
-
return a(), u.left ? (v(p)(), e.cancelBubble = !0, !1) : void (t.
|
|
3719
|
-
} t.
|
|
3725
|
+
else if (t.Mh) {
|
|
3726
|
+
var u = DayPilot.Util.mouseButton(e), h = t.Mh, f = h.calendar, a = function () { };
|
|
3727
|
+
if (f.li = null, t.Xh)
|
|
3728
|
+
return clearTimeout(t.Xh), t.Xh = null, void a();
|
|
3729
|
+
f.xf = h, t.Mh = null;
|
|
3730
|
+
var v = function (e) { return function () { t.Xh = null, f.uf(e), "Hold" !== f.timeRangeSelectedHandling && "HoldForever" !== f.timeRangeSelectedHandling ? n() : f.xf = e; }; }, p = f._h(h);
|
|
3731
|
+
return a(), u.left ? (v(p)(), e.cancelBubble = !0, !1) : void (t.Xh = null);
|
|
3732
|
+
} t.Ih = null, t.eg = null; };
|
|
3720
3733
|
}
|
|
3721
3734
|
}(DayPilot);
|
|
3722
3735
|
|