vue-cal 4.8.1 → 4.9.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.
- package/README.md +4 -0
- package/dist/drag-and-drop.amd.js +2 -2
- package/dist/drag-and-drop.cjs.js +2 -2
- package/dist/drag-and-drop.es.js +2 -2
- package/dist/i18n/ar.amd.js +2 -2
- package/dist/i18n/ar.cjs.js +2 -2
- package/dist/i18n/ar.es.js +13 -13
- package/dist/i18n/bg.amd.js +2 -2
- package/dist/i18n/bg.cjs.js +2 -2
- package/dist/i18n/bg.es.js +10 -10
- package/dist/i18n/bn.amd.js +2 -2
- package/dist/i18n/bn.cjs.js +2 -2
- package/dist/i18n/bn.es.js +14 -14
- package/dist/i18n/bs.amd.js +2 -2
- package/dist/i18n/bs.cjs.js +2 -2
- package/dist/i18n/bs.es.js +14 -14
- package/dist/i18n/ca.amd.js +2 -2
- package/dist/i18n/ca.cjs.js +2 -2
- package/dist/i18n/ca.es.js +15 -15
- package/dist/i18n/cs.amd.js +2 -2
- package/dist/i18n/cs.cjs.js +2 -2
- package/dist/i18n/cs.es.js +16 -16
- package/dist/i18n/da.amd.js +2 -2
- package/dist/i18n/da.cjs.js +2 -2
- package/dist/i18n/da.es.js +14 -14
- package/dist/i18n/de.amd.js +2 -2
- package/dist/i18n/de.cjs.js +2 -2
- package/dist/i18n/de.es.js +10 -10
- package/dist/i18n/el.amd.js +2 -2
- package/dist/i18n/el.cjs.js +2 -2
- package/dist/i18n/el.es.js +14 -14
- package/dist/i18n/en.amd.js +2 -2
- package/dist/i18n/en.cjs.js +2 -2
- package/dist/i18n/en.es.js +13 -13
- package/dist/i18n/es.amd.js +2 -2
- package/dist/i18n/es.cjs.js +2 -2
- package/dist/i18n/es.es.js +14 -14
- package/dist/i18n/et.amd.js +2 -2
- package/dist/i18n/et.cjs.js +2 -2
- package/dist/i18n/et.es.js +10 -10
- package/dist/i18n/fa.amd.js +2 -2
- package/dist/i18n/fa.cjs.js +2 -2
- package/dist/i18n/fa.es.js +13 -13
- package/dist/i18n/fi.amd.js +5 -0
- package/dist/i18n/fi.cjs.js +5 -0
- package/dist/i18n/fi.es.js +22 -0
- package/dist/i18n/fr.amd.js +2 -2
- package/dist/i18n/fr.cjs.js +2 -2
- package/dist/i18n/fr.es.js +11 -11
- package/dist/i18n/he.amd.js +2 -2
- package/dist/i18n/he.cjs.js +2 -2
- package/dist/i18n/he.es.js +11 -11
- package/dist/i18n/hr.amd.js +2 -2
- package/dist/i18n/hr.cjs.js +2 -2
- package/dist/i18n/hr.es.js +12 -12
- package/dist/i18n/hu.amd.js +2 -2
- package/dist/i18n/hu.cjs.js +2 -2
- package/dist/i18n/hu.es.js +14 -14
- package/dist/i18n/id.amd.js +2 -2
- package/dist/i18n/id.cjs.js +2 -2
- package/dist/i18n/id.es.js +13 -13
- package/dist/i18n/is.amd.js +2 -2
- package/dist/i18n/is.cjs.js +2 -2
- package/dist/i18n/is.es.js +13 -13
- package/dist/i18n/it.amd.js +2 -2
- package/dist/i18n/it.cjs.js +2 -2
- package/dist/i18n/it.es.js +8 -8
- package/dist/i18n/ja.amd.js +2 -2
- package/dist/i18n/ja.cjs.js +2 -2
- package/dist/i18n/ja.es.js +14 -14
- package/dist/i18n/ka.amd.js +2 -2
- package/dist/i18n/ka.cjs.js +2 -2
- package/dist/i18n/ka.es.js +10 -10
- package/dist/i18n/ko.amd.js +2 -2
- package/dist/i18n/ko.cjs.js +2 -2
- package/dist/i18n/ko.es.js +14 -14
- package/dist/i18n/lt.amd.js +2 -2
- package/dist/i18n/lt.cjs.js +2 -2
- package/dist/i18n/lt.es.js +10 -10
- package/dist/i18n/mn.amd.js +2 -2
- package/dist/i18n/mn.cjs.js +2 -2
- package/dist/i18n/mn.es.js +11 -11
- package/dist/i18n/nl.amd.js +2 -2
- package/dist/i18n/nl.cjs.js +2 -2
- package/dist/i18n/nl.es.js +11 -11
- package/dist/i18n/no.amd.js +2 -2
- package/dist/i18n/no.cjs.js +2 -2
- package/dist/i18n/no.es.js +15 -15
- package/dist/i18n/pl.amd.js +2 -2
- package/dist/i18n/pl.cjs.js +2 -2
- package/dist/i18n/pl.es.js +13 -13
- package/dist/i18n/pt-br.amd.js +2 -2
- package/dist/i18n/pt-br.cjs.js +2 -2
- package/dist/i18n/pt-br.es.js +14 -14
- package/dist/i18n/pt-pt.amd.js +5 -0
- package/dist/i18n/pt-pt.cjs.js +5 -0
- package/dist/i18n/pt-pt.es.js +22 -0
- package/dist/i18n/ro.amd.js +2 -2
- package/dist/i18n/ro.cjs.js +2 -2
- package/dist/i18n/ro.es.js +15 -15
- package/dist/i18n/ru.amd.js +2 -2
- package/dist/i18n/ru.cjs.js +2 -2
- package/dist/i18n/ru.es.js +12 -12
- package/dist/i18n/sk.amd.js +2 -2
- package/dist/i18n/sk.cjs.js +2 -2
- package/dist/i18n/sk.es.js +13 -13
- package/dist/i18n/sl.amd.js +2 -2
- package/dist/i18n/sl.cjs.js +2 -2
- package/dist/i18n/sl.es.js +11 -11
- package/dist/i18n/sq.amd.js +2 -2
- package/dist/i18n/sq.cjs.js +2 -2
- package/dist/i18n/sq.es.js +10 -10
- package/dist/i18n/sr.amd.js +2 -2
- package/dist/i18n/sr.cjs.js +2 -2
- package/dist/i18n/sr.es.js +13 -13
- package/dist/i18n/sv.amd.js +2 -2
- package/dist/i18n/sv.cjs.js +2 -2
- package/dist/i18n/sv.es.js +13 -13
- package/dist/i18n/tr.amd.js +2 -2
- package/dist/i18n/tr.cjs.js +2 -2
- package/dist/i18n/tr.es.js +13 -13
- package/dist/i18n/uk.amd.js +2 -2
- package/dist/i18n/uk.cjs.js +2 -2
- package/dist/i18n/uk.es.js +12 -12
- package/dist/i18n/vi.amd.js +2 -2
- package/dist/i18n/vi.cjs.js +2 -2
- package/dist/i18n/vi.es.js +16 -16
- package/dist/i18n/zh-cn.amd.js +2 -2
- package/dist/i18n/zh-cn.cjs.js +2 -2
- package/dist/i18n/zh-cn.es.js +15 -15
- package/dist/i18n/zh-hk.amd.js +2 -2
- package/dist/i18n/zh-hk.cjs.js +2 -2
- package/dist/i18n/zh-hk.es.js +15 -15
- package/dist/vue-cal.amd.js +4 -4
- package/dist/vue-cal.cjs.js +4 -4
- package/dist/vue-cal.es.js +48 -47
- package/dist/vue-cal.iife.js +2 -2
- package/package.json +16 -16
package/dist/vue-cal.es.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var W = (e, t, i) => (
|
|
4
|
-
import { openBlock as h, createElementBlock as c, Fragment as T, renderList as S, normalizeClass as b, normalizeStyle as $, createVNode as
|
|
1
|
+
var oe = Object.defineProperty;
|
|
2
|
+
var re = (e, t, i) => t in e ? oe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i;
|
|
3
|
+
var W = (e, t, i) => (re(e, typeof t != "symbol" ? t + "" : t, i), i);
|
|
4
|
+
import { openBlock as h, createElementBlock as c, Fragment as T, renderList as S, normalizeClass as b, normalizeStyle as $, createVNode as U, Transition as R, withCtx as g, createElementVNode as k, renderSlot as w, toDisplayString as f, createCommentVNode as v, createTextVNode as M, resolveComponent as j, createBlock as H, resolveDynamicComponent as de, createSlots as X, withKeys as Z, withModifiers as L, TransitionGroup as ue, normalizeProps as J, mergeProps as Q } from "vue";
|
|
5
5
|
/**
|
|
6
|
-
* vue-cal v4.
|
|
7
|
-
* (c)
|
|
6
|
+
* vue-cal v4.9.0
|
|
7
|
+
* (c) 2024 Antoni Andre <antoniandre.web@gmail.com>
|
|
8
8
|
* @license MIT
|
|
9
9
|
*/
|
|
10
|
-
let N,
|
|
11
|
-
class
|
|
10
|
+
let N, ee, te, O, I = {}, F = {};
|
|
11
|
+
class he {
|
|
12
12
|
constructor(t) {
|
|
13
13
|
W(this, "_vuecal", null);
|
|
14
14
|
W(this, "selectCell", (t = !1, i, n) => {
|
|
@@ -29,8 +29,9 @@ class de {
|
|
|
29
29
|
this._vuecal = t;
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
const q = 1440;
|
|
33
|
+
let y, D, K;
|
|
34
|
+
class ce {
|
|
34
35
|
constructor(t, i) {
|
|
35
36
|
W(this, "_vuecal", null);
|
|
36
37
|
W(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: "" });
|
|
@@ -45,9 +46,9 @@ class ue {
|
|
|
45
46
|
return typeof this._vuecal.onEventCreate != "function" || this._vuecal.onEventCreate(a, () => this.deleteAnEvent(a)) ? (a.startDateF !== a.endDateF && (a.daysCount = y.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
47
|
}
|
|
47
48
|
addEventSegment(t) {
|
|
48
|
-
t.segments || (t.segments = {}, t.segments[y.formatDateLite(t.start)] = { start: t.start, startTimeMinutes: t.startTimeMinutes, endTimeMinutes:
|
|
49
|
+
t.segments || (t.segments = {}, t.segments[y.formatDateLite(t.start)] = { start: t.start, startTimeMinutes: t.startTimeMinutes, endTimeMinutes: q, isFirstDay: !0, isLastDay: !1 });
|
|
49
50
|
const i = t.segments[y.formatDateLite(t.end)];
|
|
50
|
-
i && (i.isLastDay = !1, i.endTimeMinutes =
|
|
51
|
+
i && (i.isLastDay = !1, i.endTimeMinutes = q);
|
|
51
52
|
const n = y.addDays(t.end, 1), l = y.formatDateLite(n);
|
|
52
53
|
return n.setHours(0, 0, 0, 0), t.segments[l] = { start: n, startTimeMinutes: 0, endTimeMinutes: t.endTimeMinutes, isFirstDay: !1, isLastDay: !0 }, t.end = y.addMinutes(n, t.endTimeMinutes), t.daysCount = Object.keys(t.segments).length, l;
|
|
53
54
|
}
|
|
@@ -71,7 +72,7 @@ class ue {
|
|
|
71
72
|
(m || t.occurrences && t.occurrences[A]) && (m || (r = t.occurrences[A].start, d = new Date(r).setHours(0, 0, 0, 0), u = t.occurrences[A].end), m = !0, p = !0), _ = o === d, x = A === y.formatDateLite(new Date(u)), V = new Date(_ ? r : o), C = y.formatDateLite(V), x && (m = !1);
|
|
72
73
|
} else
|
|
73
74
|
p = !0, _ = o === r, x = a === u && E > a, V = _ ? t.start : new Date(o), C = y.formatDateLite(_ ? t.start : V);
|
|
74
|
-
p && (t.segments[C] = { start: V, startTimeMinutes: _ ? t.startTimeMinutes : 0, endTimeMinutes: x ? t.endTimeMinutes :
|
|
75
|
+
p && (t.segments[C] = { start: V, startTimeMinutes: _ ? t.startTimeMinutes : 0, endTimeMinutes: x ? t.endTimeMinutes : q, isFirstDay: _, isLastDay: x }), o = E;
|
|
75
76
|
}
|
|
76
77
|
return t;
|
|
77
78
|
}
|
|
@@ -79,8 +80,8 @@ class ue {
|
|
|
79
80
|
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
81
|
}
|
|
81
82
|
checkCellOverlappingEvents(t, i) {
|
|
82
|
-
|
|
83
|
-
|
|
83
|
+
K = t.slice(0), D = {}, t.forEach((l) => {
|
|
84
|
+
K.shift(), D[l._eid] || (D[l._eid] = { overlaps: [], start: l.start, position: 0 }), D[l._eid].position = 0, K.forEach((s) => {
|
|
84
85
|
D[s._eid] || (D[s._eid] = { overlaps: [], start: s.start, position: 0 });
|
|
85
86
|
const o = this.eventInRange(s, l.start, l.end), a = i.overlapsPerTimeStep ? y.datesInSameTimeStep(l.start, s.start, i.timeStep) : 1;
|
|
86
87
|
if (l.background || l.allDay || s.background || s.allDay || !o || !a) {
|
|
@@ -114,12 +115,12 @@ class ue {
|
|
|
114
115
|
return l < n.getTime() && s > i.getTime();
|
|
115
116
|
}
|
|
116
117
|
}
|
|
117
|
-
const
|
|
118
|
+
const ve = { class: "vuecal__flex vuecal__weekdays-headings" }, me = ["onClick"], pe = { class: "vuecal__flex weekday-label", grow: "" }, we = { class: "full" }, ye = { class: "small" }, De = { class: "xsmall" }, ge = { key: 0 }, fe = { key: 0, class: "vuecal__flex vuecal__split-days-headers", grow: "" }, B = (e, t) => {
|
|
118
119
|
const i = e.__vccOpts || e;
|
|
119
120
|
for (const [n, l] of t)
|
|
120
121
|
i[n] = l;
|
|
121
122
|
return i;
|
|
122
|
-
},
|
|
123
|
+
}, ne = B({ inject: ["vuecal", "utils", "view"], props: { transitionDirection: { type: String, default: "right" }, weekDays: { type: Array, default: () => [] }, switchToNarrowerView: { type: Function, default: () => {
|
|
123
124
|
} } }, methods: { selectCell(e, t) {
|
|
124
125
|
e.getTime() !== this.view.selectedDate.getTime() && (this.view.selectedDate = e), this.utils.cell.selectCell(!1, e, t);
|
|
125
126
|
}, cleanupHeading: (e) => ({ label: e.full, date: e.date, ...e.today ? { today: e.today } : {} }) }, computed: { headings() {
|
|
@@ -137,8 +138,8 @@ const he = { class: "vuecal__flex vuecal__weekdays-headings" }, ce = ["onClick"]
|
|
|
137
138
|
}, cellHeadingsClickable() {
|
|
138
139
|
return this.view.id === "week" && (this.vuecal.clickToNavigate || this.vuecal.dblclickToNavigate);
|
|
139
140
|
} } }, [["render", function(e, t, i, n, l, s) {
|
|
140
|
-
return h(), c("div",
|
|
141
|
-
}]]),
|
|
141
|
+
return h(), c("div", ve, [(h(!0), c(T, null, S(s.headings, (o, a) => (h(), c(T, { key: a }, [o.hide ? v("", !0) : (h(), c("div", { key: 0, class: b(["vuecal__flex vuecal__heading", { today: o.today, clickable: s.cellHeadingsClickable }]), style: $(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()) }, [U(R, { 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", pe, [w(e.$slots, "weekday-heading", { heading: s.cleanupHeading(o), view: s.view }, () => [k("span", we, f(o.full), 1), k("span", ye, f(o.small), 1), k("span", De, f(o.xsmall), 1), o.dayOfMonth ? (h(), c("span", ge, "\xA0" + f(o.dayOfMonth), 1)) : v("", !0)])]), s.vuecal.hasSplits && s.vuecal.stickySplitLabels ? (h(), c("div", fe, [(h(!0), c(T, null, S(s.vuecal.daySplits, (d, r) => (h(), c("div", { class: b(["day-split-header", d.class || !1]), key: r }, [w(e.$slots, "split-label", { split: d, view: s.view }, () => [M(f(d.label), 1)])], 2))), 128))])) : v("", !0)]))]), _: 2 }, 1032, ["name", "appear"])], 46, me))], 64))), 128))]);
|
|
142
|
+
}]]), _e = { class: "vuecal__header" }, ke = { key: 0, class: "vuecal__flex vuecal__menu", role: "tablist", "aria-label": "Calendar views navigation" }, be = ["onDragenter", "onDragleave", "onClick", "aria-label"], Te = { key: 1, class: "vuecal__title-bar" }, Ee = ["aria-label"], Ce = { class: "vuecal__flex vuecal__title", grow: "" }, Me = ["aria-label"], Se = { key: 0, class: "vuecal__flex vuecal__split-days-headers" }, Oe = B({ inject: ["vuecal", "previous", "next", "switchView", "updateSelectedDate", "modules", "view"], components: { WeekdaysHeadings: ne }, 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
143
|
} } }, data: () => ({ highlightedControl: null }), methods: { goToToday() {
|
|
143
144
|
this.updateSelectedDate(new Date(new Date().setHours(0, 0, 0, 0)));
|
|
144
145
|
}, switchToBroaderView() {
|
|
@@ -156,8 +157,8 @@ const he = { class: "vuecal__flex vuecal__weekdays-headings" }, ce = ["onClick"]
|
|
|
156
157
|
return this.modules.dnd;
|
|
157
158
|
} } }, [["render", function(e, t, i, n, l, s) {
|
|
158
159
|
const o = j("weekdays-headings");
|
|
159
|
-
return h(), c("div",
|
|
160
|
-
}]]),
|
|
160
|
+
return h(), c("div", _e, [i.options.hideViewSelector ? v("", !0) : (h(), c("div", ke, [(h(!0), c(T, null, S(i.viewProps.views, (a, d) => (h(), c(T, { key: d }, [a.enabled ? (h(), c("button", { key: 0, class: b(["vuecal__view-btn", { "vuecal__view-btn--active": s.view.id === d, "vuecal__view-btn--highlighted": e.highlightedControl === d }]), type: "button", onDragenter: (r) => i.editEvents.drag && s.dnd && s.dnd.viewSelectorDragEnter(r, d, e.$data), onDragleave: (r) => i.editEvents.drag && s.dnd && s.dnd.viewSelectorDragLeave(r, d, e.$data), onClick: (r) => s.switchView(d, null, !0), "aria-label": `${a.label} view` }, f(a.label), 43, be)) : v("", !0)], 64))), 128))])), i.options.hideTitleBar ? v("", !0) : (h(), c("div", Te, [k("button", { class: b(["vuecal__arrow vuecal__arrow--prev", { "vuecal__arrow--highlighted": e.highlightedControl === "previous" }]), type: "button", onClick: t[0] || (t[0] = (...a) => s.previous && s.previous(...a)), onDragenter: t[1] || (t[1] = (a) => i.editEvents.drag && s.dnd && s.dnd.viewSelectorDragEnter(a, "previous", e.$data)), onDragleave: t[2] || (t[2] = (a) => i.editEvents.drag && s.dnd && s.dnd.viewSelectorDragLeave(a, "previous", e.$data)), "aria-label": `Previous ${s.view.id}` }, [w(e.$slots, "arrow-prev")], 42, Ee), k("div", Ce, [U(R, { name: i.options.transitions ? `slide-fade--${s.transitionDirection}` : "" }, { default: g(() => [(h(), H(de(s.broaderView ? "button" : "span"), { type: !!s.broaderView && "button", key: `${s.view.id}${s.view.startDate.toString()}`, onClick: t[3] || (t[3] = (a) => !!s.broaderView && s.switchToBroaderView()), "aria-label": !!s.broaderView && `Go to ${s.broaderView} view` }, { default: g(() => [w(e.$slots, "title")]), _: 3 }, 8, ["type", "aria-label"]))]), _: 3 }, 8, ["name"])]), i.options.todayButton ? (h(), c("button", { key: 0, class: b(["vuecal__today-btn", { "vuecal__today-btn--highlighted": e.highlightedControl === "today" }]), type: "button", onClick: t[4] || (t[4] = (...a) => s.goToToday && s.goToToday(...a)), onDragenter: t[5] || (t[5] = (a) => i.editEvents.drag && s.dnd && s.dnd.viewSelectorDragEnter(a, "today", e.$data)), onDragleave: t[6] || (t[6] = (a) => i.editEvents.drag && s.dnd && s.dnd.viewSelectorDragLeave(a, "today", e.$data)), "aria-label": "Today" }, [w(e.$slots, "today-button")], 34)) : v("", !0), k("button", { class: b(["vuecal__arrow vuecal__arrow--next", { "vuecal__arrow--highlighted": e.highlightedControl === "next" }]), type: "button", onClick: t[7] || (t[7] = (...a) => s.next && s.next(...a)), onDragenter: t[8] || (t[8] = (a) => i.editEvents.drag && s.dnd && s.dnd.viewSelectorDragEnter(a, "next", e.$data)), onDragleave: t[9] || (t[9] = (a) => i.editEvents.drag && s.dnd && s.dnd.viewSelectorDragLeave(a, "next", e.$data)), "aria-label": `Next ${s.view.id}` }, [w(e.$slots, "arrow-next")], 42, Me)])), i.viewProps.weekDaysInHeader ? (h(), H(o, { key: 2, "week-days": i.weekDays, "transition-direction": s.transitionDirection, "switch-to-narrower-view": i.switchToNarrowerView }, X({ _: 2 }, [e.$slots["weekday-heading"] ? { name: "weekday-heading", fn: g(({ heading: a, view: d }) => [w(e.$slots, "weekday-heading", { heading: a, view: d })]), key: "0" } : void 0, e.$slots["split-label"] ? { name: "split-label", fn: g(({ split: a }) => [w(e.$slots, "split-label", { split: a, view: s.view })]), key: "1" } : void 0]), 1032, ["week-days", "transition-direction", "switch-to-narrower-view"])) : v("", !0), U(R, { name: `slide-fade--${s.transitionDirection}` }, { default: g(() => [s.showDaySplits ? (h(), c("div", Se, [(h(!0), c(T, null, S(i.daySplits, (a, d) => (h(), c("div", { class: b(["day-split-header", a.class || !1]), key: d }, [w(e.$slots, "split-label", { split: a, view: s.view.id }, () => [M(f(a.label), 1)])], 2))), 128))])) : v("", !0)]), _: 3 }, 8, ["name"])]);
|
|
161
|
+
}]]), $e = ["draggable"], xe = { inject: ["vuecal", "utils", "modules", "view", "domEvents", "editEvents"], props: { cellFormattedDate: { type: String, default: "" }, event: { type: Object, default: () => ({}) }, cellEvents: { type: Array, default: () => [] }, overlaps: { type: Array, default: () => [] }, eventPosition: { type: Number, default: 0 }, overlapsStreak: { type: Number, default: 0 }, allDay: { type: Boolean, default: !1 } }, data: () => ({ touch: { dragThreshold: 30, startX: 0, startY: 0, dragged: !1 } }), methods: { onMouseDown(e, t = !1) {
|
|
161
162
|
if ("ontouchstart" in window && !t)
|
|
162
163
|
return !1;
|
|
163
164
|
const { clickHoldAnEvent: i, focusAnEvent: n, resizeAnEvent: l, dragAnEvent: s } = this.domEvents;
|
|
@@ -235,8 +236,8 @@ const he = { class: "vuecal__flex vuecal__weekdays-headings" }, ce = ["onClick"]
|
|
|
235
236
|
return e.resize && this.event.resizable && t && !this.allDay && (!this.segment || this.segment && this.segment.isLastDay) && this.view.id !== "month";
|
|
236
237
|
}, dnd() {
|
|
237
238
|
return this.modules.dnd;
|
|
238
|
-
} } },
|
|
239
|
-
return h(), c("div", { class: b(["vuecal__event", s.eventClasses]), style: $(s.eventStyles), tabindex: "0", onFocus: t[4] || (t[4] = (...o) => s.focusEvent && s.focusEvent(...o)), onKeypress: t[5] || (t[5] =
|
|
239
|
+
} } }, We = ["data-split", "aria-label", "onTouchstart", "onMousedown", "onDragover", "onDrop"], He = { key: 0, class: "cell-time-labels" }, Ve = ["innerHTML"], Ae = { key: 2, class: "vuecal__cell-events" }, je = ["title"], ae = B({ inject: ["vuecal", "utils", "modules", "view", "domEvents"], components: { Event: B(xe, [["render", function(e, t, i, n, l, s) {
|
|
240
|
+
return h(), c("div", { class: b(["vuecal__event", s.eventClasses]), style: $(s.eventStyles), tabindex: "0", onFocus: t[4] || (t[4] = (...o) => s.focusEvent && s.focusEvent(...o)), onKeypress: t[5] || (t[5] = Z(L((...o) => s.onEnterKeypress && s.onEnterKeypress(...o), ["stop"]), ["enter"])), onMouseenter: t[6] || (t[6] = (...o) => s.onMouseEnter && s.onMouseEnter(...o)), onMouseleave: t[7] || (t[7] = (...o) => s.onMouseLeave && s.onMouseLeave(...o)), onTouchstart: t[8] || (t[8] = L((...o) => s.onTouchStart && s.onTouchStart(...o), ["stop"])), onMousedown: t[9] || (t[9] = (o) => s.onMouseDown(o)), onMouseup: t[10] || (t[10] = (...o) => s.onMouseUp && s.onMouseUp(...o)), onTouchend: t[11] || (t[11] = (...o) => s.onMouseUp && s.onMouseUp(...o)), onTouchmove: t[12] || (t[12] = (...o) => s.onTouchMove && s.onTouchMove(...o)), onDblclick: t[13] || (t[13] = (...o) => s.onDblClick && s.onDblClick(...o)), draggable: s.draggable, onDragstart: t[14] || (t[14] = (o) => s.draggable && s.onDragStart(o)), onDragend: t[15] || (t[15] = (o) => s.draggable && s.onDragEnd()) }, [s.vuecal.editEvents.delete && i.event.deletable ? (h(), c("div", { key: 0, class: "vuecal__event-delete", onClick: t[0] || (t[0] = L((...o) => s.deleteEvent && s.deleteEvent(...o), ["stop"])), onTouchstart: t[1] || (t[1] = L((...o) => s.touchDeleteEvent && s.touchDeleteEvent(...o), ["stop"])) }, f(s.vuecal.texts.deleteEvent), 33)) : v("", !0), w(e.$slots, "event", { event: i.event, view: s.view.id }), s.resizable ? (h(), c("div", { key: 1, class: "vuecal__event-resize-handle", contenteditable: "false", onMousedown: t[2] || (t[2] = L((...o) => s.onResizeHandleMouseDown && s.onResizeHandleMouseDown(...o), ["stop", "prevent"])), onTouchstart: t[3] || (t[3] = L((...o) => s.onResizeHandleMouseDown && s.onResizeHandleMouseDown(...o), ["stop", "prevent"])) }, null, 32)) : v("", !0)], 46, $e);
|
|
240
241
|
}]]) }, props: { options: { type: Object, default: () => ({}) }, editEvents: { type: Object, required: !0 }, data: { type: Object, required: !0 }, cellSplits: { type: Array, default: () => [] }, minTimestamp: { type: [Number, null], default: null }, maxTimestamp: { type: [Number, null], default: null }, cellWidth: { type: [Number, Boolean], default: !1 }, allDay: { type: Boolean, default: !1 } }, data: () => ({ cellOverlaps: {}, cellOverlapsStreak: 1, timeAtCursor: null, highlighted: !1, highlightedSplit: null }), methods: { getSplitAtCursor({ target: e }) {
|
|
241
242
|
let t = e.classList.contains("vuecal__cell-split") ? e : this.vuecal.findAncestor(e, "vuecal__cell-split");
|
|
242
243
|
return t && (t = t.attributes["data-split"].value, parseInt(t).toString() === t.toString() && (t = parseInt(t))), t || null;
|
|
@@ -367,13 +368,13 @@ const he = { class: "vuecal__flex vuecal__weekdays-headings" }, ce = ["onClick"]
|
|
|
367
368
|
return this.options.timeCellHeight / this.options.timeStep;
|
|
368
369
|
} } }, [["render", function(e, t, i, n, l, s) {
|
|
369
370
|
const o = j("event");
|
|
370
|
-
return h(), H(
|
|
371
|
-
}]]),
|
|
371
|
+
return h(), H(ue, { class: b(["vuecal__cell", s.cellClasses]), name: `slide-fade--${s.transitionDirection}`, tag: "div", appear: i.options.transitions, style: $(s.cellStyles) }, { default: g(() => [(h(!0), c(T, null, S(s.splitsCount ? s.splits : 1, (a, d) => (h(), c("div", { class: b(["vuecal__flex vuecal__cell-content", s.splitsCount && s.splitClasses(a)]), key: i.options.transitions ? `${s.view.id}-${i.data.content}-${d}` : d, "data-split": !!s.splitsCount && a.id, column: "", tabindex: "0", "aria-label": i.data.content, onFocus: t[0] || (t[0] = (r) => s.onCellFocus(r)), onKeypress: t[1] || (t[1] = Z((r) => s.onCellkeyPressEnter(r), ["enter"])), onTouchstart: (r) => !s.isDisabled && s.onCellTouchStart(r, s.splitsCount ? a.id : null), onMousedown: (r) => !s.isDisabled && s.onCellMouseDown(r, s.splitsCount ? a.id : null), onClick: t[2] || (t[2] = (r) => !s.isDisabled && s.onCellClick(r)), onDblclick: t[3] || (t[3] = (r) => !s.isDisabled && s.onCellDblClick(r)), onContextmenu: t[4] || (t[4] = (r) => !s.isDisabled && i.options.cellContextmenu && s.onCellContextMenu(r)), onDragenter: t[5] || (t[5] = (r) => !s.isDisabled && i.editEvents.drag && s.dnd && s.dnd.cellDragEnter(r, e.$data, i.data.startDate)), onDragover: (r) => !s.isDisabled && i.editEvents.drag && s.dnd && s.dnd.cellDragOver(r, e.$data, i.data.startDate, s.splitsCount ? a.id : null), onDragleave: t[6] || (t[6] = (r) => !s.isDisabled && i.editEvents.drag && s.dnd && s.dnd.cellDragLeave(r, e.$data, i.data.startDate)), onDrop: (r) => !s.isDisabled && i.editEvents.drag && s.dnd && s.dnd.cellDragDrop(r, e.$data, i.data.startDate, s.splitsCount ? a.id : null) }, [i.options.showTimeInCells && i.options.time && s.isWeekOrDayView && !i.allDay ? (h(), c("div", He, [(h(!0), c(T, null, S(s.vuecal.timeCells, (r, u) => (h(), c("span", { class: "cell-time-label", key: u }, f(r.label), 1))), 128))])) : v("", !0), s.isWeekOrDayView && !i.allDay && s.specialHours.length ? (h(!0), c(T, { key: 1 }, S(s.specialHours, (r, u) => (h(), c("div", { class: b(["vuecal__special-hours", `vuecal__special-hours--day${r.day} ${r.class}`]), style: $(`height: ${r.height}px;top: ${r.top}px`) }, [r.label ? (h(), c("div", { key: 0, class: "special-hours-label", innerHTML: r.label }, null, 8, Ve)) : v("", !0)], 6))), 256)) : v("", !0), w(e.$slots, "cell-content", { events: s.events, selectCell: (r) => s.selectCell(r, !0), split: !!s.splitsCount && a }), s.eventsCount && (s.isWeekOrDayView || s.view.id === "month" && i.options.eventsOnMonthView) ? (h(), c("div", Ae, [(h(!0), c(T, null, S(s.splitsCount ? a.events : s.events, (r, u) => (h(), H(o, { key: u, "cell-formatted-date": i.data.formattedDate, event: r, "all-day": i.allDay, "cell-events": s.splitsCount ? a.events : s.events, overlaps: ((s.splitsCount ? a.overlaps[r._eid] : e.cellOverlaps[r._eid]) || []).overlaps, "event-position": ((s.splitsCount ? a.overlaps[r._eid] : e.cellOverlaps[r._eid]) || []).position, "overlaps-streak": s.splitsCount ? a.overlapsStreak : e.cellOverlapsStreak }, { event: g(({ event: m, view: p }) => [w(e.$slots, "event", { view: p, event: m })]), _: 2 }, 1032, ["cell-formatted-date", "event", "all-day", "cell-events", "overlaps", "event-position", "overlaps-streak"]))), 128))])) : v("", !0)], 42, We))), 128)), s.timelineVisible ? (h(), c("div", { class: "vuecal__now-line", style: $(`top: ${s.todaysTimePosition}px`), key: i.options.transitions ? `${s.view.id}-now-line` : "now-line", title: s.utils.date.formatTime(s.vuecal.now) }, null, 12, je)) : v("", !0)]), _: 3 }, 8, ["class", "name", "appear", "style"]);
|
|
372
|
+
}]]), Ye = { key: 0, class: "vuecal__all-day-text", style: { width: "3em" } }, Le = B({ inject: ["vuecal", "view", "editEvents"], components: { "vuecal-cell": ae }, props: { options: { type: Object, required: !0 }, cells: { type: Array, required: !0 }, label: { type: String, required: !0 }, daySplits: { type: Array, default: () => [] }, shortEvents: { type: Boolean, default: !0 }, height: { type: String, default: "" }, cellOrSplitMinWidth: { type: Number, default: null } }, computed: { hasCellOrSplitWidth() {
|
|
372
373
|
return !!(this.options.minCellWidth || this.daySplits.length && this.options.minSplitWidth);
|
|
373
374
|
} } }, [["render", function(e, t, i, n, l, s) {
|
|
374
375
|
const o = j("vuecal-cell");
|
|
375
|
-
return h(), c("div", { class: "vuecal__flex vuecal__all-day", style: $(i.cellOrSplitMinWidth && { height: i.height }) }, [i.cellOrSplitMinWidth ? v("", !0) : (h(), c("div",
|
|
376
|
-
}]]),
|
|
376
|
+
return h(), c("div", { class: "vuecal__flex vuecal__all-day", style: $(i.cellOrSplitMinWidth && { height: i.height }) }, [i.cellOrSplitMinWidth ? v("", !0) : (h(), c("div", Ye, [k("span", null, f(i.label), 1)])), k("div", { class: b(["vuecal__flex vuecal__cells", `${s.view.id}-view`]), grow: "", style: $(i.cellOrSplitMinWidth ? `min-width: ${i.cellOrSplitMinWidth}px` : "") }, [(h(!0), c(T, null, S(i.cells, (a, d) => (h(), H(o, { key: d, options: i.options, "edit-events": s.editEvents, data: a, "all-day": !0, "cell-width": i.options.hideWeekdays.length && (s.vuecal.isWeekView || s.vuecal.isMonthView) && s.vuecal.cellWidth, "min-timestamp": i.options.minTimestamp, "max-timestamp": i.options.maxTimestamp, "cell-splits": i.daySplits }, { event: g(({ event: r, view: u }) => [w(e.$slots, "event", { view: u, event: r })]), _: 2 }, 1032, ["options", "edit-events", "data", "cell-width", "min-timestamp", "max-timestamp", "cell-splits"]))), 128))], 6)], 4);
|
|
377
|
+
}]]), Fe = ["lang"], Be = k("i", { class: "angle" }, null, -1), Ne = k("i", { class: "angle" }, null, -1), Ie = { class: "default" }, ze = { key: 0, class: "vuecal__flex vuecal__body", grow: "" }, Pe = ["onBlur", "innerHTML"], Ue = ["innerHTML"], Re = ["innerHTML"], qe = { class: "vuecal__flex", row: "", grow: "" }, Ke = { key: 0, class: "vuecal__time-column" }, Xe = k("span", { class: "vuecal__time-cell-line" }, null, -1), Ge = { class: "vuecal__time-cell-label" }, Ze = { key: 1, class: "vuecal__flex vuecal__week-numbers", column: "" }, Je = ["wrap", "column"], Qe = ["onBlur", "innerHTML"], et = ["innerHTML"], tt = ["innerHTML"], it = ["wrap"], st = ["innerHTML"], nt = ["innerHTML"], at = { key: 2, class: "vuecal__cell-events-count" }, lt = { key: 3, class: "vuecal__no-event" }, ot = ["onBlur", "innerHTML"], rt = ["innerHTML"], dt = { key: 2, class: "vuecal__event-time" }, ut = { key: 0 }, ht = { key: 1, class: "days-to-end" }, ct = ["innerHTML"], vt = { key: 0, class: "vuecal__scrollbar-check" }, mt = [k("div", null, null, -1)], z = 1440, P = { weekDays: Array(7).fill(""), weekDaysShort: [], months: Array(12).fill(""), years: "", year: "", month: "", week: "", day: "", today: "", noEvent: "", allDay: "", deleteEvent: "", createEvent: "", dateFormat: "dddd MMMM D, YYYY", am: "am", pm: "pm" }, ie = ["years", "year", "month", "week", "day"], se = new class {
|
|
377
378
|
constructor(e, t = !1) {
|
|
378
379
|
W(this, "texts", {});
|
|
379
380
|
W(this, "dateToMinutes", (e) => 60 * e.getHours() + e.getMinutes());
|
|
@@ -411,7 +412,7 @@ const he = { class: "vuecal__flex vuecal__weekdays-headings" }, ce = ["onClick"]
|
|
|
411
412
|
this._texts = e;
|
|
412
413
|
}
|
|
413
414
|
_todayFormatted() {
|
|
414
|
-
return
|
|
415
|
+
return ee !== new Date().getDate() && (N = new Date(), ee = N.getDate(), te = `${N.getFullYear()}-${N.getMonth()}-${N.getDate()}`), te;
|
|
415
416
|
}
|
|
416
417
|
addDays(e, t) {
|
|
417
418
|
const i = new Date(e.valueOf());
|
|
@@ -526,24 +527,24 @@ const he = { class: "vuecal__flex vuecal__weekdays-headings" }, ce = ["onClick"]
|
|
|
526
527
|
const l = i % 12 ? i % 12 : 12, s = (t || { am: "am", pm: "pm" })[i === 24 || i < 12 ? "am" : "pm"];
|
|
527
528
|
return F = { H: i, h: l, HH: (i < 10 ? "0" : "") + i, hh: (l < 10 ? "0" : "") + l, am: s, AM: s.toUpperCase(), m: n, mm: (n < 10 ? "0" : "") + n }, F;
|
|
528
529
|
}
|
|
529
|
-
}(
|
|
530
|
+
}(P), pt = { name: "vue-cal", components: { "vuecal-cell": ae, "vuecal-header": Oe, WeekdaysHeadings: ne, AllDayBar: Le }, provide() {
|
|
530
531
|
return { vuecal: this, utils: this.utils, modules: this.modules, previous: this.previous, next: this.next, switchView: this.switchView, updateSelectedDate: this.updateSelectedDate, editEvents: this.editEvents, view: this.view, domEvents: this.domEvents };
|
|
531
|
-
}, props: { activeView: { type: String, default: "week" }, allDayBarHeight: { type: [String, Number], default: "25px" }, cellClickHold: { type: Boolean, default: !0 }, cellContextmenu: { type: Boolean, default: !1 }, clickToNavigate: { type: Boolean, default: !1 }, dblclickToNavigate: { type: Boolean, default: !0 }, disableDatePrototypes: { type: Boolean, default: !1 }, disableDays: { type: Array, default: () => [] }, disableViews: { type: Array, default: () => [] }, dragToCreateEvent: { type: Boolean, default: !0 }, dragToCreateThreshold: { type: Number, default: 15 }, editableEvents: { type: [Boolean, Object], default: !1 }, events: { type: Array, default: () => [] }, eventsCountOnYearView: { type: Boolean, default: !1 }, eventsOnMonthView: { type: [Boolean, String], default: !1 }, hideBody: { type: Boolean, default: !1 }, hideTitleBar: { type: Boolean, default: !1 }, hideViewSelector: { type: Boolean, default: !1 }, hideWeekdays: { type: Array, default: () => [] }, hideWeekends: { type: Boolean, default: !1 }, locale: { type: [String, Object], default: "en" }, maxDate: { type: [String, Date], default: "" }, minCellWidth: { type: Number, default: 0 }, minDate: { type: [String, Date], default: "" }, minEventWidth: { type: Number, default: 0 }, minSplitWidth: { type: Number, default: 0 }, onEventClick: { type: [Function, null], default: null }, onEventCreate: { type: [Function, null], default: null }, onEventDblclick: { type: [Function, null], default: null }, overlapsPerTimeStep: { type: Boolean, default: !1 }, resizeX: { type: Boolean, default: !1 }, selectedDate: { type: [String, Date], default: "" }, showAllDayEvents: { type: [Boolean, String], default: !1 }, showTimeInCells: { type: Boolean, default: !1 }, showWeekNumbers: { type: [Boolean, String], default: !1 }, snapToTime: { type: Number, default: 0 }, small: { type: Boolean, default: !1 }, specialHours: { type: Object, default: () => ({}) }, splitDays: { type: Array, default: () => [] }, startWeekOnSunday: { type: Boolean, default: !1 }, stickySplitLabels: { type: Boolean, default: !1 }, time: { type: Boolean, default: !0 }, timeCellHeight: { type: Number, default: 40 }, timeFormat: { type: String, default: "" }, timeFrom: { type: Number, default: 0 }, timeStep: { type: Number, default: 60 }, timeTo: { type: Number, default:
|
|
532
|
-
return { ready: !1, texts: { ...
|
|
532
|
+
}, props: { activeView: { type: String, default: "week" }, allDayBarHeight: { type: [String, Number], default: "25px" }, cellClickHold: { type: Boolean, default: !0 }, cellContextmenu: { type: Boolean, default: !1 }, clickToNavigate: { type: Boolean, default: !1 }, dblclickToNavigate: { type: Boolean, default: !0 }, disableDatePrototypes: { type: Boolean, default: !1 }, disableDays: { type: Array, default: () => [] }, disableViews: { type: Array, default: () => [] }, dragToCreateEvent: { type: Boolean, default: !0 }, dragToCreateThreshold: { type: Number, default: 15 }, editableEvents: { type: [Boolean, Object], default: !1 }, events: { type: Array, default: () => [] }, eventsCountOnYearView: { type: Boolean, default: !1 }, eventsOnMonthView: { type: [Boolean, String], default: !1 }, hideBody: { type: Boolean, default: !1 }, hideTitleBar: { type: Boolean, default: !1 }, hideViewSelector: { type: Boolean, default: !1 }, hideWeekdays: { type: Array, default: () => [] }, hideWeekends: { type: Boolean, default: !1 }, locale: { type: [String, Object], default: "en" }, maxDate: { type: [String, Date], default: "" }, minCellWidth: { type: Number, default: 0 }, minDate: { type: [String, Date], default: "" }, minEventWidth: { type: Number, default: 0 }, minSplitWidth: { type: Number, default: 0 }, onEventClick: { type: [Function, null], default: null }, onEventCreate: { type: [Function, null], default: null }, onEventDblclick: { type: [Function, null], default: null }, overlapsPerTimeStep: { type: Boolean, default: !1 }, resizeX: { type: Boolean, default: !1 }, selectedDate: { type: [String, Date], default: "" }, showAllDayEvents: { type: [Boolean, String], default: !1 }, showTimeInCells: { type: Boolean, default: !1 }, showWeekNumbers: { type: [Boolean, String], default: !1 }, snapToTime: { type: Number, default: 0 }, small: { type: Boolean, default: !1 }, specialHours: { type: Object, default: () => ({}) }, splitDays: { type: Array, default: () => [] }, startWeekOnSunday: { type: Boolean, default: !1 }, stickySplitLabels: { type: Boolean, default: !1 }, time: { type: Boolean, default: !0 }, timeCellHeight: { type: Number, default: 40 }, timeFormat: { type: String, default: "" }, timeFrom: { type: Number, default: 0 }, timeStep: { type: Number, default: 60 }, timeTo: { type: Number, default: z }, todayButton: { type: Boolean, default: !1 }, transitions: { type: Boolean, default: !0 }, twelveHour: { type: Boolean, default: !1 }, watchRealTime: { type: Boolean, default: !1 }, xsmall: { type: Boolean, default: !1 } }, data() {
|
|
533
|
+
return { ready: !1, texts: { ...P }, utils: { date: !!this.disableDatePrototypes && se.removePrototypes() || se, cell: null, event: null }, modules: { dnd: null }, cellsEl: null, view: { id: "", title: "", startDate: null, endDate: null, firstCellDate: null, lastCellDate: null, selectedDate: null, events: [] }, eventIdIncrement: 1, now: new Date(), timeTickerIds: [null, null], domEvents: { resizeAnEvent: { _eid: null, start: null, split: null, segment: null, originalEndTimeMinutes: 0, originalEnd: null, end: null, startCell: null, endCell: null }, dragAnEvent: { _eid: null }, dragCreateAnEvent: { startCursorY: null, start: null, split: null, event: null }, focusAnEvent: { _eid: null, mousedUp: !1 }, clickHoldAnEvent: { _eid: null, timeout: 1200, timeoutId: null }, dblTapACell: { taps: 0, timeout: 500 }, clickHoldACell: { cellId: null, split: null, timeout: 1200, timeoutId: null, eventCreated: !1 }, cancelClickEventCreation: !1 }, mutableEvents: [], transitionDirection: "right" };
|
|
533
534
|
}, methods: { async loadLocale(e) {
|
|
534
535
|
if (typeof this.locale == "object")
|
|
535
|
-
return this.texts = Object.assign({},
|
|
536
|
+
return this.texts = Object.assign({}, P, e), void this.utils.date.updateTexts(this.texts);
|
|
536
537
|
if (this.locale === "en") {
|
|
537
538
|
const t = await import("./i18n/en.es.js");
|
|
538
|
-
this.texts = Object.assign({},
|
|
539
|
+
this.texts = Object.assign({}, P, t);
|
|
539
540
|
} else
|
|
540
541
|
((t, i) => {
|
|
541
542
|
const n = t[i];
|
|
542
543
|
return n ? typeof n == "function" ? n() : Promise.resolve(n) : new Promise((l, s) => {
|
|
543
544
|
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(s.bind(null, new Error("Unknown variable dynamic import: " + i)));
|
|
544
545
|
});
|
|
545
|
-
})(Object.assign({ "./i18n/ar.json": () => import("./i18n/ar.es.js"), "./i18n/bg.json": () => import("./i18n/bg.es.js"), "./i18n/bn.json": () => import("./i18n/bn.es.js"), "./i18n/bs.json": () => import("./i18n/bs.es.js"), "./i18n/ca.json": () => import("./i18n/ca.es.js"), "./i18n/cs.json": () => import("./i18n/cs.es.js"), "./i18n/da.json": () => import("./i18n/da.es.js"), "./i18n/de.json": () => import("./i18n/de.es.js"), "./i18n/el.json": () => import("./i18n/el.es.js"), "./i18n/en.json": () => import("./i18n/en.es.js"), "./i18n/es.json": () => import("./i18n/es.es.js"), "./i18n/et.json": () => import("./i18n/et.es.js"), "./i18n/fa.json": () => import("./i18n/fa.es.js"), "./i18n/fr.json": () => import("./i18n/fr.es.js"), "./i18n/he.json": () => import("./i18n/he.es.js"), "./i18n/hr.json": () => import("./i18n/hr.es.js"), "./i18n/hu.json": () => import("./i18n/hu.es.js"), "./i18n/id.json": () => import("./i18n/id.es.js"), "./i18n/is.json": () => import("./i18n/is.es.js"), "./i18n/it.json": () => import("./i18n/it.es.js"), "./i18n/ja.json": () => import("./i18n/ja.es.js"), "./i18n/ka.json": () => import("./i18n/ka.es.js"), "./i18n/ko.json": () => import("./i18n/ko.es.js"), "./i18n/lt.json": () => import("./i18n/lt.es.js"), "./i18n/mn.json": () => import("./i18n/mn.es.js"), "./i18n/nl.json": () => import("./i18n/nl.es.js"), "./i18n/no.json": () => import("./i18n/no.es.js"), "./i18n/pl.json": () => import("./i18n/pl.es.js"), "./i18n/pt-br.json": () => import("./i18n/pt-br.es.js"), "./i18n/ro.json": () => import("./i18n/ro.es.js"), "./i18n/ru.json": () => import("./i18n/ru.es.js"), "./i18n/sk.json": () => import("./i18n/sk.es.js"), "./i18n/sl.json": () => import("./i18n/sl.es.js"), "./i18n/sq.json": () => import("./i18n/sq.es.js"), "./i18n/sr.json": () => import("./i18n/sr.es.js"), "./i18n/sv.json": () => import("./i18n/sv.es.js"), "./i18n/tr.json": () => import("./i18n/tr.es.js"), "./i18n/uk.json": () => import("./i18n/uk.es.js"), "./i18n/vi.json": () => import("./i18n/vi.es.js"), "./i18n/zh-cn.json": () => import("./i18n/zh-cn.es.js"), "./i18n/zh-hk.json": () => import("./i18n/zh-hk.es.js") }), `./i18n/${e}.json`).then((t) => {
|
|
546
|
-
this.texts = Object.assign({},
|
|
546
|
+
})(Object.assign({ "./i18n/ar.json": () => import("./i18n/ar.es.js"), "./i18n/bg.json": () => import("./i18n/bg.es.js"), "./i18n/bn.json": () => import("./i18n/bn.es.js"), "./i18n/bs.json": () => import("./i18n/bs.es.js"), "./i18n/ca.json": () => import("./i18n/ca.es.js"), "./i18n/cs.json": () => import("./i18n/cs.es.js"), "./i18n/da.json": () => import("./i18n/da.es.js"), "./i18n/de.json": () => import("./i18n/de.es.js"), "./i18n/el.json": () => import("./i18n/el.es.js"), "./i18n/en.json": () => import("./i18n/en.es.js"), "./i18n/es.json": () => import("./i18n/es.es.js"), "./i18n/et.json": () => import("./i18n/et.es.js"), "./i18n/fa.json": () => import("./i18n/fa.es.js"), "./i18n/fi.json": () => import("./i18n/fi.es.js"), "./i18n/fr.json": () => import("./i18n/fr.es.js"), "./i18n/he.json": () => import("./i18n/he.es.js"), "./i18n/hr.json": () => import("./i18n/hr.es.js"), "./i18n/hu.json": () => import("./i18n/hu.es.js"), "./i18n/id.json": () => import("./i18n/id.es.js"), "./i18n/is.json": () => import("./i18n/is.es.js"), "./i18n/it.json": () => import("./i18n/it.es.js"), "./i18n/ja.json": () => import("./i18n/ja.es.js"), "./i18n/ka.json": () => import("./i18n/ka.es.js"), "./i18n/ko.json": () => import("./i18n/ko.es.js"), "./i18n/lt.json": () => import("./i18n/lt.es.js"), "./i18n/mn.json": () => import("./i18n/mn.es.js"), "./i18n/nl.json": () => import("./i18n/nl.es.js"), "./i18n/no.json": () => import("./i18n/no.es.js"), "./i18n/pl.json": () => import("./i18n/pl.es.js"), "./i18n/pt-br.json": () => import("./i18n/pt-br.es.js"), "./i18n/pt-pt.json": () => import("./i18n/pt-pt.es.js"), "./i18n/ro.json": () => import("./i18n/ro.es.js"), "./i18n/ru.json": () => import("./i18n/ru.es.js"), "./i18n/sk.json": () => import("./i18n/sk.es.js"), "./i18n/sl.json": () => import("./i18n/sl.es.js"), "./i18n/sq.json": () => import("./i18n/sq.es.js"), "./i18n/sr.json": () => import("./i18n/sr.es.js"), "./i18n/sv.json": () => import("./i18n/sv.es.js"), "./i18n/tr.json": () => import("./i18n/tr.es.js"), "./i18n/uk.json": () => import("./i18n/uk.es.js"), "./i18n/vi.json": () => import("./i18n/vi.es.js"), "./i18n/zh-cn.json": () => import("./i18n/zh-cn.es.js"), "./i18n/zh-hk.json": () => import("./i18n/zh-hk.es.js") }), `./i18n/${e}.json`).then((t) => {
|
|
547
|
+
this.texts = Object.assign({}, P, t.default), this.utils.date.updateTexts(this.texts);
|
|
547
548
|
});
|
|
548
549
|
}, loadDragAndDrop() {
|
|
549
550
|
import("./drag-and-drop.es.js").then((e) => {
|
|
@@ -551,8 +552,8 @@ const he = { class: "vuecal__flex vuecal__weekdays-headings" }, ce = ["onClick"]
|
|
|
551
552
|
this.modules.dnd = new t(this);
|
|
552
553
|
}).catch(() => console.warn("Vue Cal: Missing drag & drop module."));
|
|
553
554
|
}, validateView(e) {
|
|
554
|
-
return
|
|
555
|
-
A valid view must be one of: ${
|
|
555
|
+
return ie.includes(e) || (console.error(`Vue Cal: invalid active-view parameter provided: "${e}".
|
|
556
|
+
A valid view must be one of: ${ie.join(", ")}.`), e = "week"), this.enabledViews.includes(e) || (console.warn(`Vue Cal: the provided active-view "${e}" is disabled. Using the "${this.enabledViews[0]}" view instead.`), e = this.enabledViews[0]), e;
|
|
556
557
|
}, switchToNarrowerView(e = null) {
|
|
557
558
|
this.transitionDirection = "right";
|
|
558
559
|
const t = this.enabledViews[this.enabledViews.indexOf(this.view.id) + 1];
|
|
@@ -671,10 +672,10 @@ A valid view must be one of: ${ee.join(", ")}.`), e = "week"), this.enabledViews
|
|
|
671
672
|
if (a) {
|
|
672
673
|
const { originalEnd: _, originalEndTimeMinutes: x, endTimeMinutes: V } = i, C = this.view.events.find((Y) => Y._eid === i._eid);
|
|
673
674
|
if (d = V && V !== x, C && C.end.getTime() !== _.getTime()) {
|
|
674
|
-
const Y = this.mutableEvents.find((
|
|
675
|
+
const Y = this.mutableEvents.find((le) => le._eid === i._eid);
|
|
675
676
|
Y.endTimeMinutes = C.endTimeMinutes, Y.end = C.end;
|
|
676
|
-
const A = this.cleanupEvent(C),
|
|
677
|
-
this.$emit("event-duration-change", { event: A, oldDate: i.originalEnd, originalEvent:
|
|
677
|
+
const A = this.cleanupEvent(C), G = { ...this.cleanupEvent(C), end: _, endTimeMinutes: C.originalEndTimeMinutes };
|
|
678
|
+
this.$emit("event-duration-change", { event: A, oldDate: i.originalEnd, originalEvent: G }), this.$emit("event-change", { event: A, originalEvent: G });
|
|
678
679
|
}
|
|
679
680
|
C && (C.resizing = !1), i._eid = null, i.start = null, i.split = null, i.segment = null, i.originalEndTimeMinutes = null, i.originalEnd = null, i.endTimeMinutes = null, i.startCell = null, i.endCell = null;
|
|
680
681
|
} else
|
|
@@ -693,7 +694,7 @@ A valid view must be one of: ${ee.join(", ")}.`), e = "week"), this.enabledViews
|
|
|
693
694
|
const r = i.endTimeMinutes + this.snapToTime / 2;
|
|
694
695
|
i.endTimeMinutes = r - r % this.snapToTime;
|
|
695
696
|
}
|
|
696
|
-
if (s && (s.endTimeMinutes = i.endTimeMinutes), i.end.setHours(0, i.endTimeMinutes, i.endTimeMinutes ===
|
|
697
|
+
if (s && (s.endTimeMinutes = i.endTimeMinutes), i.end.setHours(0, i.endTimeMinutes, i.endTimeMinutes === z ? -1 : 0, 0), this.resizeX && this.isWeekView) {
|
|
697
698
|
i.daysCount = o.countDays(i.start, i.end);
|
|
698
699
|
const r = this.cellsEl, u = r.offsetWidth / r.childElementCount, m = Math.floor(l.x / u);
|
|
699
700
|
if (t.startCell === null && (t.startCell = m - (i.daysCount - 1)), t.endCell !== m) {
|
|
@@ -710,7 +711,7 @@ A valid view must be one of: ${ee.join(", ")}.`), e = "week"), this.enabledViews
|
|
|
710
711
|
const { dragCreateAnEvent: t } = this.domEvents, { start: i, startCursorY: n, split: l } = t, s = new Date(i), { minutes: o, cursorCoords: { y: a } } = this.minutesAtCursor(e);
|
|
711
712
|
if (t.event || !(Math.abs(n - a) < this.dragToCreateThreshold))
|
|
712
713
|
if (t.event) {
|
|
713
|
-
if (s.setHours(0, o, o ===
|
|
714
|
+
if (s.setHours(0, o, o === z ? -1 : 0, 0), this.snapToTime) {
|
|
714
715
|
let u = 60 * s.getHours() + s.getMinutes();
|
|
715
716
|
const m = u + this.snapToTime / 2;
|
|
716
717
|
u = m - m % this.snapToTime, s.setHours(0, u, 0, 0);
|
|
@@ -745,7 +746,7 @@ A valid view must be one of: ${ee.join(", ")}.`), e = "week"), this.enabledViews
|
|
|
745
746
|
let s = null;
|
|
746
747
|
typeof t.end == "string" && t.end.includes("24:00") ? (s = new Date(t.end.replace(" 24:00", "")), s.setHours(23, 59, 59, 0)) : s = typeof t.end == "string" ? e.stringToDate(t.end) : t.end;
|
|
747
748
|
let o = e.formatDateLite(s), a = e.dateToMinutes(s);
|
|
748
|
-
a && a !==
|
|
749
|
+
a && a !== z || (!this.time || typeof t.end == "string" && t.end.length === 10 ? s.setHours(23, 59, 59, 0) : s.setSeconds(s.getSeconds() - 1), o = e.formatDateLite(s), a = z);
|
|
749
750
|
const d = n !== o;
|
|
750
751
|
t = Object.assign({ ...this.utils.event.eventDefaults }, t, { _eid: `${this._.uid}_${this.eventIdIncrement++}`, segments: d ? {} : null, start: i, startTimeMinutes: l, end: s, endTimeMinutes: a, daysCount: d ? e.countDays(i, s) : 1, class: t.class }), this.mutableEvents.push(t);
|
|
751
752
|
});
|
|
@@ -781,7 +782,7 @@ A valid view must be one of: ${ee.join(", ")}.`), e = "week"), this.enabledViews
|
|
|
781
782
|
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);
|
|
782
783
|
}
|
|
783
784
|
}, cellOrSplitHasEvents: (e, t = null) => e.length && (!t && e.length || t && e.some((i) => i.split === t.id)) }, created() {
|
|
784
|
-
this.utils.cell = new
|
|
785
|
+
this.utils.cell = new he(this), this.utils.event = new ce(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())));
|
|
785
786
|
}, mounted() {
|
|
786
787
|
const e = this.utils.date, t = "ontouchstart" in window, { resize: i, drag: n, create: l, delete: s, title: o } = this.editEvents, a = this.onEventClick && typeof this.onEventClick == "function";
|
|
787
788
|
(i || n || l || s || o || a) && window.addEventListener(t ? "touchend" : "mouseup", this.onMouseUp), (i || n || l && this.dragToCreateEvent) && window.addEventListener(t ? "touchmove" : "mousemove", this.onMouseMove, { passive: !1 }), o && window.addEventListener("keyup", this.onKeyUp), t && (this.$refs.vuecal.oncontextmenu = function(u) {
|
|
@@ -957,10 +958,10 @@ A valid view must be one of: ${ee.join(", ")}.`), e = "week"), this.enabledViews
|
|
|
957
958
|
this.updateSelectedDate(e);
|
|
958
959
|
}, activeView(e) {
|
|
959
960
|
this.switchView(e);
|
|
960
|
-
} } },
|
|
961
|
+
} } }, Dt = B(pt, [["render", function(e, t, i, n, l, s) {
|
|
961
962
|
const o = j("vuecal-header"), a = j("all-day-bar"), d = j("weekdays-headings"), r = j("vuecal-cell");
|
|
962
|
-
return h(), c("div", { class: b(["vuecal__flex vuecal", s.cssClasses]), column: "", ref: "vuecal", lang: i.locale }, [
|
|
963
|
+
return h(), c("div", { class: b(["vuecal__flex vuecal", s.cssClasses]), column: "", ref: "vuecal", lang: i.locale }, [U(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 }, X({ "arrow-prev": g(() => [w(e.$slots, "arrow-prev", {}, () => [M("\xA0"), Be, M("\xA0")])]), "arrow-next": g(() => [w(e.$slots, "arrow-next", {}, () => [M("\xA0"), Ne, M("\xA0")])]), "today-button": g(() => [w(e.$slots, "today-button", {}, () => [k("span", Ie, f(l.texts.today), 1)])]), title: g(() => [w(e.$slots, "title", { title: s.viewTitle, view: l.view }, () => [M(f(s.viewTitle), 1)])]), _: 2 }, [e.$slots["weekday-heading"] ? { name: "weekday-heading", fn: g(({ heading: u, view: m }) => [w(e.$slots, "weekday-heading", { heading: u, view: m })]), key: "0" } : void 0, e.$slots["split-label"] ? { name: "split-label", fn: g(({ split: u }) => [w(e.$slots, "split-label", { split: u, view: l.view.id })]), key: "1" } : void 0]), 1032, ["options", "edit-events", "view-props", "week-days", "has-splits", "day-splits", "switch-to-narrower-view"]), i.hideBody ? v("", !0) : (h(), c("div", ze, [U(R, { 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(), H(a, J(Q({ key: 0 }, s.allDayBar)), { event: g(({ event: u, view: m }) => [w(e.$slots, "event", { view: m, event: u }, () => [s.editEvents.title && u.titleEditable ? (h(), c("div", { key: 0, class: "vuecal__event-title vuecal__event-title--edit", contenteditable: "", onBlur: (p) => s.onEventTitleBlur(p, u), innerHTML: u.title }, null, 40, Pe)) : u.title ? (h(), c("div", { key: 1, class: "vuecal__event-title", innerHTML: u.title }, null, 8, Ue)) : v("", !0), !u.content || s.hasShortEvents || s.isShortMonthView ? v("", !0) : (h(), c("div", { key: 2, class: "vuecal__event-content", innerHTML: u.content }, null, 8, Re))])]), _: 3 }, 16)) : v("", !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: $({ height: s.allDayBar.height }) }, [k("span", null, f(l.texts.allDay), 1)], 4)) : v("", !0), (h(!0), c(T, null, S(s.timeCells, (u, m) => (h(), c("div", { class: "vuecal__time-cell", key: m, style: $(`height: ${i.timeCellHeight}px`) }, [w(e.$slots, "time-cell", { hours: u.hours, minutes: u.minutes }, () => [Xe, k("span", Ge, f(u.label), 1)])], 4))), 128))])) : v("", !0), i.showWeekNumbers && s.isMonthView ? (h(), c("div", Ze, [(h(), c(T, null, S(6, (u) => k("div", { class: "vuecal__flex vuecal__week-number-cell", key: u, grow: "" }, [w(e.$slots, "week-number-cell", { week: s.getWeekNumber(u - 1) }, () => [M(f(s.getWeekNumber(u - 1)), 1)])])), 64))])) : v("", !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(), H(d, { key: 0, "transition-direction": l.transitionDirection, "week-days": s.weekDays, "switch-to-narrower-view": s.switchToNarrowerView, style: $(s.cellOrSplitMinWidth ? `min-width: ${s.cellOrSplitMinWidth}px` : "") }, X({ _: 2 }, [e.$slots["weekday-heading"] ? { name: "weekday-heading", fn: g(({ heading: u, view: m }) => [w(e.$slots, "weekday-heading", { heading: u, view: m })]), key: "0" } : void 0, e.$slots["split-label"] ? { name: "split-label", fn: g(({ split: u }) => [w(e.$slots, "split-label", { split: u, view: l.view.id })]), key: "1" } : 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: $(s.cellOrSplitMinWidth ? `min-width: ${s.cellOrSplitMinWidth}px` : "") }, [(h(!0), c(T, null, S(s.daySplits, (u, m) => (h(), c("div", { class: b(["day-split-header", u.class || !1]), key: m }, [w(e.$slots, "split-label", { split: u, view: l.view.id }, () => [M(f(u.label), 1)])], 2))), 128))], 4)) : v("", !0), i.showAllDayEvents && s.hasTimeColumn && (s.isWeekView && s.cellOrSplitMinWidth || s.isDayView && s.hasSplits && i.minSplitWidth) ? (h(), H(a, J(Q({ key: 2 }, s.allDayBar)), { event: g(({ event: u, view: m }) => [w(e.$slots, "event", { view: m, event: u }, () => [s.editEvents.title && u.titleEditable ? (h(), c("div", { key: 0, class: "vuecal__event-title vuecal__event-title--edit", contenteditable: "", onBlur: (p) => s.onEventTitleBlur(p, u), innerHTML: u.title }, null, 40, Qe)) : u.title ? (h(), c("div", { key: 1, class: "vuecal__event-title", innerHTML: u.title }, null, 8, et)) : v("", !0), !u.content || s.hasShortEvents || s.isShortMonthView ? v("", !0) : (h(), c("div", { key: 2, class: "vuecal__event-content", innerHTML: u.content }, null, 8, tt))])]), _: 3 }, 16)) : v("", !0), k("div", { class: "vuecal__flex", ref: (u) => l.cellsEl = u, grow: "", wrap: !s.cellOrSplitMinWidth || !s.isWeekView, style: $(s.cellOrSplitMinWidth ? `min-width: ${s.cellOrSplitMinWidth}px` : "") }, [(h(!0), c(T, null, S(s.viewCells, (u, m) => (h(), H(r, { key: m, 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: p, split: E, selectCell: _ }) => [w(e.$slots, "cell-content", { cell: u, view: l.view, goNarrower: _, events: p }, () => [E && !i.stickySplitLabels ? (h(), c("div", { key: 0, class: "split-label", innerHTML: E.label }, null, 8, st)) : v("", !0), u.content ? (h(), c("div", { key: 1, class: "vuecal__cell-date", innerHTML: u.content }, null, 8, nt)) : v("", !0), (s.isMonthView && !i.eventsOnMonthView || s.isYearsOrYearView && i.eventsCountOnYearView) && p.length ? (h(), c("div", at, [w(e.$slots, "events-count", { view: l.view, events: p }, () => [M(f(p.length), 1)])])) : v("", !0), !s.cellOrSplitHasEvents(p, E) && s.isWeekOrDayView ? (h(), c("div", lt, [w(e.$slots, "no-event", {}, () => [M(f(l.texts.noEvent), 1)])])) : v("", !0)])]), event: g(({ event: p, view: E }) => [w(e.$slots, "event", { view: E, event: p }, () => [s.editEvents.title && p.titleEditable ? (h(), c("div", { key: 0, class: "vuecal__event-title vuecal__event-title--edit", contenteditable: "", onBlur: (_) => s.onEventTitleBlur(_, p), innerHTML: p.title }, null, 40, ot)) : p.title ? (h(), c("div", { key: 1, class: "vuecal__event-title", innerHTML: p.title }, null, 8, rt)) : v("", !0), !i.time || p.allDay || s.isMonthView && (p.allDay || i.showAllDayEvents === "short") || s.isShortMonthView ? v("", !0) : (h(), c("div", dt, [M(f(l.utils.date.formatTime(p.start, s.TimeFormat)), 1), p.endTimeMinutes ? (h(), c("span", ut, "\xA0- " + f(l.utils.date.formatTime(p.end, s.TimeFormat, null, !0)), 1)) : v("", !0), p.daysCount > 1 && (p.segments[u.formattedDate] || {}).isFirstDay ? (h(), c("small", ht, "\xA0+" + f(p.daysCount - 1) + f((l.texts.day[0] || "").toLowerCase()), 1)) : v("", !0)])), !p.content || s.isMonthView && p.allDay && i.showAllDayEvents === "short" || s.isShortMonthView ? v("", !0) : (h(), c("div", { key: 3, class: "vuecal__event-content", innerHTML: p.content }, null, 8, ct))])]), "no-event": g(() => [w(e.$slots, "no-event", {}, () => [M(f(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 ? v("", !0) : (h(), c("div", vt, mt))]))], 10, Fe);
|
|
963
964
|
}]]);
|
|
964
965
|
export {
|
|
965
|
-
|
|
966
|
+
Dt as default
|
|
966
967
|
};
|