vue-cal 4.4.2 → 4.4.3
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/dist/drag-and-drop.amd.js +1 -1
- package/dist/drag-and-drop.cjs.js +1 -1
- package/dist/drag-and-drop.es.js +1 -1
- package/dist/i18n/ar.amd.js +1 -1
- package/dist/i18n/ar.cjs.js +1 -1
- package/dist/i18n/ar.es.js +1 -1
- package/dist/i18n/bg.amd.js +1 -1
- package/dist/i18n/bg.cjs.js +1 -1
- package/dist/i18n/bg.es.js +1 -1
- package/dist/i18n/bn.amd.js +1 -1
- package/dist/i18n/bn.cjs.js +1 -1
- package/dist/i18n/bn.es.js +1 -1
- package/dist/i18n/bs.amd.js +1 -1
- package/dist/i18n/bs.cjs.js +1 -1
- package/dist/i18n/bs.es.js +1 -1
- package/dist/i18n/ca.amd.js +1 -1
- package/dist/i18n/ca.cjs.js +1 -1
- package/dist/i18n/ca.es.js +1 -1
- package/dist/i18n/cs.amd.js +1 -1
- package/dist/i18n/cs.cjs.js +1 -1
- package/dist/i18n/cs.es.js +1 -1
- package/dist/i18n/da.amd.js +1 -1
- package/dist/i18n/da.cjs.js +1 -1
- package/dist/i18n/da.es.js +1 -1
- package/dist/i18n/de.amd.js +1 -1
- package/dist/i18n/de.cjs.js +1 -1
- package/dist/i18n/de.es.js +1 -1
- package/dist/i18n/el.amd.js +1 -1
- package/dist/i18n/el.cjs.js +1 -1
- package/dist/i18n/el.es.js +1 -1
- package/dist/i18n/en.amd.js +1 -1
- package/dist/i18n/en.cjs.js +1 -1
- package/dist/i18n/en.es.js +1 -1
- package/dist/i18n/es.amd.js +1 -1
- package/dist/i18n/es.cjs.js +1 -1
- package/dist/i18n/es.es.js +1 -1
- package/dist/i18n/fa.amd.js +1 -1
- package/dist/i18n/fa.cjs.js +1 -1
- package/dist/i18n/fa.es.js +1 -1
- package/dist/i18n/fr.amd.js +1 -1
- package/dist/i18n/fr.cjs.js +1 -1
- package/dist/i18n/fr.es.js +1 -1
- package/dist/i18n/he.amd.js +1 -1
- package/dist/i18n/he.cjs.js +1 -1
- package/dist/i18n/he.es.js +1 -1
- package/dist/i18n/hr.amd.js +1 -1
- package/dist/i18n/hr.cjs.js +1 -1
- package/dist/i18n/hr.es.js +1 -1
- package/dist/i18n/hu.amd.js +1 -1
- package/dist/i18n/hu.cjs.js +1 -1
- package/dist/i18n/hu.es.js +1 -1
- package/dist/i18n/id.amd.js +1 -1
- package/dist/i18n/id.cjs.js +1 -1
- package/dist/i18n/id.es.js +1 -1
- package/dist/i18n/is.amd.js +1 -1
- package/dist/i18n/is.cjs.js +1 -1
- package/dist/i18n/is.es.js +1 -1
- package/dist/i18n/it.amd.js +1 -1
- package/dist/i18n/it.cjs.js +1 -1
- package/dist/i18n/it.es.js +1 -1
- package/dist/i18n/ja.amd.js +1 -1
- package/dist/i18n/ja.cjs.js +1 -1
- package/dist/i18n/ja.es.js +1 -1
- package/dist/i18n/ka.amd.js +1 -1
- package/dist/i18n/ka.cjs.js +1 -1
- package/dist/i18n/ka.es.js +1 -1
- package/dist/i18n/ko.amd.js +1 -1
- package/dist/i18n/ko.cjs.js +1 -1
- package/dist/i18n/ko.es.js +1 -1
- package/dist/i18n/lt.amd.js +1 -1
- package/dist/i18n/lt.cjs.js +1 -1
- package/dist/i18n/lt.es.js +1 -1
- package/dist/i18n/mn.amd.js +1 -1
- package/dist/i18n/mn.cjs.js +1 -1
- package/dist/i18n/mn.es.js +1 -1
- package/dist/i18n/nl.amd.js +1 -1
- package/dist/i18n/nl.cjs.js +1 -1
- package/dist/i18n/nl.es.js +1 -1
- package/dist/i18n/no.amd.js +1 -1
- package/dist/i18n/no.cjs.js +1 -1
- package/dist/i18n/no.es.js +1 -1
- package/dist/i18n/pl.amd.js +1 -1
- package/dist/i18n/pl.cjs.js +1 -1
- package/dist/i18n/pl.es.js +1 -1
- package/dist/i18n/pt-br.amd.js +1 -1
- package/dist/i18n/pt-br.cjs.js +1 -1
- package/dist/i18n/pt-br.es.js +1 -1
- package/dist/i18n/ro.amd.js +1 -1
- package/dist/i18n/ro.cjs.js +1 -1
- package/dist/i18n/ro.es.js +1 -1
- package/dist/i18n/ru.amd.js +1 -1
- package/dist/i18n/ru.cjs.js +1 -1
- package/dist/i18n/ru.es.js +1 -1
- package/dist/i18n/sk.amd.js +1 -1
- package/dist/i18n/sk.cjs.js +1 -1
- package/dist/i18n/sk.es.js +1 -1
- package/dist/i18n/sl.amd.js +1 -1
- package/dist/i18n/sl.cjs.js +1 -1
- package/dist/i18n/sl.es.js +1 -1
- package/dist/i18n/sq.amd.js +1 -1
- package/dist/i18n/sq.cjs.js +1 -1
- package/dist/i18n/sq.es.js +1 -1
- package/dist/i18n/sr.amd.js +1 -1
- package/dist/i18n/sr.cjs.js +1 -1
- package/dist/i18n/sr.es.js +1 -1
- package/dist/i18n/sv.amd.js +1 -1
- package/dist/i18n/sv.cjs.js +1 -1
- package/dist/i18n/sv.es.js +1 -1
- package/dist/i18n/tr.amd.js +1 -1
- package/dist/i18n/tr.cjs.js +1 -1
- package/dist/i18n/tr.es.js +1 -1
- package/dist/i18n/uk.amd.js +1 -1
- package/dist/i18n/uk.cjs.js +1 -1
- package/dist/i18n/uk.es.js +1 -1
- package/dist/i18n/vi.amd.js +1 -1
- package/dist/i18n/vi.cjs.js +1 -1
- package/dist/i18n/vi.es.js +1 -1
- package/dist/i18n/zh-cn.amd.js +1 -1
- package/dist/i18n/zh-cn.cjs.js +1 -1
- package/dist/i18n/zh-cn.es.js +1 -1
- package/dist/i18n/zh-hk.amd.js +1 -1
- package/dist/i18n/zh-hk.cjs.js +1 -1
- package/dist/i18n/zh-hk.es.js +1 -1
- package/dist/vue-cal.amd.js +2 -2
- package/dist/vue-cal.cjs.js +2 -2
- package/dist/vue-cal.es.js +34 -34
- package/dist/vue-cal.iife.js +1 -1
- package/package.json +1 -1
package/dist/vue-cal.es.js
CHANGED
|
@@ -3,7 +3,7 @@ var le = (e, t, i) => t in e ? ae(e, t, { enumerable: !0, configurable: !0, writ
|
|
|
3
3
|
var H = (e, t, i) => (le(e, typeof t != "symbol" ? t + "" : t, i), i);
|
|
4
4
|
import { openBlock as h, createElementBlock as c, Fragment as T, renderList as $, normalizeClass as b, normalizeStyle as O, createVNode as P, Transition as U, withCtx as g, createElementVNode as k, renderSlot as y, toDisplayString as _, createCommentVNode as m, createTextVNode as M, resolveComponent as j, createBlock as W, resolveDynamicComponent as oe, createSlots as q, withKeys as X, withModifiers as L, TransitionGroup as re, normalizeProps as G, mergeProps as Z } from "vue";
|
|
5
5
|
/**
|
|
6
|
-
* vue-cal v4.4.
|
|
6
|
+
* vue-cal v4.4.3
|
|
7
7
|
* (c) 2022 Antoni Andre <antoniandre.web@gmail.com>
|
|
8
8
|
* @license MIT
|
|
9
9
|
*/
|
|
@@ -29,48 +29,48 @@ class de {
|
|
|
29
29
|
this._vuecal = t;
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
let
|
|
32
|
+
let w, D, R;
|
|
33
33
|
class ue {
|
|
34
34
|
constructor(t, i) {
|
|
35
35
|
H(this, "_vuecal", null);
|
|
36
36
|
H(this, "eventDefaults", { _eid: null, start: "", startTimeMinutes: 0, end: "", endTimeMinutes: 0, title: "", content: "", background: !1, allDay: !1, segments: null, repeat: null, daysCount: 1, deletable: !0, deleting: !1, titleEditable: !0, resizable: !0, resizing: !1, draggable: !0, dragging: !1, draggingStatic: !1, focused: !1, class: "" });
|
|
37
|
-
this._vuecal = t,
|
|
37
|
+
this._vuecal = t, w = i;
|
|
38
38
|
}
|
|
39
39
|
createAnEvent(t, i, n) {
|
|
40
|
-
if (typeof t == "string" && (t =
|
|
40
|
+
if (typeof t == "string" && (t = w.stringToDate(t)), !(t instanceof Date))
|
|
41
41
|
return !1;
|
|
42
|
-
const l =
|
|
43
|
-
n.end && (typeof n.end == "string" && (n.end =
|
|
42
|
+
const l = w.dateToMinutes(t), s = l + (i = 1 * i || 120), o = w.addMinutes(new Date(t), i);
|
|
43
|
+
n.end && (typeof n.end == "string" && (n.end = w.stringToDate(n.end)), n.endTimeMinutes = w.dateToMinutes(n.end));
|
|
44
44
|
const a = { ...this.eventDefaults, _eid: `${this._vuecal._.uid}_${this._vuecal.eventIdIncrement++}`, start: t, startTimeMinutes: l, end: o, endTimeMinutes: s, segments: null, ...n };
|
|
45
|
-
return typeof this._vuecal.onEventCreate != "function" || this._vuecal.onEventCreate(a, () => this.deleteAnEvent(a)) ? (a.startDateF !== a.endDateF && (a.daysCount =
|
|
45
|
+
return typeof this._vuecal.onEventCreate != "function" || this._vuecal.onEventCreate(a, () => this.deleteAnEvent(a)) ? (a.startDateF !== a.endDateF && (a.daysCount = w.countDays(a.start, a.end)), this._vuecal.mutableEvents.push(a), this._vuecal.addEventsToView([a]), this._vuecal.emitWithEvent("event-create", a), this._vuecal.$emit("event-change", { event: this._vuecal.cleanupEvent(a), originalEvent: null }), a) : void 0;
|
|
46
46
|
}
|
|
47
47
|
addEventSegment(t) {
|
|
48
|
-
t.segments || (t.segments = {}, t.segments[
|
|
49
|
-
const i = t.segments[
|
|
48
|
+
t.segments || (t.segments = {}, t.segments[w.formatDateLite(t.start)] = { start: t.start, startTimeMinutes: t.startTimeMinutes, endTimeMinutes: 1440, isFirstDay: !0, isLastDay: !1 });
|
|
49
|
+
const i = t.segments[w.formatDateLite(t.end)];
|
|
50
50
|
i && (i.isLastDay = !1, i.endTimeMinutes = 1440);
|
|
51
|
-
const n =
|
|
52
|
-
return n.setHours(0, 0, 0, 0), t.segments[l] = { start: n, startTimeMinutes: 0, endTimeMinutes: t.endTimeMinutes, isFirstDay: !1, isLastDay: !0 }, t.end =
|
|
51
|
+
const n = w.addDays(t.end, 1), l = w.formatDateLite(n);
|
|
52
|
+
return n.setHours(0, 0, 0, 0), t.segments[l] = { start: n, startTimeMinutes: 0, endTimeMinutes: t.endTimeMinutes, isFirstDay: !1, isLastDay: !0 }, t.end = w.addMinutes(n, t.endTimeMinutes), t.daysCount = Object.keys(t.segments).length, l;
|
|
53
53
|
}
|
|
54
54
|
removeEventSegment(t) {
|
|
55
55
|
let i = Object.keys(t.segments).length;
|
|
56
56
|
if (i <= 1)
|
|
57
|
-
return
|
|
58
|
-
delete t.segments[
|
|
59
|
-
const n =
|
|
57
|
+
return w.formatDateLite(t.end);
|
|
58
|
+
delete t.segments[w.formatDateLite(t.end)], i--;
|
|
59
|
+
const n = w.subtractDays(t.end, 1), l = w.formatDateLite(n), s = t.segments[l];
|
|
60
60
|
return i ? s && (s.isLastDay = !0, s.endTimeMinutes = t.endTimeMinutes) : t.segments = null, t.daysCount = i || 1, t.end = n, l;
|
|
61
61
|
}
|
|
62
62
|
createEventSegments(t, i, n) {
|
|
63
63
|
const l = i.getTime(), s = n.getTime();
|
|
64
64
|
let o, a, d, r = t.start.getTime(), u = t.end.getTime(), p = !1;
|
|
65
|
-
for (t.end.getHours() || t.end.getMinutes() || (u -= 1e3), t.segments = {}, t.repeat ? (o = l, a = Math.min(s, t.repeat.until ?
|
|
65
|
+
for (t.end.getHours() || t.end.getMinutes() || (u -= 1e3), t.segments = {}, t.repeat ? (o = l, a = Math.min(s, t.repeat.until ? w.stringToDate(t.repeat.until).getTime() : s)) : (o = Math.max(l, r), a = Math.min(s, u)); o <= a; ) {
|
|
66
66
|
let v = !1;
|
|
67
|
-
const E =
|
|
67
|
+
const E = w.addDays(new Date(o), 1).setHours(0, 0, 0, 0);
|
|
68
68
|
let f, x, V, C;
|
|
69
69
|
if (t.repeat) {
|
|
70
|
-
const Y = new Date(o), A =
|
|
71
|
-
(p || t.occurrences && t.occurrences[A]) && (p || (r = t.occurrences[A].start, d = new Date(r).setHours(0, 0, 0, 0), u = t.occurrences[A].end), p = !0, v = !0), f = o === d, x = A ===
|
|
70
|
+
const Y = new Date(o), A = w.formatDateLite(Y);
|
|
71
|
+
(p || t.occurrences && t.occurrences[A]) && (p || (r = t.occurrences[A].start, d = new Date(r).setHours(0, 0, 0, 0), u = t.occurrences[A].end), p = !0, v = !0), f = o === d, x = A === w.formatDateLite(new Date(u)), V = new Date(f ? r : o), C = w.formatDateLite(V), x && (p = !1);
|
|
72
72
|
} else
|
|
73
|
-
v = !0, f = o === r, x = a === u && E > a, V = f ? t.start : new Date(o), C =
|
|
73
|
+
v = !0, f = o === r, x = a === u && E > a, V = f ? t.start : new Date(o), C = w.formatDateLite(f ? t.start : V);
|
|
74
74
|
v && (t.segments[C] = { start: V, startTimeMinutes: f ? t.startTimeMinutes : 0, endTimeMinutes: x ? t.endTimeMinutes : 1440, isFirstDay: f, isLastDay: x }), o = E;
|
|
75
75
|
}
|
|
76
76
|
return t;
|
|
@@ -79,23 +79,23 @@ class ue {
|
|
|
79
79
|
this._vuecal.emitWithEvent("event-delete", t), this._vuecal.mutableEvents = this._vuecal.mutableEvents.filter((i) => i._eid !== t._eid), this._vuecal.view.events = this._vuecal.view.events.filter((i) => i._eid !== t._eid);
|
|
80
80
|
}
|
|
81
81
|
checkCellOverlappingEvents(t, i) {
|
|
82
|
-
R = t.slice(0),
|
|
83
|
-
R.shift(),
|
|
84
|
-
|
|
85
|
-
const o = this.eventInRange(s, l.start, l.end), a = i.overlapsPerTimeStep ?
|
|
82
|
+
R = t.slice(0), D = {}, t.forEach((l) => {
|
|
83
|
+
R.shift(), D[l._eid] || (D[l._eid] = { overlaps: [], start: l.start, position: 0 }), D[l._eid].position = 0, R.forEach((s) => {
|
|
84
|
+
D[s._eid] || (D[s._eid] = { overlaps: [], start: s.start, position: 0 });
|
|
85
|
+
const o = this.eventInRange(s, l.start, l.end), a = i.overlapsPerTimeStep ? w.datesInSameTimeStep(l.start, s.start, i.timeStep) : 1;
|
|
86
86
|
if (l.background || l.allDay || s.background || s.allDay || !o || !a) {
|
|
87
87
|
let d, r;
|
|
88
|
-
(d = (
|
|
88
|
+
(d = (D[l._eid] || { overlaps: [] }).overlaps.indexOf(s._eid)) > -1 && D[l._eid].overlaps.splice(d, 1), (r = (D[s._eid] || { overlaps: [] }).overlaps.indexOf(l._eid)) > -1 && D[s._eid].overlaps.splice(r, 1), D[s._eid].position--;
|
|
89
89
|
} else
|
|
90
|
-
|
|
90
|
+
D[l._eid].overlaps.push(s._eid), D[l._eid].overlaps = [...new Set(D[l._eid].overlaps)], D[s._eid].overlaps.push(l._eid), D[s._eid].overlaps = [...new Set(D[s._eid].overlaps)], D[s._eid].position++;
|
|
91
91
|
});
|
|
92
92
|
});
|
|
93
93
|
let n = 0;
|
|
94
|
-
for (const l in
|
|
95
|
-
const s =
|
|
96
|
-
o.push({ id: l, start: s.start }), o.sort((a, d) => a.start < d.start ? -1 : a.start > d.start ? 1 : a.id > d.id ? -1 : 1), s.position = o.findIndex((a) => a.id === l), n = Math.max(this.getOverlapsStreak(s,
|
|
94
|
+
for (const l in D) {
|
|
95
|
+
const s = D[l], o = s.overlaps.map((a) => ({ id: a, start: D[a].start }));
|
|
96
|
+
o.push({ id: l, start: s.start }), o.sort((a, d) => a.start < d.start ? -1 : a.start > d.start ? 1 : a.id > d.id ? -1 : 1), s.position = o.findIndex((a) => a.id === l), n = Math.max(this.getOverlapsStreak(s, D), n);
|
|
97
97
|
}
|
|
98
|
-
return [
|
|
98
|
+
return [D, n];
|
|
99
99
|
}
|
|
100
100
|
getOverlapsStreak(t, i = {}) {
|
|
101
101
|
let n = t.overlaps.length + 1, l = [];
|
|
@@ -114,7 +114,7 @@ class ue {
|
|
|
114
114
|
return l < n.getTime() && s > i.getTime();
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
-
const he = { class: "vuecal__flex vuecal__weekdays-headings" }, ce = ["onClick"], ve = { class: "vuecal__flex weekday-label", grow: "" }, me = { class: "full" }, pe = { class: "small" }, ye = { class: "xsmall" },
|
|
117
|
+
const he = { class: "vuecal__flex vuecal__weekdays-headings" }, ce = ["onClick"], ve = { class: "vuecal__flex weekday-label", grow: "" }, me = { class: "full" }, pe = { class: "small" }, ye = { class: "xsmall" }, we = { key: 0 }, De = { key: 0, class: "vuecal__flex vuecal__split-days-headers", grow: "" }, B = (e, t) => {
|
|
118
118
|
const i = e.__vccOpts || e;
|
|
119
119
|
for (const [n, l] of t)
|
|
120
120
|
i[n] = l;
|
|
@@ -137,7 +137,7 @@ const he = { class: "vuecal__flex vuecal__weekdays-headings" }, ce = ["onClick"]
|
|
|
137
137
|
}, cellHeadingsClickable() {
|
|
138
138
|
return this.view.id === "week" && (this.vuecal.clickToNavigate || this.vuecal.dblclickToNavigate);
|
|
139
139
|
} } }, [["render", function(e, t, i, n, l, s) {
|
|
140
|
-
return h(), c("div", he, [(h(!0), c(T, null, $(s.headings, (o, a) => (h(), c(T, { key: a }, [o.hide ? m("", !0) : (h(), c("div", { key: 0, class: b(["vuecal__flex vuecal__heading", { today: o.today, clickable: s.cellHeadingsClickable }]), style: O(s.weekdayCellStyles), onClick: (d) => s.view.id === "week" && s.selectCell(o.date, d), onDblclick: t[0] || (t[0] = (d) => s.view.id === "week" && s.vuecal.dblclickToNavigate && i.switchToNarrowerView()) }, [P(U, { name: `slide-fade--${i.transitionDirection}`, appear: s.vuecal.transitions }, { default: g(() => [(h(), c("div", { class: "vuecal__flex", column: "", key: !!s.vuecal.transitions && `${a}-${o.dayOfMonth}` }, [k("div", ve, [y(e.$slots, "weekday-heading", { heading: s.cleanupHeading(o), view: s.view }, () => [k("span", me, _(o.full), 1), k("span", pe, _(o.small), 1), k("span", ye, _(o.xsmall), 1), o.dayOfMonth ? (h(), c("span",
|
|
140
|
+
return h(), c("div", he, [(h(!0), c(T, null, $(s.headings, (o, a) => (h(), c(T, { key: a }, [o.hide ? m("", !0) : (h(), c("div", { key: 0, class: b(["vuecal__flex vuecal__heading", { today: o.today, clickable: s.cellHeadingsClickable }]), style: O(s.weekdayCellStyles), onClick: (d) => s.view.id === "week" && s.selectCell(o.date, d), onDblclick: t[0] || (t[0] = (d) => s.view.id === "week" && s.vuecal.dblclickToNavigate && i.switchToNarrowerView()) }, [P(U, { name: `slide-fade--${i.transitionDirection}`, appear: s.vuecal.transitions }, { default: g(() => [(h(), c("div", { class: "vuecal__flex", column: "", key: !!s.vuecal.transitions && `${a}-${o.dayOfMonth}` }, [k("div", ve, [y(e.$slots, "weekday-heading", { heading: s.cleanupHeading(o), view: s.view }, () => [k("span", me, _(o.full), 1), k("span", pe, _(o.small), 1), k("span", ye, _(o.xsmall), 1), o.dayOfMonth ? (h(), c("span", we, "\xA0" + _(o.dayOfMonth), 1)) : m("", !0)])]), s.vuecal.hasSplits && s.vuecal.stickySplitLabels ? (h(), c("div", De, [(h(!0), c(T, null, $(s.vuecal.daySplits, (d, r) => (h(), c("div", { class: b(["day-split-header", d.class || !1]), key: r }, [y(e.$slots, "split-label", { split: d, view: s.view }, () => [M(_(d.label), 1)])], 2))), 128))])) : m("", !0)]))]), _: 2 }, 1032, ["name", "appear"])], 46, ce))], 64))), 128))]);
|
|
141
141
|
}]]), ge = { class: "vuecal__header" }, fe = { key: 0, class: "vuecal__flex vuecal__menu", role: "tablist", "aria-label": "Calendar views navigation" }, _e = ["onDragenter", "onDragleave", "onClick", "aria-label"], ke = { key: 1, class: "vuecal__title-bar" }, be = ["aria-label"], Te = { class: "vuecal__flex vuecal__title", grow: "" }, Ee = ["aria-label"], Ce = { key: 0, class: "vuecal__flex vuecal__split-days-headers" }, Me = B({ inject: ["vuecal", "previous", "next", "switchView", "updateSelectedDate", "modules", "view"], components: { WeekdaysHeadings: ie }, props: { options: { type: Object, default: () => ({}) }, editEvents: { type: Object, required: !0 }, hasSplits: { type: [Boolean, Number], default: !1 }, daySplits: { type: Array, default: () => [] }, viewProps: { type: Object, default: () => ({}) }, weekDays: { type: Array, default: () => [] }, switchToNarrowerView: { type: Function, default: () => {
|
|
142
142
|
} } }, data: () => ({ highlightedControl: null }), methods: { goToToday() {
|
|
143
143
|
this.updateSelectedDate(new Date(new Date().setHours(0, 0, 0, 0)));
|
|
@@ -772,7 +772,7 @@ A valid view must be one of: ${ee.join(", ")}.`), e = "week"), this.enabledViews
|
|
|
772
772
|
const e = this.$refs.vuecal.getElementsByClassName("vuecal__scrollbar-check")[0], t = e.offsetWidth - e.children[0].offsetWidth;
|
|
773
773
|
if (t) {
|
|
774
774
|
const i = document.createElement("style");
|
|
775
|
-
i.id = "vuecal-align-with-scrollbar", i.type = "text/css", i.innerHTML = `.vuecal__weekdays-headings,.vuecal__all-day {padding-right: ${t}px}`, document.head.appendChild(i);
|
|
775
|
+
i.id = "vuecal-align-with-scrollbar", i.type = "text/css", i.innerHTML = `.vuecal--view-with-time .vuecal__weekdays-headings,.vuecal--view-with-time .vuecal__all-day {padding-right: ${t}px}`, document.head.appendChild(i);
|
|
776
776
|
}
|
|
777
777
|
}, cellOrSplitHasEvents: (e, t = null) => e.length && (!t && e.length || t && e.some((i) => i.split === t.id)) }, created() {
|
|
778
778
|
this.utils.cell = new de(this), this.utils.event = new ue(this, this.utils.date), this.loadLocale(this.locale), this.editEvents.drag && this.loadDragAndDrop(), this.updateMutableEvents(this.events), this.view.id = this.currentView, this.selectedDate ? this.updateSelectedDate(this.selectedDate) : (this.view.selectedDate = new Date(), this.switchView(this.currentView)), this.time && this.watchRealTime && (this.timeTickerIds[0] = setTimeout(this.timeTick, 1e3 * (60 - this.now.getSeconds())));
|
|
@@ -951,10 +951,10 @@ A valid view must be one of: ${ee.join(", ")}.`), e = "week"), this.enabledViews
|
|
|
951
951
|
this.updateSelectedDate(e);
|
|
952
952
|
}, activeView(e) {
|
|
953
953
|
this.switchView(e);
|
|
954
|
-
} } },
|
|
954
|
+
} } }, Dt = B(pt, [["render", function(e, t, i, n, l, s) {
|
|
955
955
|
const o = j("vuecal-header"), a = j("all-day-bar"), d = j("weekdays-headings"), r = j("vuecal-cell");
|
|
956
956
|
return h(), c("div", { class: b(["vuecal__flex vuecal", s.cssClasses]), column: "", ref: "vuecal", lang: i.locale }, [P(o, { options: e.$props, "edit-events": s.editEvents, "view-props": { views: s.views, weekDaysInHeader: s.weekDaysInHeader }, "week-days": s.weekDays, "has-splits": s.hasSplits, "day-splits": s.daySplits, "switch-to-narrower-view": s.switchToNarrowerView }, q({ "arrow-prev": g(() => [y(e.$slots, "arrow-prev", {}, () => [je, Ye, Le])]), "arrow-next": g(() => [y(e.$slots, "arrow-next", {}, () => [Fe, Be, Ne])]), "today-button": g(() => [y(e.$slots, "today-button", {}, () => [k("span", ze, _(l.texts.today), 1)])]), title: g(() => [y(e.$slots, "title", { title: s.viewTitle, view: l.view }, () => [M(_(s.viewTitle), 1)])]), _: 2 }, [e.$slots["weekday-heading"] ? { name: "weekday-heading", fn: g(({ heading: u, view: p }) => [y(e.$slots, "weekday-heading", { heading: u, view: p })]) } : void 0, e.$slots["split-label"] ? { name: "split-label", fn: g(({ split: u }) => [y(e.$slots, "split-label", { split: u, view: l.view.id })]) } : void 0]), 1032, ["options", "edit-events", "view-props", "week-days", "has-splits", "day-splits", "switch-to-narrower-view"]), i.hideBody ? m("", !0) : (h(), c("div", Ie, [P(U, { name: `slide-fade--${l.transitionDirection}`, appear: i.transitions }, { default: g(() => [(h(), c("div", { class: "vuecal__flex", style: { "min-width": "100%" }, key: !!i.transitions && l.view.id, column: "" }, [i.showAllDayEvents && s.hasTimeColumn && (!s.cellOrSplitMinWidth || s.isDayView && !i.minSplitWidth) ? (h(), W(a, G(Z({ key: 0 }, s.allDayBar)), { event: g(({ event: u, view: p }) => [y(e.$slots, "event", { view: p, event: u }, () => [s.editEvents.title && u.titleEditable ? (h(), c("div", { key: 0, class: "vuecal__event-title vuecal__event-title--edit", contenteditable: "", onBlur: (v) => s.onEventTitleBlur(v, u), innerHTML: u.title }, null, 40, Pe)) : u.title ? (h(), c("div", { key: 1, class: "vuecal__event-title", innerHTML: u.title }, null, 8, Ue)) : m("", !0), !u.content || s.hasShortEvents || s.isShortMonthView ? m("", !0) : (h(), c("div", { key: 2, class: "vuecal__event-content", innerHTML: u.content }, null, 8, Re))])]), _: 3 }, 16)) : m("", !0), k("div", { class: b(["vuecal__bg", { vuecal__flex: !s.hasTimeColumn }]), column: "" }, [k("div", qe, [s.hasTimeColumn ? (h(), c("div", Ke, [i.showAllDayEvents && s.cellOrSplitMinWidth && (!s.isDayView || i.minSplitWidth) ? (h(), c("div", { key: 0, class: "vuecal__all-day-text", style: O({ height: s.allDayBar.height }) }, [k("span", null, _(l.texts.allDay), 1)], 4)) : m("", !0), (h(!0), c(T, null, $(s.timeCells, (u, p) => (h(), c("div", { class: "vuecal__time-cell", key: p, style: O(`height: ${i.timeCellHeight}px`) }, [y(e.$slots, "time-cell", { hours: u.hours, minutes: u.minutes }, () => [Xe, k("span", Ge, _(u.label), 1)])], 4))), 128))])) : m("", !0), i.showWeekNumbers && s.isMonthView ? (h(), c("div", Ze, [(h(), c(T, null, $(6, (u) => k("div", { class: "vuecal__flex vuecal__week-number-cell", key: u, grow: "" }, [y(e.$slots, "week-number-cell", { week: s.getWeekNumber(u - 1) }, () => [M(_(s.getWeekNumber(u - 1)), 1)])])), 64))])) : m("", !0), k("div", { class: b(["vuecal__flex vuecal__cells", `${l.view.id}-view`]), grow: "", wrap: !s.cellOrSplitMinWidth || !s.isWeekView, column: !!s.cellOrSplitMinWidth }, [s.cellOrSplitMinWidth && s.isWeekView ? (h(), W(d, { key: 0, "transition-direction": l.transitionDirection, "week-days": s.weekDays, "switch-to-narrower-view": s.switchToNarrowerView, style: O(s.cellOrSplitMinWidth ? `min-width: ${s.cellOrSplitMinWidth}px` : "") }, q({ _: 2 }, [e.$slots["weekday-heading"] ? { name: "weekday-heading", fn: g(({ heading: u, view: p }) => [y(e.$slots, "weekday-heading", { heading: u, view: p })]) } : void 0, e.$slots["split-label"] ? { name: "split-label", fn: g(({ split: u }) => [y(e.$slots, "split-label", { split: u, view: l.view.id })]) } : void 0]), 1032, ["transition-direction", "week-days", "switch-to-narrower-view", "style"])) : s.hasSplits && i.stickySplitLabels && i.minSplitWidth ? (h(), c("div", { key: 1, class: "vuecal__flex vuecal__split-days-headers", style: O(s.cellOrSplitMinWidth ? `min-width: ${s.cellOrSplitMinWidth}px` : "") }, [(h(!0), c(T, null, $(s.daySplits, (u, p) => (h(), c("div", { class: b(["day-split-header", u.class || !1]), key: p }, [y(e.$slots, "split-label", { split: u, view: l.view.id }, () => [M(_(u.label), 1)])], 2))), 128))], 4)) : m("", !0), i.showAllDayEvents && s.hasTimeColumn && (s.isWeekView && s.cellOrSplitMinWidth || s.isDayView && s.hasSplits && i.minSplitWidth) ? (h(), W(a, G(Z({ key: 2 }, s.allDayBar)), { event: g(({ event: u, view: p }) => [y(e.$slots, "event", { view: p, event: u }, () => [s.editEvents.title && u.titleEditable ? (h(), c("div", { key: 0, class: "vuecal__event-title vuecal__event-title--edit", contenteditable: "", onBlur: (v) => s.onEventTitleBlur(v, u), innerHTML: u.title }, null, 40, Qe)) : u.title ? (h(), c("div", { key: 1, class: "vuecal__event-title", innerHTML: u.title }, null, 8, et)) : m("", !0), !u.content || s.hasShortEvents || s.isShortMonthView ? m("", !0) : (h(), c("div", { key: 2, class: "vuecal__event-content", innerHTML: u.content }, null, 8, tt))])]), _: 3 }, 16)) : m("", !0), k("div", { class: "vuecal__flex", ref: (u) => l.cellsEl = u, grow: "", wrap: !s.cellOrSplitMinWidth || !s.isWeekView, style: O(s.cellOrSplitMinWidth ? `min-width: ${s.cellOrSplitMinWidth}px` : "") }, [(h(!0), c(T, null, $(s.viewCells, (u, p) => (h(), W(r, { key: p, options: e.$props, "edit-events": s.editEvents, data: u, "cell-width": i.hideWeekdays.length && (s.isWeekView || s.isMonthView) && s.cellWidth, "min-timestamp": s.minTimestamp, "max-timestamp": s.maxTimestamp, "cell-splits": s.hasSplits && s.daySplits || [] }, { "cell-content": g(({ events: v, split: E, selectCell: f }) => [y(e.$slots, "cell-content", { cell: u, view: l.view, goNarrower: f, events: v }, () => [E && !i.stickySplitLabels ? (h(), c("div", { key: 0, class: "split-label", innerHTML: E.label }, null, 8, st)) : m("", !0), u.content ? (h(), c("div", { key: 1, class: "vuecal__cell-date", innerHTML: u.content }, null, 8, nt)) : m("", !0), (s.isMonthView && !i.eventsOnMonthView || s.isYearsOrYearView && i.eventsCountOnYearView) && v.length ? (h(), c("div", at, [y(e.$slots, "events-count", { view: l.view, events: v }, () => [M(_(v.length), 1)])])) : m("", !0), !s.cellOrSplitHasEvents(v, E) && s.isWeekOrDayView ? (h(), c("div", lt, [y(e.$slots, "no-event", {}, () => [M(_(l.texts.noEvent), 1)])])) : m("", !0)])]), event: g(({ event: v, view: E }) => [y(e.$slots, "event", { view: E, event: v }, () => [s.editEvents.title && v.titleEditable ? (h(), c("div", { key: 0, class: "vuecal__event-title vuecal__event-title--edit", contenteditable: "", onBlur: (f) => s.onEventTitleBlur(f, v), innerHTML: v.title }, null, 40, ot)) : v.title ? (h(), c("div", { key: 1, class: "vuecal__event-title", innerHTML: v.title }, null, 8, rt)) : m("", !0), !i.time || v.allDay || s.isMonthView && (v.allDay || i.showAllDayEvents === "short") || s.isShortMonthView ? m("", !0) : (h(), c("div", dt, [M(_(l.utils.date.formatTime(v.start, s.TimeFormat)), 1), v.endTimeMinutes ? (h(), c("span", ut, "\xA0- " + _(l.utils.date.formatTime(v.end, s.TimeFormat, null, !0)), 1)) : m("", !0), v.daysCount > 1 && (v.segments[u.formattedDate] || {}).isFirstDay ? (h(), c("small", ht, "\xA0+" + _(v.daysCount - 1) + _((l.texts.day[0] || "").toLowerCase()), 1)) : m("", !0)])), !v.content || s.isMonthView && v.allDay && i.showAllDayEvents === "short" || s.isShortMonthView ? m("", !0) : (h(), c("div", { key: 3, class: "vuecal__event-content", innerHTML: v.content }, null, 8, ct))])]), "no-event": g(() => [y(e.$slots, "no-event", {}, () => [M(_(l.texts.noEvent), 1)])]), _: 2 }, 1032, ["options", "edit-events", "data", "cell-width", "min-timestamp", "max-timestamp", "cell-splits"]))), 128))], 12, it)], 10, Je)])], 2)]))]), _: 3 }, 8, ["name", "appear"]), l.ready ? m("", !0) : (h(), c("div", vt, mt))]))], 10, Ae);
|
|
957
957
|
}]]);
|
|
958
958
|
export {
|
|
959
|
-
|
|
959
|
+
Dt as default
|
|
960
960
|
};
|