vue-cal 5.0.1-rc.0 → 5.0.1-rc.10
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 +3 -3
- package/dist/vue-cal.css +1 -1
- package/dist/vue-cal.es.js +1369 -1342
- package/dist/vue-cal.umd.js +4 -4
- package/package.json +17 -11
package/dist/vue-cal.es.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { computed as
|
|
1
|
+
import { computed as T, reactive as $e, watch as me, toRefs as rt, ref as ie, onBeforeUnmount as Xe, inject as Ne, createElementBlock as j, openBlock as E, renderSlot as F, createCommentVNode as Z, unref as O, Fragment as te, renderList as we, normalizeClass as _e, createElementVNode as ge, createVNode as Oe, Transition as Ge, withCtx as J, createBlock as Se, resolveDynamicComponent as Ke, mergeProps as De, toHandlers as Ie, normalizeProps as ne, guardReactiveProps as se, toDisplayString as le, onMounted as Ze, withModifiers as Qe, nextTick as Ue, normalizeStyle as Te, createTextVNode as xe, TransitionGroup as et, createSlots as je, useTemplateRef as ot, useId as it, useAttrs as ut, provide as ct } from "vue";
|
|
2
|
+
import nt from "./i18n/en-us.json";
|
|
2
3
|
/**
|
|
3
|
-
* vue-cal v5.0.
|
|
4
|
+
* vue-cal v5.0.1-rc.10
|
|
4
5
|
* (c) 2024-2025 Antoni Andre <antoniandre.web@gmail.com>
|
|
5
6
|
* @license MIT
|
|
6
7
|
*/
|
|
7
|
-
const
|
|
8
|
+
const fe = {
|
|
8
9
|
texts: {
|
|
9
10
|
weekDays: Array(7).fill(""),
|
|
10
11
|
weekDaysShort: [],
|
|
@@ -33,339 +34,359 @@ const ce = {
|
|
|
33
34
|
years: { cols: 5, rows: 5 }
|
|
34
35
|
// Arbitrary range of quarters of century (25y).
|
|
35
36
|
}
|
|
36
|
-
},
|
|
37
|
-
const { dateUtils:
|
|
38
|
-
if (
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}), L = M(() => n.sm && !n.xs), h = M(() => n.xs || n.datePicker), O = M(() => n.clickToNavigate || n.datePicker && n.clickToNavigate !== !1), o = M(() => {
|
|
46
|
-
const v = {
|
|
37
|
+
}, dt = ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"], Re = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"], vt = Re.reduce((D, n, r) => (D[n] = r || 7, D), {}), mt = (D, n, r) => {
|
|
38
|
+
const { dateUtils: h } = D, p = !1, b = T(() => {
|
|
39
|
+
if (W.value[n.view]) return n.view;
|
|
40
|
+
const s = n.datePicker ? "month" : "week", l = n.view || s;
|
|
41
|
+
return W.value[l] ? l : (console.warn(
|
|
42
|
+
`Vue Cal: the provided or default view \`${l}\` is either invalid or not in the list of available views. The first available view will be chosen: \`${Object.keys(W.value)[0]}\`.`
|
|
43
|
+
), Object.keys(W.value)[0]);
|
|
44
|
+
}), L = T(() => n.sm && !n.xs), v = T(() => n.xs || n.datePicker), C = T(() => n.clickToNavigate || n.datePicker && n.clickToNavigate !== !1), i = T(() => {
|
|
45
|
+
const s = {
|
|
47
46
|
cell: {},
|
|
48
47
|
// All possible event listeners to attach to cells.
|
|
49
48
|
event: {}
|
|
50
49
|
// All possible event listeners to attach to calendar events.
|
|
51
|
-
},
|
|
52
|
-
|
|
53
|
-
const [
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
50
|
+
}, l = (_) => _.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
|
51
|
+
for (const [_, t] of Object.entries(r)) {
|
|
52
|
+
const [V, H, U] = _.match(/^on(Cell|Event)(.+)$/) || [];
|
|
53
|
+
V && (s[H.toLowerCase()][l(U).replace(/^-+|-+$/g, "")] = t);
|
|
54
|
+
}
|
|
55
|
+
return s;
|
|
56
|
+
}), m = T(() => {
|
|
57
|
+
var l;
|
|
58
|
+
const s = {};
|
|
59
|
+
return n.hideWeekends && (s[6] = !0) && (s[7] = !0), (l = n.hideWeekdays) != null && l.length && n.hideWeekdays.forEach((_) => s[vt[_]] = !0), s;
|
|
60
|
+
}), $ = T(() => n.hideWeekends || m.value[6] && m.value[7]), W = T(() => {
|
|
61
|
+
const s = n.datePicker;
|
|
62
|
+
let l = 0, _ = {};
|
|
63
|
+
const t = n.views;
|
|
64
|
+
return s && !t ? {
|
|
65
|
+
month: { ...fe.availableViews.month },
|
|
66
|
+
year: { ...fe.availableViews.year },
|
|
67
|
+
years: { ...fe.availableViews.years }
|
|
68
|
+
} : (t ? (Array.isArray(t) ? _ = t.reduce((V, H) => (typeof H == "string" && fe.availableViews[H] ? V[H] = fe.availableViews[H] : l++, V), {}) : typeof t == "object" && (_ = Object.entries(t).reduce((V, [H, U]) => {
|
|
69
|
+
const { cols: K, rows: ue } = fe.availableViews[H];
|
|
70
|
+
return V[H] = { cols: U.cols || K, rows: U.rows || ue }, V;
|
|
71
|
+
}, {})), l && console.warn("Vue Cal: the provided `views` prop contains invalid views that will be ignored."), Object.keys(_).length || (console.warn("Vue Cal: No valid view in the provided `views` prop. Falling back to default views."), _ = { ...fe.availableViews })) : _ = { ...fe.availableViews }, _);
|
|
72
|
+
}), G = T(() => n.datePicker ? "month" : W.value.week ? "week" : Object.keys(W.value)[0]), o = T(() => {
|
|
73
|
+
if (typeof n.selectedDate == "string") return h.stringToDate(n.selectedDate);
|
|
74
74
|
if (n.selectedDate instanceof Date) return n.selectedDate;
|
|
75
75
|
n.selectedDate ? console.warn("Vue Cal: The provided selected date is invalid:", n.selectedDate) : console.log("Vue Cal: Info - The provided selected date is undefined.");
|
|
76
|
-
}),
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
return
|
|
86
|
-
}),
|
|
87
|
-
|
|
76
|
+
}), u = T(() => {
|
|
77
|
+
if (!n.disableDays) return [];
|
|
78
|
+
const s = [];
|
|
79
|
+
if (Array.isArray(n.disableDays))
|
|
80
|
+
for (let l of n.disableDays) {
|
|
81
|
+
let _ = l;
|
|
82
|
+
typeof l == "string" ? _ = h.stringToDate(l) : l instanceof Date && (l = h.formatDate(l, "YYYY-MM-DD")), _ instanceof Date && !isNaN(_.getTime()) ? s.push(l) : console.warn("Vue Cal: The provided `disableDays` prop contains an invalid date:", l);
|
|
83
|
+
}
|
|
84
|
+
else console.warn("Vue Cal: The provided `disableDays` prop is invalid:", n.disableDays);
|
|
85
|
+
return s;
|
|
86
|
+
}), e = T(() => {
|
|
87
|
+
let s = null;
|
|
88
|
+
return n.minDate && typeof n.minDate == "string" ? s = h.stringToDate(n.minDate) : n.minDate && n.minDate instanceof Date && (s = n.minDate), (s == null ? void 0 : s.getTime()) || null;
|
|
89
|
+
}), d = T(() => {
|
|
90
|
+
let s = null;
|
|
91
|
+
return n.maxDate && typeof n.maxDate == "string" ? s = h.stringToDate(n.maxDate) : n.maxDate && n.maxDate instanceof Date && (s = n.maxDate), (s == null ? void 0 : s.getTime()) || null;
|
|
92
|
+
}), f = T(() => {
|
|
93
|
+
var _;
|
|
94
|
+
const { view: s } = D;
|
|
95
|
+
return n.schedules.length && (s.isDay || s.isDays || s.isWeek) && ((_ = n.schedules) == null ? void 0 : _.map((t, V) => ({ ...t, id: t.id ?? V + 1 }))) || void 0;
|
|
96
|
+
}), M = T(() => {
|
|
97
|
+
const s = {
|
|
88
98
|
drag: !0,
|
|
89
99
|
resize: !0,
|
|
90
100
|
delete: !0,
|
|
91
101
|
create: !0
|
|
92
102
|
};
|
|
93
|
-
return n.editableEvents === !0 ?
|
|
94
|
-
}),
|
|
95
|
-
var
|
|
96
|
-
let
|
|
103
|
+
return n.editableEvents === !0 ? s : n.editableEvents === !1 ? Object.keys(s).map((l) => s[l] = !1) : { ...s, ...n.editableEvents };
|
|
104
|
+
}), P = async (s) => {
|
|
105
|
+
var _;
|
|
106
|
+
let l = /* @__PURE__ */ Object.assign({ "../i18n/ar.json": () => import("./i18n/ar.json").then((t) => t.default), "../i18n/bg.json": () => import("./i18n/bg.json").then((t) => t.default), "../i18n/bn.json": () => import("./i18n/bn.json").then((t) => t.default), "../i18n/bs.json": () => import("./i18n/bs.json").then((t) => t.default), "../i18n/ca.json": () => import("./i18n/ca.json").then((t) => t.default), "../i18n/cs.json": () => import("./i18n/cs.json").then((t) => t.default), "../i18n/da.json": () => import("./i18n/da.json").then((t) => t.default), "../i18n/de.json": () => import("./i18n/de.json").then((t) => t.default), "../i18n/el.json": () => import("./i18n/el.json").then((t) => t.default), "../i18n/en-gb.json": () => import("./i18n/en-gb.json").then((t) => t.default), "../i18n/en-us.json": () => import("./i18n/en-us.json").then((t) => t.default), "../i18n/es.json": () => import("./i18n/es.json").then((t) => t.default), "../i18n/et.json": () => import("./i18n/et.json").then((t) => t.default), "../i18n/fa.json": () => import("./i18n/fa.json").then((t) => t.default), "../i18n/fi.json": () => import("./i18n/fi.json").then((t) => t.default), "../i18n/fr.json": () => import("./i18n/fr.json").then((t) => t.default), "../i18n/he.json": () => import("./i18n/he.json").then((t) => t.default), "../i18n/hr.json": () => import("./i18n/hr.json").then((t) => t.default), "../i18n/hu.json": () => import("./i18n/hu.json").then((t) => t.default), "../i18n/id.json": () => import("./i18n/id.json").then((t) => t.default), "../i18n/is.json": () => import("./i18n/is.json").then((t) => t.default), "../i18n/it.json": () => import("./i18n/it.json").then((t) => t.default), "../i18n/ja.json": () => import("./i18n/ja.json").then((t) => t.default), "../i18n/ka.json": () => import("./i18n/ka.json").then((t) => t.default), "../i18n/ko.json": () => import("./i18n/ko.json").then((t) => t.default), "../i18n/lt.json": () => import("./i18n/lt.json").then((t) => t.default), "../i18n/mn.json": () => import("./i18n/mn.json").then((t) => t.default), "../i18n/nl.json": () => import("./i18n/nl.json").then((t) => t.default), "../i18n/no.json": () => import("./i18n/no.json").then((t) => t.default), "../i18n/pl.json": () => import("./i18n/pl.json").then((t) => t.default), "../i18n/pt-br.json": () => import("./i18n/pt-br.json").then((t) => t.default), "../i18n/pt-pt.json": () => import("./i18n/pt-pt.json").then((t) => t.default), "../i18n/ro.json": () => import("./i18n/ro.json").then((t) => t.default), "../i18n/ru.json": () => import("./i18n/ru.json").then((t) => t.default), "../i18n/sk.json": () => import("./i18n/sk.json").then((t) => t.default), "../i18n/sl.json": () => import("./i18n/sl.json").then((t) => t.default), "../i18n/sq.json": () => import("./i18n/sq.json").then((t) => t.default), "../i18n/sr.json": () => import("./i18n/sr.json").then((t) => t.default), "../i18n/sv.json": () => import("./i18n/sv.json").then((t) => t.default), "../i18n/tr.json": () => import("./i18n/tr.json").then((t) => t.default), "../i18n/uk.json": () => import("./i18n/uk.json").then((t) => t.default), "../i18n/vi.json": () => import("./i18n/vi.json").then((t) => t.default), "../i18n/zh-cn.json": () => import("./i18n/zh-cn.json").then((t) => t.default), "../i18n/zh-hk.json": () => import("./i18n/zh-hk.json").then((t) => t.default) });
|
|
97
107
|
{
|
|
98
|
-
if (!
|
|
99
|
-
console.warn(`Vue Cal: the locale \`${
|
|
108
|
+
if (!l[`../i18n/${s}.json`]) {
|
|
109
|
+
console.warn(`Vue Cal: the locale \`${s}\` does not exist. Falling back to \`en-us\`.`), s = "en-us";
|
|
100
110
|
return;
|
|
101
111
|
}
|
|
102
|
-
|
|
112
|
+
l = await ((_ = l[`../i18n/${s}.json`]) == null ? void 0 : _.call(l));
|
|
103
113
|
}
|
|
104
|
-
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
events: z,
|
|
114
|
+
D.texts = Object.assign(D.texts, Object.assign({ ...fe.texts }, l)), h.updateTexts(D.texts);
|
|
115
|
+
}, B = $e(n.events || []);
|
|
116
|
+
return me(() => n.events, (s) => B.splice(0, B.length, ...s)), me(() => n.locale, (s) => P(s || "en-us")), (n.locale || !D.texts.today) && P(n.locale || "en-us"), {
|
|
117
|
+
...rt(n),
|
|
118
|
+
events: B,
|
|
110
119
|
// All the events listeners for cells and events that the end user may have attached to vue-cal.
|
|
111
|
-
eventListeners:
|
|
112
|
-
defaultView:
|
|
113
|
-
availableViews:
|
|
114
|
-
|
|
120
|
+
eventListeners: i,
|
|
121
|
+
defaultView: G,
|
|
122
|
+
availableViews: W,
|
|
123
|
+
disableDays: u,
|
|
124
|
+
ready: p,
|
|
115
125
|
sm: L,
|
|
116
|
-
xs:
|
|
117
|
-
clickToNavigate:
|
|
118
|
-
hideWeekdays:
|
|
119
|
-
hideWeekends:
|
|
120
|
-
minTimestamp:
|
|
121
|
-
maxTimestamp:
|
|
122
|
-
schedules:
|
|
123
|
-
selectedDate:
|
|
124
|
-
editableEvents:
|
|
125
|
-
view:
|
|
126
|
+
xs: v,
|
|
127
|
+
clickToNavigate: C,
|
|
128
|
+
hideWeekdays: m,
|
|
129
|
+
hideWeekends: $,
|
|
130
|
+
minTimestamp: e,
|
|
131
|
+
maxTimestamp: d,
|
|
132
|
+
schedules: f,
|
|
133
|
+
selectedDate: o,
|
|
134
|
+
editableEvents: M,
|
|
135
|
+
view: b,
|
|
126
136
|
// Getters.
|
|
127
137
|
get hasHiddenDays() {
|
|
128
|
-
return Object.keys(
|
|
138
|
+
return Object.keys(m.value).length;
|
|
129
139
|
},
|
|
130
140
|
get size() {
|
|
131
|
-
return
|
|
141
|
+
return v.value ? "xs" : L.value ? "sm" : "lg";
|
|
132
142
|
},
|
|
133
|
-
loadTexts:
|
|
143
|
+
loadTexts: P
|
|
134
144
|
};
|
|
135
|
-
},
|
|
136
|
-
const
|
|
137
|
-
return (
|
|
138
|
-
},
|
|
139
|
-
const
|
|
140
|
-
return ~~(
|
|
141
|
-
},
|
|
142
|
-
const
|
|
143
|
-
return
|
|
144
|
-
},
|
|
145
|
-
let
|
|
146
|
-
const
|
|
145
|
+
}, Ve = (D, n) => {
|
|
146
|
+
const r = n.timeTo - n.timeFrom;
|
|
147
|
+
return (D - n.timeFrom) * 100 / r;
|
|
148
|
+
}, Pe = (D, n) => {
|
|
149
|
+
const r = n.timeTo - n.timeFrom;
|
|
150
|
+
return ~~(D * r / 100 + n.timeFrom);
|
|
151
|
+
}, Je = (D, n) => {
|
|
152
|
+
const r = n.clientHeight;
|
|
153
|
+
return D * 100 / r;
|
|
154
|
+
}, Ae = $e({ id: null, date: null });
|
|
155
|
+
let tt = !1, qe = !0;
|
|
156
|
+
const pe = $e({ el: null, cell: null, timeout: null }), be = $e({
|
|
147
157
|
eventId: null,
|
|
148
158
|
fromVueCal: null,
|
|
149
159
|
toVueCal: null
|
|
150
160
|
});
|
|
151
|
-
function
|
|
152
|
-
const { config: n, view:
|
|
153
|
-
var
|
|
154
|
-
const { timeStep:
|
|
155
|
-
return
|
|
156
|
-
},
|
|
157
|
-
const
|
|
158
|
-
let
|
|
161
|
+
function ft(D) {
|
|
162
|
+
const { config: n, view: r, eventsManager: h, emit: p, uid: b, dateUtils: L } = D, v = (e) => {
|
|
163
|
+
var l;
|
|
164
|
+
const { timeStep: d, timeCellHeight: f, timeFrom: M } = n, P = (((l = e.touches) == null ? void 0 : l[0]) || e).clientY, { top: B } = e.currentTarget.getBoundingClientRect(), s = P - B - ~~e.dataTransfer.getData("cursor-grab-at");
|
|
165
|
+
return Pe(Je(s, e.currentTarget), n);
|
|
166
|
+
}, C = (e, d, f) => {
|
|
167
|
+
const M = d.duration || i(d.start, d.end) || n.timeStep;
|
|
168
|
+
let P = Math.max(v(e), 0);
|
|
159
169
|
if (n.snapToInterval) {
|
|
160
|
-
const
|
|
161
|
-
|
|
170
|
+
const _ = P + n.snapToInterval / 2;
|
|
171
|
+
P = _ - _ % n.snapToInterval;
|
|
162
172
|
}
|
|
163
|
-
const
|
|
164
|
-
return { start:
|
|
165
|
-
},
|
|
173
|
+
const B = new Date(new Date(f).setMinutes(P)), s = Math.min(P + M, 24 * 60), l = new Date(new Date(f).setMinutes(s));
|
|
174
|
+
return { start: B, end: l };
|
|
175
|
+
}, i = (e, d) => Math.round((d - e) / 6e4);
|
|
166
176
|
return {
|
|
167
|
-
eventDragStart: (e,
|
|
168
|
-
if (
|
|
169
|
-
e.dataTransfer.dropEffect = "move";
|
|
170
|
-
const
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
}
|
|
177
|
+
eventDragStart: (e, d) => {
|
|
178
|
+
if (e.target.nodeType === 3 || D.touch.isResizingEvent) return e.preventDefault();
|
|
179
|
+
e.dataTransfer.effectAllowed = "move", e.dataTransfer.dropEffect = "move";
|
|
180
|
+
const f = { ...d, _: { id: d._.id, duration: i(d.start, d.end) } };
|
|
181
|
+
try {
|
|
182
|
+
e.dataTransfer.setData("text/plain", ""), e.dataTransfer.setData("event", JSON.stringify(f)), e.dataTransfer.setData("cursor-grab-at", e.offsetY);
|
|
183
|
+
} catch (P) {
|
|
184
|
+
return console.warn("Vue Cal: Failed to set drag data:", P), e.preventDefault();
|
|
185
|
+
}
|
|
186
|
+
be.eventId = d._.id, be.fromVueCal = b;
|
|
187
|
+
const M = e.target.closest(".vuecal__event");
|
|
188
|
+
M.classList.add("vuecal__event--dragging-ghost"), setTimeout(() => {
|
|
189
|
+
M.classList.add("vuecal__event--dragging-original"), M.classList.remove("vuecal__event--dragging-ghost");
|
|
190
|
+
}, 0), tt = !1, Object.assign(Ae, { id: r.id, date: r.firstCellDate }), qe = !0, D.touch.isDraggingEvent = !0;
|
|
176
191
|
},
|
|
177
|
-
eventDragEnd: (e,
|
|
178
|
-
|
|
179
|
-
const { fromVueCal:
|
|
180
|
-
|
|
192
|
+
eventDragEnd: (e, d) => {
|
|
193
|
+
be.eventId = null, e.target.closest(".vuecal__event").classList.remove("vuecal__event--dragging-original");
|
|
194
|
+
const { fromVueCal: f, toVueCal: M } = be;
|
|
195
|
+
M && f !== M && h.deleteEvent(d._.id, 3), be.fromVueCal = null, be.toVueCal = null, tt && qe && Ae.id && r.switchView(Ae.id, Ae.date, !0), D.touch.isDraggingEvent = !1;
|
|
181
196
|
},
|
|
182
|
-
cellDragEnter: (e,
|
|
183
|
-
const { start:
|
|
184
|
-
console.log("cellDragEnter");
|
|
185
|
-
const Y = e.currentTarget;
|
|
197
|
+
cellDragEnter: (e, d) => {
|
|
198
|
+
const { start: f } = d, M = e.currentTarget;
|
|
186
199
|
if (!e.currentTarget.contains(e.relatedTarget)) {
|
|
187
|
-
if (
|
|
188
|
-
|
|
200
|
+
if (M === pe.el || !M.className.includes("vuecal__cell-content")) return !1;
|
|
201
|
+
pe.el && (pe.cell.highlighted = !1), Object.assign(pe, { el: M, cell: d, timeout: clearTimeout(pe.timeout) }), d.highlighted = !0, ["years", "year", "month"].includes(r.id) && (pe.timeout = setTimeout(() => D.switchToNarrowerView(f), 2e3));
|
|
189
202
|
}
|
|
190
203
|
},
|
|
191
|
-
cellDragOver: (e,
|
|
192
|
-
const { start:
|
|
193
|
-
|
|
204
|
+
cellDragOver: (e, d) => {
|
|
205
|
+
const { start: f, schedule: M } = d;
|
|
206
|
+
e.preventDefault(), d.highlighted = !0, (M || M === 0) && (d.highlightedSchedule = M);
|
|
194
207
|
},
|
|
195
|
-
cellDragLeave: (e,
|
|
196
|
-
|
|
208
|
+
cellDragLeave: (e, d) => {
|
|
209
|
+
e.preventDefault(), !e.currentTarget.contains(e.relatedTarget) && (d.highlightedSchedule = !1, pe.cell === d && (clearTimeout(pe.timeout), Object.assign(pe, { el: null, cell: null, timeout: null }), d.highlighted = !1));
|
|
197
210
|
},
|
|
198
|
-
cellDragDrop: async (e,
|
|
199
|
-
var
|
|
200
|
-
e.preventDefault(), clearTimeout(
|
|
201
|
-
const
|
|
202
|
-
|
|
203
|
-
let
|
|
204
|
-
const { start:
|
|
205
|
-
let
|
|
211
|
+
cellDragDrop: async (e, d) => {
|
|
212
|
+
var V, H, U;
|
|
213
|
+
e.preventDefault(), clearTimeout(pe.timeout), Object.assign(pe, { el: null, cell: null, timeout: null });
|
|
214
|
+
const f = JSON.parse(e.dataTransfer.getData("event") || "{}");
|
|
215
|
+
f.start && (f.start = new Date(f.start)), f.end && (f.end = new Date(f.end));
|
|
216
|
+
let M;
|
|
217
|
+
const { start: P, end: B } = C(e, f, d.start), { schedule: s } = ((V = e.target.closest("[data-schedule]")) == null ? void 0 : V.dataset) || {};
|
|
218
|
+
let l = () => {
|
|
206
219
|
};
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
})) : (
|
|
210
|
-
...
|
|
211
|
-
start:
|
|
212
|
-
end:
|
|
213
|
-
...
|
|
214
|
-
_: { id: ((
|
|
215
|
-
getOverlappingEvents: () =>
|
|
216
|
-
|
|
217
|
-
{ start:
|
|
218
|
-
{ schedule: ~~
|
|
220
|
+
be.fromVueCal === b ? (M = h.getEvent(f._.id), M && (M._.dragging = !1, l = () => {
|
|
221
|
+
M.start = P, M.end = B, s !== void 0 && (M.schedule = ~~s);
|
|
222
|
+
})) : (M = {
|
|
223
|
+
...f,
|
|
224
|
+
start: P,
|
|
225
|
+
end: B,
|
|
226
|
+
...s !== void 0 && { schedule: ~~s },
|
|
227
|
+
_: { id: ((H = f._) == null ? void 0 : H.id) || f.id, duration: i(P, B) },
|
|
228
|
+
getOverlappingEvents: () => h.getEventsInRange(
|
|
229
|
+
h.getEventsByDate(L.formatDate(P), !0),
|
|
230
|
+
{ start: P, end: B },
|
|
231
|
+
{ schedule: ~~s }
|
|
219
232
|
)
|
|
220
|
-
},
|
|
221
|
-
|
|
233
|
+
}, l = () => {
|
|
234
|
+
M = h.createEvent(M);
|
|
222
235
|
});
|
|
223
|
-
let
|
|
224
|
-
const { drop:
|
|
225
|
-
|
|
236
|
+
let _ = !0;
|
|
237
|
+
const { drop: t } = (U = n.eventListeners) == null ? void 0 : U.event;
|
|
238
|
+
t && (_ = await t({
|
|
239
|
+
e,
|
|
240
|
+
event: { ...M, start: P, end: B, schedule: ~~s },
|
|
241
|
+
overlaps: M.getOverlappingEvents({ start: P, end: B, schedule: ~~s }),
|
|
242
|
+
cell: d,
|
|
243
|
+
external: be.fromVueCal !== b
|
|
244
|
+
})), _ !== !1 && l(), d.highlighted = !1, d.highlightedSchedule = null, qe = !1, be.toVueCal = b, p("event-dropped", {
|
|
226
245
|
e,
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
external:
|
|
231
|
-
})
|
|
246
|
+
cell: d,
|
|
247
|
+
event: M,
|
|
248
|
+
originalEvent: f,
|
|
249
|
+
external: be.fromVueCal !== b
|
|
250
|
+
});
|
|
232
251
|
}
|
|
233
252
|
};
|
|
234
253
|
}
|
|
235
|
-
const
|
|
236
|
-
let
|
|
237
|
-
const
|
|
238
|
-
Date.prototype.addDays = function(
|
|
239
|
-
return
|
|
240
|
-
}, Date.prototype.subtractDays = function(
|
|
241
|
-
return
|
|
242
|
-
}, Date.prototype.addHours = function(
|
|
243
|
-
return
|
|
244
|
-
}, Date.prototype.subtractHours = function(
|
|
245
|
-
return
|
|
246
|
-
}, Date.prototype.addMinutes = function(
|
|
247
|
-
return
|
|
248
|
-
}, Date.prototype.subtractMinutes = function(
|
|
249
|
-
return
|
|
254
|
+
const st = (D, n) => {
|
|
255
|
+
let r, h, p, b = {}, L = {};
|
|
256
|
+
const v = ie(D), C = () => {
|
|
257
|
+
v.value.today || (v.value = n), Date.prototype.addDays = function(a) {
|
|
258
|
+
return W(this, a || 0);
|
|
259
|
+
}, Date.prototype.subtractDays = function(a) {
|
|
260
|
+
return G(this, a || 0);
|
|
261
|
+
}, Date.prototype.addHours = function(a) {
|
|
262
|
+
return o(this, a || 0);
|
|
263
|
+
}, Date.prototype.subtractHours = function(a) {
|
|
264
|
+
return u(this, a || 0);
|
|
265
|
+
}, Date.prototype.addMinutes = function(a) {
|
|
266
|
+
return e(this, a || 0);
|
|
267
|
+
}, Date.prototype.subtractMinutes = function(a) {
|
|
268
|
+
return d(this, a || 0);
|
|
250
269
|
}, Date.prototype.getWeek = function() {
|
|
251
|
-
return
|
|
270
|
+
return M(this);
|
|
252
271
|
}, Date.prototype.isToday = function() {
|
|
253
|
-
return
|
|
272
|
+
return P(this);
|
|
254
273
|
}, Date.prototype.isLeapYear = function() {
|
|
255
|
-
return
|
|
256
|
-
}, Date.prototype.format = function(
|
|
257
|
-
return
|
|
258
|
-
}, Date.prototype.formatTime = function(
|
|
259
|
-
return
|
|
274
|
+
return l(this);
|
|
275
|
+
}, Date.prototype.format = function(a = "YYYY-MM-DD") {
|
|
276
|
+
return ue(this, a);
|
|
277
|
+
}, Date.prototype.formatTime = function(a = "HH:mm") {
|
|
278
|
+
return re(this, a);
|
|
260
279
|
};
|
|
261
|
-
},
|
|
280
|
+
}, i = () => {
|
|
262
281
|
delete Date.prototype.addDays, delete Date.prototype.subtractDays, delete Date.prototype.addHours, delete Date.prototype.subtractHours, delete Date.prototype.addMinutes, delete Date.prototype.subtractMinutes, delete Date.prototype.getWeek, delete Date.prototype.isToday, delete Date.prototype.isLeapYear, delete Date.prototype.format, delete Date.prototype.formatTime;
|
|
263
|
-
},
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
282
|
+
}, m = (a) => {
|
|
283
|
+
v.value = a, Date.prototype.subtractDays && C();
|
|
284
|
+
}, $ = () => (h !== (/* @__PURE__ */ new Date()).getDate() && (r = /* @__PURE__ */ new Date(), h = r.getDate(), p = `${r.getFullYear()}-${r.getMonth()}-${r.getDate()}`), p), W = (a, k) => {
|
|
285
|
+
const y = new Date(a.valueOf());
|
|
286
|
+
return y.setDate(y.getDate() + k), y;
|
|
287
|
+
}, G = (a, k) => {
|
|
288
|
+
const y = new Date(a.valueOf());
|
|
289
|
+
return y.setDate(y.getDate() - k), y;
|
|
290
|
+
}, o = (a, k) => {
|
|
291
|
+
const y = new Date(a.valueOf());
|
|
292
|
+
return y.setHours(y.getHours() + k), y;
|
|
293
|
+
}, u = (a, k) => {
|
|
294
|
+
const y = new Date(a.valueOf());
|
|
295
|
+
return y.setHours(y.getHours() - k), y;
|
|
296
|
+
}, e = (a, k) => {
|
|
297
|
+
const y = new Date(a.valueOf());
|
|
298
|
+
return y.setMinutes(y.getMinutes() + k), y;
|
|
299
|
+
}, d = (a, k) => {
|
|
300
|
+
const y = new Date(a.valueOf());
|
|
301
|
+
return y.setMinutes(y.getMinutes() - k), y;
|
|
302
|
+
}, f = (a, k) => {
|
|
303
|
+
const y = (A) => {
|
|
304
|
+
const Q = A % k;
|
|
305
|
+
return Q !== 0 && (A += Q >= k / 2 ? k - Q : -Q), A;
|
|
285
306
|
};
|
|
286
|
-
if (typeof
|
|
287
|
-
if (
|
|
288
|
-
let
|
|
289
|
-
|
|
307
|
+
if (typeof a == "number") return y(a);
|
|
308
|
+
if (a instanceof Date) {
|
|
309
|
+
let A = y(a.getMinutes());
|
|
310
|
+
A >= 60 && (a.setHours(a.getHours() + 1), A = 0), a.setMinutes(A, 0, 0);
|
|
290
311
|
}
|
|
291
|
-
},
|
|
292
|
-
const
|
|
293
|
-
|
|
294
|
-
const
|
|
295
|
-
return Math.ceil(((
|
|
296
|
-
},
|
|
297
|
-
if (!
|
|
298
|
-
if (
|
|
299
|
-
if (!
|
|
300
|
-
} else return console.warn(`Vue Cal: invalid date1 provided for comparison with \`isSameDate(date1, date2)\`: \`${
|
|
301
|
-
return
|
|
302
|
-
},
|
|
303
|
-
const k =
|
|
312
|
+
}, M = (a, k = !1) => {
|
|
313
|
+
const y = new Date(Date.UTC(a.getFullYear(), a.getMonth(), a.getDate())), A = y.getUTCDay() || 7;
|
|
314
|
+
y.setUTCDate(y.getUTCDate() + 4 - A);
|
|
315
|
+
const Q = new Date(Date.UTC(y.getUTCFullYear(), 0, 1));
|
|
316
|
+
return Math.ceil(((y - Q) / 864e5 + 1) / 7) + (k ? 1 : 0);
|
|
317
|
+
}, P = (a) => `${a.getFullYear()}-${a.getMonth()}-${a.getDate()}` === $(), B = (a, k) => {
|
|
318
|
+
if (!a || !k) return console.warn(`Vue Cal: missing date${a ? "2" : "1"} parameter for comparison with \`isSameDate(date1, date2)\`.`);
|
|
319
|
+
if (K(a)) {
|
|
320
|
+
if (!K(k)) return console.warn(`Vue Cal: invalid date2 provided for comparison with \`isSameDate(date1, date2)\`: \`${k}\`.`);
|
|
321
|
+
} else return console.warn(`Vue Cal: invalid date1 provided for comparison with \`isSameDate(date1, date2)\`: \`${a}\`.`);
|
|
322
|
+
return a.getFullYear() === k.getFullYear() && a.getMonth() === k.getMonth() && a.getDate() === k.getDate();
|
|
323
|
+
}, s = (a, k, y) => K(a) ? a.getTime() >= k && a.getTime() <= y : console.warn(`Vue Cal: invalid date provided to \`isInRange(date, rangeStart, rangeEnd)\`: \`${a}\`.`), l = (a) => {
|
|
324
|
+
const k = a.getFullYear();
|
|
304
325
|
return !(k % 400) || k % 100 && !(k % 4);
|
|
305
|
-
},
|
|
306
|
-
const
|
|
307
|
-
return
|
|
308
|
-
},
|
|
309
|
-
typeof
|
|
310
|
-
const
|
|
311
|
-
return Math.ceil((k -
|
|
312
|
-
},
|
|
313
|
-
if (
|
|
314
|
-
|
|
315
|
-
const
|
|
316
|
-
YYYY: () =>
|
|
317
|
-
YY: () =>
|
|
318
|
-
M: () =>
|
|
319
|
-
MM: () =>
|
|
320
|
-
MMM: () =>
|
|
321
|
-
MMMM: () =>
|
|
322
|
-
MMMMG: () =>
|
|
323
|
-
D: () =>
|
|
324
|
-
DD: () =>
|
|
325
|
-
S: () =>
|
|
326
|
-
d: () =>
|
|
327
|
-
dd: () =>
|
|
328
|
-
ddd: () =>
|
|
329
|
-
dddd: () =>
|
|
330
|
-
HH: () =>
|
|
331
|
-
H: () =>
|
|
332
|
-
hh: () =>
|
|
333
|
-
h: () =>
|
|
334
|
-
am: () =>
|
|
335
|
-
AM: () =>
|
|
336
|
-
mm: () =>
|
|
337
|
-
m: () =>
|
|
338
|
-
s: () =>
|
|
326
|
+
}, _ = (a = null, k) => {
|
|
327
|
+
const y = a && new Date(a.valueOf()) || /* @__PURE__ */ new Date(), A = k ? 7 : 6;
|
|
328
|
+
return y.setDate(y.getDate() - (y.getDay() + A) % 7), y;
|
|
329
|
+
}, t = (a) => a instanceof Date ? a : (a.length === 10 && (a += " 00:00"), new Date(a.replace(/-/g, "/"))), V = (a) => a.getHours() * 60 + a.getMinutes(), H = (a, k) => {
|
|
330
|
+
typeof a == "string" && (a = a.replace(/-/g, "/")), typeof k == "string" && (k = k.replace(/-/g, "/")), a = new Date(a).setHours(0, 0, 0, 0), k = new Date(k).setHours(0, 0, 1, 0);
|
|
331
|
+
const y = (new Date(k).getTimezoneOffset() - new Date(a).getTimezoneOffset()) * 60 * 1e3;
|
|
332
|
+
return Math.ceil((k - a - y) / (24 * 3600 * 1e3));
|
|
333
|
+
}, U = (a, k, y) => Math.abs(a.getTime() - k.getTime()) <= y * 60 * 1e3, K = (a) => a && a instanceof Date && !isNaN(a), ue = (a, k = "YYYY-MM-DD", y = null) => {
|
|
334
|
+
if (y || (y = v.value), k || (k = "YYYY-MM-DD"), k === "YYYY-MM-DD") return ae(a);
|
|
335
|
+
b = {}, L = {};
|
|
336
|
+
const A = {
|
|
337
|
+
YYYY: () => ee(a, y).YYYY,
|
|
338
|
+
YY: () => ee(a, y).YY(),
|
|
339
|
+
M: () => ee(a, y).M,
|
|
340
|
+
MM: () => ee(a, y).MM(),
|
|
341
|
+
MMM: () => ee(a, y).MMM(),
|
|
342
|
+
MMMM: () => ee(a, y).MMMM(),
|
|
343
|
+
MMMMG: () => ee(a, y).MMMMG(),
|
|
344
|
+
D: () => ee(a, y).D,
|
|
345
|
+
DD: () => ee(a, y).DD(),
|
|
346
|
+
S: () => ee(a, y).S(),
|
|
347
|
+
d: () => ee(a, y).d,
|
|
348
|
+
dd: () => ee(a, y).dd(),
|
|
349
|
+
ddd: () => ee(a, y).ddd(),
|
|
350
|
+
dddd: () => ee(a, y).dddd(),
|
|
351
|
+
HH: () => oe(a, y).HH,
|
|
352
|
+
H: () => oe(a, y).H,
|
|
353
|
+
hh: () => oe(a, y).hh,
|
|
354
|
+
h: () => oe(a, y).h,
|
|
355
|
+
am: () => oe(a, y).am,
|
|
356
|
+
AM: () => oe(a, y).AM,
|
|
357
|
+
mm: () => oe(a, y).mm,
|
|
358
|
+
m: () => oe(a, y).m,
|
|
359
|
+
s: () => oe(a, y).s
|
|
339
360
|
};
|
|
340
|
-
return k.replace(/(\{[a-zA-Z]+\}|[a-zA-Z]+)/g, (
|
|
341
|
-
const
|
|
342
|
-
return
|
|
361
|
+
return k.replace(/(\{[a-zA-Z]+\}|[a-zA-Z]+)/g, (Q, c) => {
|
|
362
|
+
const w = A[c.replace(/\{|\}/g, "")];
|
|
363
|
+
return w !== void 0 ? w() : c;
|
|
343
364
|
});
|
|
344
|
-
},
|
|
345
|
-
const k =
|
|
346
|
-
return `${
|
|
347
|
-
},
|
|
348
|
-
let
|
|
349
|
-
if (
|
|
350
|
-
const [
|
|
351
|
-
|
|
365
|
+
}, ae = (a) => {
|
|
366
|
+
const k = a.getMonth() + 1, y = a.getDate();
|
|
367
|
+
return `${a.getFullYear()}-${k < 10 ? "0" : ""}${k}-${y < 10 ? "0" : ""}${y}`;
|
|
368
|
+
}, re = (a, k = "HH:mm", y = null, A = !1) => {
|
|
369
|
+
let Q = !1;
|
|
370
|
+
if (A) {
|
|
371
|
+
const [S, Y, N] = [a.getHours(), a.getMinutes(), a.getSeconds()];
|
|
372
|
+
S + Y + N === 141 && (Q = !0);
|
|
352
373
|
}
|
|
353
|
-
if (
|
|
354
|
-
|
|
355
|
-
const
|
|
356
|
-
const
|
|
357
|
-
return
|
|
374
|
+
if (a instanceof Date && k === "HH:mm") return Q ? "24:00" : he(a);
|
|
375
|
+
L = {}, y || (y = v.value);
|
|
376
|
+
const c = oe(a, y), w = k.replace(/(\{[a-zA-Z]+\}|[a-zA-Z]+)/g, (S, Y) => {
|
|
377
|
+
const N = c[Y.replace(/\{|\}/g, "")];
|
|
378
|
+
return N !== void 0 ? N : Y;
|
|
358
379
|
});
|
|
359
|
-
return
|
|
360
|
-
},
|
|
361
|
-
const k =
|
|
362
|
-
return `${(k < 10 ? "0" : "") + k}:${(
|
|
363
|
-
},
|
|
364
|
-
const k = Math.floor(
|
|
365
|
-
return `${k}:${
|
|
366
|
-
},
|
|
367
|
-
if (
|
|
368
|
-
switch (
|
|
380
|
+
return Q ? w.replace("23:59", "24:00") : w;
|
|
381
|
+
}, he = (a) => {
|
|
382
|
+
const k = a.getHours(), y = a.getMinutes();
|
|
383
|
+
return `${(k < 10 ? "0" : "") + k}:${(y < 10 ? "0" : "") + y}`;
|
|
384
|
+
}, q = (a) => {
|
|
385
|
+
const k = Math.floor(a / 60).toString().padStart(2, 0), y = (a % 60).toString().padStart(2, 0);
|
|
386
|
+
return `${k}:${y}`;
|
|
387
|
+
}, ce = (a) => {
|
|
388
|
+
if (a > 3 && a < 21) return "th";
|
|
389
|
+
switch (a % 10) {
|
|
369
390
|
case 1:
|
|
370
391
|
return "st";
|
|
371
392
|
case 2:
|
|
@@ -375,94 +396,94 @@ const Ke = (c) => {
|
|
|
375
396
|
default:
|
|
376
397
|
return "th";
|
|
377
398
|
}
|
|
378
|
-
},
|
|
379
|
-
if (
|
|
380
|
-
const
|
|
381
|
-
return
|
|
399
|
+
}, ee = (a, k) => {
|
|
400
|
+
if (b.D) return b;
|
|
401
|
+
const y = a.getFullYear(), A = a.getMonth() + 1, Q = a.getDate(), w = (a.getDay() - 1 + 7) % 7;
|
|
402
|
+
return b = {
|
|
382
403
|
// Year.
|
|
383
|
-
YYYY:
|
|
404
|
+
YYYY: y,
|
|
384
405
|
// 2024.
|
|
385
|
-
YY: () =>
|
|
406
|
+
YY: () => y.toString().substring(2),
|
|
386
407
|
// 24.
|
|
387
408
|
// Month.
|
|
388
|
-
M:
|
|
409
|
+
M: A,
|
|
389
410
|
// 1 to 12.
|
|
390
|
-
MM: () =>
|
|
411
|
+
MM: () => A.toString().padStart(2, 0),
|
|
391
412
|
// 01 to 12.
|
|
392
|
-
MMM: () => k.months[
|
|
413
|
+
MMM: () => k.months[A - 1].substring(0, 3),
|
|
393
414
|
// Jan to Dec.
|
|
394
|
-
MMMM: () => k.months[
|
|
415
|
+
MMMM: () => k.months[A - 1],
|
|
395
416
|
// January to December.
|
|
396
|
-
MMMMG: () => (k.monthsGenitive || k.months)[
|
|
417
|
+
MMMMG: () => (k.monthsGenitive || k.months)[A - 1],
|
|
397
418
|
// January to December in genitive form (Greek...)
|
|
398
419
|
// Day.
|
|
399
|
-
D:
|
|
420
|
+
D: Q,
|
|
400
421
|
// 1 to 31.
|
|
401
|
-
DD: () =>
|
|
422
|
+
DD: () => Q.toString().padStart(2, 0),
|
|
402
423
|
// 01 to 31.
|
|
403
|
-
S: () =>
|
|
424
|
+
S: () => ce(Q),
|
|
404
425
|
// st, nd, rd, th.
|
|
405
426
|
// Day of the week.
|
|
406
|
-
d:
|
|
427
|
+
d: w + 1,
|
|
407
428
|
// 1 to 7 with 7 = Sunday.
|
|
408
429
|
// Some locales have same start for all the days, so they have specific abbrev in weekDaysShort.
|
|
409
|
-
dd: () => k.weekDaysShort.length ? k.weekDaysShort[
|
|
430
|
+
dd: () => k.weekDaysShort.length ? k.weekDaysShort[w] : k.weekDays[w][0],
|
|
410
431
|
// M to S.
|
|
411
|
-
ddd: () => k.weekDaysShort.length ? k.weekDaysShort[
|
|
432
|
+
ddd: () => k.weekDaysShort.length ? k.weekDaysShort[w] : k.weekDays[w].substr(0, 3),
|
|
412
433
|
// Mon to Sun.
|
|
413
|
-
dddd: () => k.weekDays[
|
|
434
|
+
dddd: () => k.weekDays[w]
|
|
414
435
|
// Monday to Sunday.
|
|
415
|
-
},
|
|
416
|
-
},
|
|
417
|
-
if (
|
|
418
|
-
let
|
|
419
|
-
|
|
420
|
-
const
|
|
421
|
-
return
|
|
422
|
-
H:
|
|
423
|
-
h:
|
|
424
|
-
HH:
|
|
425
|
-
hh:
|
|
426
|
-
am:
|
|
427
|
-
AM:
|
|
428
|
-
m:
|
|
429
|
-
mm:
|
|
430
|
-
s:
|
|
431
|
-
},
|
|
436
|
+
}, b;
|
|
437
|
+
}, oe = (a, k) => {
|
|
438
|
+
if (L.am) return L;
|
|
439
|
+
let y, A, Q;
|
|
440
|
+
a instanceof Date ? (y = a.getHours(), A = a.getMinutes(), Q = a.getSeconds()) : (y = Math.floor(a / 60), A = Math.floor(a % 60));
|
|
441
|
+
const c = y % 12 ? y % 12 : 12, w = (k || { am: "am", pm: "pm" })[y === 24 || y < 12 ? "am" : "pm"];
|
|
442
|
+
return L = {
|
|
443
|
+
H: y,
|
|
444
|
+
h: c,
|
|
445
|
+
HH: y.toString().padStart(2, 0),
|
|
446
|
+
hh: c.toString().padStart(2, 0),
|
|
447
|
+
am: w,
|
|
448
|
+
AM: w.toUpperCase(),
|
|
449
|
+
m: A,
|
|
450
|
+
mm: A.toString().padStart(2, 0),
|
|
451
|
+
s: Q
|
|
452
|
+
}, L;
|
|
432
453
|
};
|
|
433
454
|
return {
|
|
434
|
-
addDatePrototypes:
|
|
435
|
-
removeDatePrototypes:
|
|
436
|
-
updateTexts:
|
|
437
|
-
addDays:
|
|
438
|
-
subtractDays:
|
|
439
|
-
addHours:
|
|
440
|
-
subtractHours:
|
|
441
|
-
addMinutes:
|
|
442
|
-
subtractMinutes:
|
|
443
|
-
snapToInterval:
|
|
444
|
-
getWeek:
|
|
445
|
-
isToday:
|
|
446
|
-
isSameDate:
|
|
447
|
-
isInRange:
|
|
448
|
-
isLeapYear:
|
|
449
|
-
getPreviousFirstDayOfWeek:
|
|
450
|
-
stringToDate:
|
|
451
|
-
dateToMinutes:
|
|
452
|
-
countDays:
|
|
453
|
-
datesInSameTimeStep:
|
|
454
|
-
isValid:
|
|
455
|
-
formatDate:
|
|
456
|
-
formatDateLite:
|
|
457
|
-
formatTime:
|
|
458
|
-
formatTimeLite:
|
|
459
|
-
formatMinutes:
|
|
455
|
+
addDatePrototypes: C,
|
|
456
|
+
removeDatePrototypes: i,
|
|
457
|
+
updateTexts: m,
|
|
458
|
+
addDays: W,
|
|
459
|
+
subtractDays: G,
|
|
460
|
+
addHours: o,
|
|
461
|
+
subtractHours: u,
|
|
462
|
+
addMinutes: e,
|
|
463
|
+
subtractMinutes: d,
|
|
464
|
+
snapToInterval: f,
|
|
465
|
+
getWeek: M,
|
|
466
|
+
isToday: P,
|
|
467
|
+
isSameDate: B,
|
|
468
|
+
isInRange: s,
|
|
469
|
+
isLeapYear: l,
|
|
470
|
+
getPreviousFirstDayOfWeek: _,
|
|
471
|
+
stringToDate: t,
|
|
472
|
+
dateToMinutes: V,
|
|
473
|
+
countDays: H,
|
|
474
|
+
datesInSameTimeStep: U,
|
|
475
|
+
isValid: K,
|
|
476
|
+
formatDate: ue,
|
|
477
|
+
formatDateLite: ae,
|
|
478
|
+
formatTime: re,
|
|
479
|
+
formatTimeLite: he,
|
|
480
|
+
formatMinutes: q
|
|
460
481
|
};
|
|
461
|
-
},
|
|
462
|
-
const { dateUtils: n, config:
|
|
463
|
-
let
|
|
464
|
-
const
|
|
465
|
-
const
|
|
482
|
+
}, gt = (D) => {
|
|
483
|
+
const { dateUtils: n, config: r } = D;
|
|
484
|
+
let h = 0;
|
|
485
|
+
const p = T(() => {
|
|
486
|
+
const o = {
|
|
466
487
|
byDate: {},
|
|
467
488
|
// A map of single-day events indexed by date.
|
|
468
489
|
recurring: [],
|
|
@@ -471,426 +492,450 @@ const Ke = (c) => {
|
|
|
471
492
|
// An array of events IDs that are multiday.
|
|
472
493
|
byId: {}
|
|
473
494
|
// A map of all the events indexed by ID for fast lookup.
|
|
474
|
-
};
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
var
|
|
478
|
-
return
|
|
479
|
-
|
|
480
|
-
{ start: (
|
|
481
|
-
{ excludeIds: [e._.id], schedule: (
|
|
495
|
+
}, u = r.events.sort((e, d) => e.start - d.start < 0 ? -1 : 1);
|
|
496
|
+
for (const e of u)
|
|
497
|
+
b(e), e._ || (e._ = {}), e._.id = e._.id || ++h, e.delete || (e.delete = (d) => m(e._.id, d)), e._.deleting = !1, e._.deleted = !1, e.isOverlapping = (d = null) => e.getOverlappingEvents(d).length, e.getOverlappingEvents = (d = null) => {
|
|
498
|
+
var f;
|
|
499
|
+
return W(
|
|
500
|
+
v(n.formatDate((d == null ? void 0 : d.start) || e.start), !0),
|
|
501
|
+
{ start: (d == null ? void 0 : d.start) || e.start, end: (d == null ? void 0 : d.end) || e.end },
|
|
502
|
+
{ excludeIds: [e._.id], schedule: (f = r.schedules) != null && f.length ? ~~((d == null ? void 0 : d.schedule) || e.schedule) : null }
|
|
482
503
|
);
|
|
483
|
-
}, e._.register = (
|
|
484
|
-
e._.$el =
|
|
485
|
-
}, e._.unregister = () =>
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
504
|
+
}, e._.register = (d) => {
|
|
505
|
+
e._.$el = d, e._.fireCreated && (D.emit("event-created", e), delete e._.fireCreated);
|
|
506
|
+
}, e._.unregister = () => {
|
|
507
|
+
e._.$el = null, e._.register = null, e.isOverlapping = null, e.getOverlappingEvents = null, e.delete = null;
|
|
508
|
+
}, o.byId[e._.id] = e, e.recurring ? o.recurring.push(e._.id) : e._.multiday ? (o.multiday.push(e._.id), o.byDate[e._.startFormatted] || (o.byDate[e._.startFormatted] = []), o.byDate[e._.startFormatted].push(e._.id)) : (o.byDate[e._.startFormatted] || (o.byDate[e._.startFormatted] = []), o.byDate[e._.startFormatted].push(e._.id));
|
|
509
|
+
return o;
|
|
510
|
+
}), b = (o) => {
|
|
511
|
+
if (typeof o.start == "string" && (o.start = n.stringToDate(o.start)), typeof o.end == "string" && (o.end = n.stringToDate(o.end)), o.start.setSeconds(0, 0), o.end.setSeconds(0, 0), isNaN(o.start) || isNaN(o.end)) {
|
|
512
|
+
isNaN(o.start) ? console.error(`Vue Cal: invalid start date for event "${o.title}".`, o.start) : console.error(`Vue Cal: invalid end date for event "${o.title}".`, o.end);
|
|
490
513
|
return;
|
|
491
|
-
} else
|
|
492
|
-
|
|
493
|
-
const
|
|
494
|
-
|
|
495
|
-
}, L = (
|
|
496
|
-
let
|
|
497
|
-
return
|
|
498
|
-
},
|
|
499
|
-
|
|
500
|
-
const
|
|
501
|
-
|
|
502
|
-
d
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
},
|
|
507
|
-
if (!
|
|
514
|
+
} else o.end.getTime() < o.start.getTime() && console.error(`Vue Cal: invalid event dates for event "${o.title}". The event ends before it starts.`, o.start, o.end);
|
|
515
|
+
o._ || (o._ = {}), o._.multiday = !n.isSameDate(o.start, new Date(o.end.getTime() - 1)), o._.startFormatted = n.formatDate(o.start), o._.startMinutes = ~~n.dateToMinutes(o.start), o._.endMinutes = ~~n.dateToMinutes(o.end);
|
|
516
|
+
const u = o.start.getHours(), e = o.start.getMinutes().toString().padStart(2, 0), d = o.end.getHours(), f = o.end.getMinutes().toString().padStart(2, 0);
|
|
517
|
+
o._.startTimeFormatted24 = `${u.toString().padStart(2, 0)}:${e}`, o._.startTimeFormatted12 = `${u % 12 || 12}${e ? `:${e}` : ""} ${u < 12 ? "AM" : "PM"}`, o._.endTimeFormatted24 = `${d.toString().padStart(2, 0)}:${f}`, o._.endTimeFormatted12 = `${d % 12 || 12}${f ? `:${f}` : ""} ${d < 12 ? "AM" : "PM"}`, o._.duration = Math.abs(~~((o.end - o.start) / 6e4));
|
|
518
|
+
}, L = (o) => p.value.byId[o], v = (o, u = !1, e = !1) => {
|
|
519
|
+
let d = p.value.byDate[o] || [];
|
|
520
|
+
return d = u || e ? d.map(L) : d, e || (d = d.filter((f) => !f.background && !f._.deleted), u || (d = d.map((f) => f._.id))), d;
|
|
521
|
+
}, C = (o) => {
|
|
522
|
+
const u = {};
|
|
523
|
+
for (const { startFormatted: e } of o) {
|
|
524
|
+
u[e] = [];
|
|
525
|
+
const d = v(e, !1, !0);
|
|
526
|
+
d.length && u[e].push(...d);
|
|
527
|
+
}
|
|
528
|
+
return u;
|
|
529
|
+
}, i = (o) => {
|
|
530
|
+
if (!o.start || !o.end) {
|
|
508
531
|
console.error("Vue Cal: Cannot create an event without valid start and end dates.");
|
|
509
532
|
return;
|
|
510
533
|
}
|
|
511
|
-
return
|
|
512
|
-
},
|
|
513
|
-
var
|
|
514
|
-
if (!
|
|
515
|
-
|
|
516
|
-
const
|
|
517
|
-
if (
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
534
|
+
return r.snapToInterval && (n.snapToInterval(o.start, r.snapToInterval), n.snapToInterval(o.end, r.snapToInterval)), o = { ...o }, o._ || (o._ = {}), o._.id = ++h, o._.fireCreated = !0, r.events.push(o), o;
|
|
535
|
+
}, m = async (o, u = 0) => {
|
|
536
|
+
var P, B;
|
|
537
|
+
if (!o) return console.warn("Vue Cal: Cannot delete event without its ID or criteria.");
|
|
538
|
+
let e = typeof o == "string" || !isNaN(o) ? o : null;
|
|
539
|
+
const d = typeof o == "object" ? Object.entries(o) : null;
|
|
540
|
+
if (d) {
|
|
541
|
+
const [s, l] = d[0];
|
|
542
|
+
e = (P = r.events.find((_) => _[s] === l)) == null ? void 0 : P._.id;
|
|
543
|
+
}
|
|
544
|
+
if (!r.editableEvents.delete)
|
|
545
|
+
return console.info("Vue Cal: Event deletion is disabled. Enable it with the `editable-events` props.");
|
|
546
|
+
if (!e) return console.warn("Vue Cal: Cannot delete event without its ID.");
|
|
547
|
+
const f = r.events.findIndex((s) => s._.id === e);
|
|
548
|
+
if (f === -1) return console.warn(`Vue Cal: Cannot delete unknown event \`${e}\`.`);
|
|
549
|
+
const M = r.events[f];
|
|
550
|
+
if (M.deletable === !1) return console.warn(`Vue Cal: Can't delete event \`${e}\` since it was explicitely set to \`delete: false\`.`);
|
|
551
|
+
switch (u) {
|
|
521
552
|
case 0:
|
|
522
|
-
|
|
553
|
+
M._.deleting ? r.events.splice(f, 1) : M._.deleting = !0;
|
|
523
554
|
break;
|
|
524
555
|
// Display the delete button.
|
|
525
556
|
case 1:
|
|
526
|
-
|
|
557
|
+
M._.deleting = !0;
|
|
527
558
|
break;
|
|
528
559
|
// Visual deletion + external DOM event firing.
|
|
560
|
+
// When explicitly using this stage, the event will be visually deleted but still present in the
|
|
561
|
+
// source of truth until the cell is unmounted (by navigating away).
|
|
529
562
|
case 2:
|
|
530
|
-
|
|
563
|
+
M._.deleted = !0, r.events[f]._.deleted = !0, (B = M._.$el) == null || B.dispatchEvent(new CustomEvent("event-deleted", { detail: M._.id }));
|
|
531
564
|
break;
|
|
532
565
|
// Effective deletion from the source of truth (by default, when unmounting the cell).
|
|
533
566
|
case 3:
|
|
534
|
-
|
|
567
|
+
r.events.splice(f, 1), D.emit("update:events", r.events), D.emit("event-delete", M);
|
|
535
568
|
break;
|
|
536
569
|
}
|
|
537
570
|
return !0;
|
|
538
|
-
},
|
|
539
|
-
const
|
|
540
|
-
if (!
|
|
541
|
-
|
|
542
|
-
d
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
571
|
+
}, $ = (o) => {
|
|
572
|
+
const u = v(o, !0);
|
|
573
|
+
if (!u.length) return { cellOverlaps: {}, longestStreak: 0 };
|
|
574
|
+
const e = {};
|
|
575
|
+
let d = [], f = 0;
|
|
576
|
+
u.sort((M, P) => M.start - P.start || M.end - M.start - (P.end - P.start));
|
|
577
|
+
for (const M of u) {
|
|
578
|
+
const P = M._.id;
|
|
579
|
+
e[P] || (e[P] = { overlaps: /* @__PURE__ */ new Set(), maxConcurrent: 1, position: 0 }), d = d.filter((t) => t.end > M.start);
|
|
580
|
+
let B = d.filter((t) => {
|
|
581
|
+
var H;
|
|
582
|
+
return (!((H = r.schedules) != null && H.length) || M.schedule === t.schedule) && t.start < M.end;
|
|
583
|
+
}), s = new Set(B.map((t) => {
|
|
584
|
+
var V;
|
|
585
|
+
return ((V = e[t._.id]) == null ? void 0 : V.position) ?? 0;
|
|
586
|
+
})), l = 0;
|
|
587
|
+
for (; s.has(l); ) l++;
|
|
588
|
+
e[P].position = l, d.push(M);
|
|
589
|
+
let _ = Math.max(1, ...B.map((t) => {
|
|
590
|
+
var V;
|
|
591
|
+
return ((V = e[t._.id]) == null ? void 0 : V.maxConcurrent) ?? 1;
|
|
558
592
|
}));
|
|
559
|
-
e[
|
|
560
|
-
for (const
|
|
561
|
-
e[
|
|
562
|
-
|
|
593
|
+
e[P].maxConcurrent = Math.max(B.length + 1, _);
|
|
594
|
+
for (const t of B)
|
|
595
|
+
e[t._.id].overlaps.add(P), e[P].overlaps.add(t._.id), e[t._.id].maxConcurrent = e[P].maxConcurrent;
|
|
596
|
+
f = Math.max(f, e[P].maxConcurrent);
|
|
563
597
|
}
|
|
564
|
-
for (const
|
|
565
|
-
return { cellOverlaps: e, longestStreak:
|
|
566
|
-
},
|
|
567
|
-
var
|
|
568
|
-
const
|
|
569
|
-
for (const
|
|
570
|
-
!
|
|
571
|
-
return
|
|
572
|
-
},
|
|
573
|
-
const
|
|
574
|
-
return
|
|
598
|
+
for (const M in e) e[M].overlaps = [...e[M].overlaps];
|
|
599
|
+
return { cellOverlaps: e, longestStreak: f };
|
|
600
|
+
}, W = (o = [], { start: u, end: e }, { excludeIds: d = [], schedule: f = null }) => {
|
|
601
|
+
var B;
|
|
602
|
+
const M = new Set(d), P = [];
|
|
603
|
+
for (const s of o)
|
|
604
|
+
!M.has((B = s._) == null ? void 0 : B.id) && (f === null || f === s.schedule) && G(s, u, e) && P.push(s);
|
|
605
|
+
return P;
|
|
606
|
+
}, G = (o, u, e) => {
|
|
607
|
+
const d = o.allDay || !r.time, f = d ? new Date(o.start).setHours(0, 0, 0, 0) : o.start.getTime(), M = d ? new Date(o.end).setHours(23, 59, 59, 999) : o.end.getTime(), P = d ? new Date(u).setHours(0, 0, 0, 0) : u.getTime(), B = d ? new Date(e).setHours(23, 59, 59, 999) : e.getTime();
|
|
608
|
+
return M > P && f < B;
|
|
575
609
|
};
|
|
576
610
|
return {
|
|
577
|
-
events:
|
|
611
|
+
events: p,
|
|
578
612
|
getEvent: L,
|
|
579
|
-
getEventsByDate:
|
|
580
|
-
getViewEvents:
|
|
581
|
-
getCellOverlappingEvents:
|
|
582
|
-
getEventsInRange:
|
|
583
|
-
createEvent:
|
|
584
|
-
deleteEvent:
|
|
585
|
-
isEventInRange:
|
|
613
|
+
getEventsByDate: v,
|
|
614
|
+
getViewEvents: C,
|
|
615
|
+
getCellOverlappingEvents: $,
|
|
616
|
+
getEventsInRange: W,
|
|
617
|
+
createEvent: i,
|
|
618
|
+
deleteEvent: m,
|
|
619
|
+
isEventInRange: G
|
|
586
620
|
};
|
|
587
|
-
},
|
|
588
|
-
const { availableViews: L } =
|
|
589
|
-
|
|
590
|
-
const
|
|
591
|
-
|
|
592
|
-
const
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
const H = p.value.getTime(), W = $.value.getTime();
|
|
605
|
-
return H <= f && f <= W;
|
|
621
|
+
}, ht = ({ config: D, dateUtils: n, emit: r, texts: h, eventsManager: p }, b) => {
|
|
622
|
+
const { availableViews: L } = D, v = ie(D.view && L[D.view] ? D.view : D.defaultView), C = ie(D.selectedDate || null), i = ie(/* @__PURE__ */ new Date()), m = ie(new Date(D.viewDate || i.value));
|
|
623
|
+
m.value.setHours(0, 0, 0, 0);
|
|
624
|
+
const $ = ie(new Date(m));
|
|
625
|
+
let W = null;
|
|
626
|
+
const G = T(() => v.value === "month" ? $.value : l.value), o = T(() => v.value === "month" ? new Date($.value.getFullYear(), $.value.getMonth() + 1, 0, 23, 59, 59, 999) : t.value), u = T(() => v.value === "week" ? n.getPreviousFirstDayOfWeek(l.value, D.startWeekOnSunday) : v.value === "month" ? l.value : G.value), e = T(() => {
|
|
627
|
+
if (v.value === "week") {
|
|
628
|
+
const g = n.addDays(u.value, 7);
|
|
629
|
+
return g.setMilliseconds(-1), g;
|
|
630
|
+
}
|
|
631
|
+
return v.value === "month" ? t.value : o.value;
|
|
632
|
+
}), d = T(() => {
|
|
633
|
+
const g = i.value.getTime();
|
|
634
|
+
if (v.value === "week")
|
|
635
|
+
return u.value.getTime() <= g && g <= e.value.getTime();
|
|
636
|
+
const z = l.value.getTime(), R = t.value.getTime();
|
|
637
|
+
return z <= g && g <= R;
|
|
606
638
|
});
|
|
607
|
-
function
|
|
608
|
-
|
|
639
|
+
function f() {
|
|
640
|
+
i.value = /* @__PURE__ */ new Date(), W = setTimeout(f, 60 * 1e3);
|
|
609
641
|
}
|
|
610
|
-
function
|
|
611
|
-
|
|
642
|
+
function M() {
|
|
643
|
+
W = setTimeout(f, (60 - (/* @__PURE__ */ new Date()).getSeconds()) * 1e3), f();
|
|
612
644
|
}
|
|
613
|
-
const
|
|
614
|
-
if (!
|
|
615
|
-
let
|
|
616
|
-
return
|
|
617
|
-
}),
|
|
618
|
-
var
|
|
619
|
-
return ((
|
|
620
|
-
}),
|
|
621
|
-
if (
|
|
622
|
-
let
|
|
623
|
-
return
|
|
624
|
-
}
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
645
|
+
const P = T(() => {
|
|
646
|
+
if (!D.availableViews[v.value]) return 1;
|
|
647
|
+
let g = D.availableViews[v.value].cols;
|
|
648
|
+
return D.hasHiddenDays && ["week", "month"].includes(v.value) && (g -= D.hasHiddenDays), g;
|
|
649
|
+
}), B = T(() => {
|
|
650
|
+
var g;
|
|
651
|
+
return ((g = D.availableViews[v.value]) == null ? void 0 : g.rows) || 1;
|
|
652
|
+
}), s = T(() => P.value * B.value), l = T(() => {
|
|
653
|
+
if (v.value === "month") {
|
|
654
|
+
let g = $.value.getDay() || 7;
|
|
655
|
+
return D.startWeekOnSunday && !D.hideWeekdays[7] && (g += 1), D.viewDayOffset && (g -= D.viewDayOffset), n.subtractDays($.value, g - 1);
|
|
656
|
+
}
|
|
657
|
+
if (v.value === "week") {
|
|
658
|
+
const g = "1234567".split("").filter((R) => !Object.keys(D.hideWeekdays).includes(R));
|
|
659
|
+
let z = Math.min(...g);
|
|
660
|
+
return D.startWeekOnSunday && !D.hideWeekdays[7] && (z = 1), D.viewDayOffset && (z += D.viewDayOffset), n.addDays($.value, z - 1);
|
|
661
|
+
}
|
|
662
|
+
return $.value;
|
|
663
|
+
}), _ = T(() => {
|
|
664
|
+
const g = [], z = ["days", "week", "month"].includes(v.value);
|
|
665
|
+
let R = 0;
|
|
666
|
+
for (let X = 0; X < s.value + R; X++)
|
|
667
|
+
switch (v.value) {
|
|
635
668
|
case "day":
|
|
636
669
|
case "days":
|
|
637
670
|
case "week":
|
|
638
671
|
case "month": {
|
|
639
|
-
const
|
|
640
|
-
if (
|
|
641
|
-
|
|
672
|
+
const ve = n.addDays(l.value, X), We = ve.getDay() || 7;
|
|
673
|
+
if (z && D.hasHiddenDays && D.hideWeekdays[We]) {
|
|
674
|
+
R++;
|
|
642
675
|
continue;
|
|
643
676
|
}
|
|
644
|
-
const Ce = new Date(
|
|
645
|
-
Ce.setHours(23, 59, 59, 999),
|
|
677
|
+
const Ce = new Date(ve);
|
|
678
|
+
Ce.setHours(23, 59, 59, 999), g.push({ start: ve, startFormatted: n.formatDate(ve), end: Ce });
|
|
646
679
|
break;
|
|
647
680
|
}
|
|
648
681
|
case "year":
|
|
649
|
-
|
|
650
|
-
start: new Date(
|
|
651
|
-
end: new Date(
|
|
682
|
+
g.push({
|
|
683
|
+
start: new Date(l.value.getFullYear(), X, 1, 0, 0, 0, 0),
|
|
684
|
+
end: new Date(l.value.getFullYear(), X + 1, 0, 23, 59, 59, 999)
|
|
652
685
|
});
|
|
653
686
|
break;
|
|
654
687
|
case "years":
|
|
655
|
-
|
|
656
|
-
start: new Date(
|
|
657
|
-
end: new Date(
|
|
688
|
+
g.push({
|
|
689
|
+
start: new Date(l.value.getFullYear() + X, 0, 1, 0, 0, 0, 0),
|
|
690
|
+
end: new Date(l.value.getFullYear() + X + 1, 0, 0, 23, 59, 59, 999)
|
|
658
691
|
});
|
|
659
692
|
break;
|
|
660
693
|
}
|
|
661
|
-
return
|
|
662
|
-
}),
|
|
663
|
-
const
|
|
664
|
-
return
|
|
665
|
-
}),
|
|
666
|
-
const
|
|
667
|
-
return
|
|
668
|
-
})
|
|
669
|
-
|
|
670
|
-
|
|
694
|
+
return g;
|
|
695
|
+
}), t = T(() => _.value[_.value.length - 1].end), V = ie("right"), H = T(() => {
|
|
696
|
+
const g = Object.keys(D.availableViews);
|
|
697
|
+
return g[g.indexOf(v.value) + 1];
|
|
698
|
+
}), U = T(() => {
|
|
699
|
+
const g = Object.keys(D.availableViews);
|
|
700
|
+
return g[g.indexOf(v.value) - 1];
|
|
701
|
+
});
|
|
702
|
+
function K(g, z, R = !1) {
|
|
703
|
+
if (!z || !z[g]) return g + 1;
|
|
704
|
+
const X = z[g];
|
|
705
|
+
return R && typeof X == "string" ? X.substring(0, 3) : X;
|
|
706
|
+
}
|
|
707
|
+
function ue(g, z, R) {
|
|
708
|
+
const { monthsArray: X, monthBeforeDay: ve, canTruncate: We, xs: Ce } = R, Me = g.getMonth(), Ye = g.getFullYear(), Ee = z.getMonth(), He = z.getFullYear(), Be = Me !== Ee, lt = Ye !== He, ke = We && (Ce || Be), Le = g.getDate(), ze = z.getDate();
|
|
709
|
+
return lt ? ve ? `${K(Me, X, ke)} ${Le}, ${Ye} - ${K(Ee, X, ke)} ${ze}, ${He}` : `${Le} ${K(Me, X, ke)} ${Ye} - ${ze} ${K(Ee, X, ke)} ${He}` : Be ? ve ? `${K(Me, X, ke)} ${Le} - ${K(Ee, X, ke)} ${ze}, ${Ye}` : `${Le} ${K(Me, X, ke)} - ${ze} ${K(Ee, X, ke)} ${Ye}` : ve ? `${K(Me, X, ke)} ${Le}-${ze}, ${Ye}` : `${Le}-${ze} ${K(Me, X, ke)} ${Ye}`;
|
|
710
|
+
}
|
|
711
|
+
const ae = T(() => {
|
|
712
|
+
const { dateFormat: g, months: z, monthsGenitive: R, week: X, truncations: ve } = h, We = D.locale, Ce = ve !== !1, Me = g.indexOf("M") < g.indexOf("D"), Ye = R && We === "el" ? R : z;
|
|
713
|
+
switch (v.value) {
|
|
671
714
|
case "day":
|
|
672
|
-
return n.formatDate(
|
|
673
|
-
case "days":
|
|
674
|
-
let W = f.replace(/(\s|^)[^a-zA-Z]*?d{2,4}[^a-zA-Z]*?(\s|$)/, "");
|
|
675
|
-
H !== !1 && (W = W.replace("MMMM", "MMM"));
|
|
676
|
-
const Q = n.formatDate(p.value, W), te = n.formatDate($.value, W);
|
|
677
|
-
return `${Q} - ${te}`;
|
|
678
|
-
}
|
|
715
|
+
return n.formatDate(l.value, g);
|
|
716
|
+
case "days":
|
|
679
717
|
case "week": {
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
718
|
+
const Ee = {
|
|
719
|
+
monthsArray: Ye,
|
|
720
|
+
monthBeforeDay: Me,
|
|
721
|
+
canTruncate: Ce,
|
|
722
|
+
xs: D.xs
|
|
723
|
+
};
|
|
724
|
+
let He = ue(l.value, t.value, Ee);
|
|
725
|
+
if (v.value === "week") {
|
|
726
|
+
const Be = n.getWeek(
|
|
727
|
+
l.value,
|
|
728
|
+
D.startWeekOnSunday && !D.hideWeekdays[7]
|
|
729
|
+
);
|
|
730
|
+
He += ` <small>${X} ${Be}</small>`;
|
|
731
|
+
}
|
|
732
|
+
return He;
|
|
687
733
|
}
|
|
688
734
|
case "month": {
|
|
689
|
-
const
|
|
690
|
-
return n.formatDate(
|
|
735
|
+
const Ee = `${D.xs && Ce ? "MMM" : "MMMM"} YYYY`;
|
|
736
|
+
return n.formatDate(G.value, Ee);
|
|
691
737
|
}
|
|
692
738
|
case "year":
|
|
693
|
-
return
|
|
739
|
+
return l.value.getFullYear();
|
|
694
740
|
case "years":
|
|
695
|
-
return `${
|
|
741
|
+
return `${l.value.getFullYear()} - ${o.value.getFullYear()}`;
|
|
696
742
|
}
|
|
697
743
|
});
|
|
698
|
-
function
|
|
699
|
-
switch (
|
|
744
|
+
function re() {
|
|
745
|
+
switch ($.value = new Date(m.value || i.value), $.value.setHours(0, 0, 0, 0), v.value) {
|
|
700
746
|
case "day":
|
|
701
747
|
break;
|
|
702
748
|
case "days":
|
|
703
749
|
break;
|
|
704
750
|
case "week":
|
|
705
|
-
|
|
751
|
+
$.value = n.getPreviousFirstDayOfWeek($.value, D.startWeekOnSunday && !D.hideWeekdays[7]);
|
|
706
752
|
break;
|
|
707
753
|
case "month":
|
|
708
|
-
|
|
754
|
+
$.value = new Date($.value.getFullYear(), $.value.getMonth(), 1, 0, 0, 0, 0);
|
|
709
755
|
break;
|
|
710
756
|
case "year":
|
|
711
|
-
|
|
757
|
+
$.value = new Date($.value.getFullYear(), 0, 1, 0, 0, 0, 0);
|
|
712
758
|
break;
|
|
713
759
|
case "years":
|
|
714
|
-
|
|
760
|
+
$.value = new Date($.value.getFullYear() - $.value.getFullYear() % s.value, 0, 1, 0, 0, 0, 0);
|
|
715
761
|
break;
|
|
716
762
|
}
|
|
717
|
-
|
|
718
|
-
id:
|
|
719
|
-
title:
|
|
720
|
-
start:
|
|
721
|
-
end:
|
|
722
|
-
extendedStart:
|
|
763
|
+
D.ready && r("view-change", {
|
|
764
|
+
id: v.value,
|
|
765
|
+
title: ae.value,
|
|
766
|
+
start: G.value,
|
|
767
|
+
end: o.value,
|
|
768
|
+
extendedStart: u.value,
|
|
723
769
|
extendedEnd: e.value,
|
|
724
|
-
cellDates:
|
|
725
|
-
containsToday:
|
|
726
|
-
events:
|
|
727
|
-
}),
|
|
770
|
+
cellDates: _.value,
|
|
771
|
+
containsToday: d.value,
|
|
772
|
+
events: x.value
|
|
773
|
+
}), i.value = /* @__PURE__ */ new Date();
|
|
728
774
|
}
|
|
729
|
-
function
|
|
730
|
-
const
|
|
731
|
-
|
|
775
|
+
function he(g) {
|
|
776
|
+
const z = v.value, R = D.availableViews[z];
|
|
777
|
+
g[z] && JSON.stringify(g[z]) === JSON.stringify(R) || re();
|
|
732
778
|
}
|
|
733
|
-
function
|
|
734
|
-
const
|
|
735
|
-
|
|
779
|
+
function q(g, z = !0) {
|
|
780
|
+
const R = Object.keys(D.availableViews);
|
|
781
|
+
v.value !== g && (R.includes(g) ? (V.value = R.indexOf(g) < R.indexOf(v.value) ? "left" : "right", v.value = g, r("update:view", g), re()) : console.warn(`Vue Cal: the \`${g}\` view is not available.`));
|
|
736
782
|
}
|
|
737
|
-
function
|
|
738
|
-
|
|
783
|
+
function ce() {
|
|
784
|
+
H.value ? q(H.value) : console.warn("Vue Cal: no broader view is available.");
|
|
739
785
|
}
|
|
740
|
-
function
|
|
741
|
-
|
|
786
|
+
function ee() {
|
|
787
|
+
U.value ? q(U.value) : console.warn("Vue Cal: no narrower view is available.");
|
|
742
788
|
}
|
|
743
|
-
function
|
|
744
|
-
|
|
789
|
+
function oe() {
|
|
790
|
+
k(!1);
|
|
745
791
|
}
|
|
746
|
-
function
|
|
747
|
-
|
|
792
|
+
function a() {
|
|
793
|
+
k(!0);
|
|
748
794
|
}
|
|
749
|
-
function
|
|
750
|
-
let
|
|
751
|
-
switch (
|
|
795
|
+
function k(g = !0) {
|
|
796
|
+
let z = new Date(m.value);
|
|
797
|
+
switch (v.value) {
|
|
752
798
|
case "day":
|
|
753
799
|
case "days":
|
|
754
|
-
|
|
800
|
+
g ? z = n.addDays(t.value, 1) : z = n.subtractDays(l.value, s.value);
|
|
755
801
|
break;
|
|
756
802
|
case "week": {
|
|
757
|
-
|
|
803
|
+
g ? (z = n.addDays(e.value, 1), z.setHours(0, 0, 0, 0)) : z = n.subtractDays(u.value, s.value);
|
|
758
804
|
break;
|
|
759
805
|
}
|
|
760
806
|
case "month": {
|
|
761
|
-
const
|
|
762
|
-
|
|
807
|
+
const R = g ? 1 : -1;
|
|
808
|
+
z = new Date(z.getFullYear(), z.getMonth() + R, 1, 0, 0, 0, 0);
|
|
763
809
|
break;
|
|
764
810
|
}
|
|
765
811
|
case "year": {
|
|
766
|
-
const
|
|
767
|
-
|
|
812
|
+
const R = g ? 1 : -1;
|
|
813
|
+
z = new Date(z.getFullYear() + R, 1, 1, 0, 0, 0, 0);
|
|
768
814
|
break;
|
|
769
815
|
}
|
|
770
816
|
case "years": {
|
|
771
|
-
const
|
|
772
|
-
|
|
817
|
+
const R = g ? s.value : -s.value;
|
|
818
|
+
z = new Date(z.getFullYear() + R, 1, 1, 0, 0, 0, 0);
|
|
773
819
|
break;
|
|
774
820
|
}
|
|
775
821
|
}
|
|
776
|
-
|
|
822
|
+
A(z);
|
|
777
823
|
}
|
|
778
|
-
function
|
|
779
|
-
const
|
|
780
|
-
|
|
824
|
+
function y() {
|
|
825
|
+
const g = /* @__PURE__ */ new Date();
|
|
826
|
+
g.setHours(0, 0, 0, 0), A(g);
|
|
781
827
|
}
|
|
782
|
-
function
|
|
783
|
-
if (!n.isValid(
|
|
784
|
-
let [
|
|
785
|
-
|
|
828
|
+
function A(g, z = !0, R = !1) {
|
|
829
|
+
if (!n.isValid(g)) return console.warn("Vue Cal: can't navigate to the given date: invalid date provided to `updateViewDate(date)`.");
|
|
830
|
+
let [X, ve] = [l.value, t.value];
|
|
831
|
+
v.value === "month" && ([X, ve] = [G.value, o.value]), (!n.isInRange(g, X, ve) || R) && (g.setHours(0, 0, 0, 0), V.value = g.getTime() < X.getTime() ? "left" : "right", m.value = g, z && r("update:viewDate", g), re());
|
|
786
832
|
}
|
|
787
|
-
function
|
|
788
|
-
if (n.isValid(
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
} else
|
|
792
|
-
return console.warn("Vue Cal: can't update the selected date: invalid date provided to `updateSelectedDate(date)`.");
|
|
833
|
+
function Q(g, z = !0) {
|
|
834
|
+
if (!n.isValid(g)) return console.warn("Vue Cal: can't update the selected date: invalid date provided to `updateSelectedDate(date)`.");
|
|
835
|
+
const { isValid: R, isSameDate: X } = n;
|
|
836
|
+
(!C.value || !R(C.value) || !X(g, C.value)) && (g.setHours(0, 0, 0, 0), C.value = g, z && r("update:selectedDate", g));
|
|
793
837
|
}
|
|
794
|
-
function
|
|
795
|
-
!
|
|
838
|
+
function c(g) {
|
|
839
|
+
!g && !$.value.getDay() ? A(n.addDays($.value, 1), !0, !0) : (V.value = "left", re());
|
|
796
840
|
}
|
|
797
|
-
function
|
|
798
|
-
|
|
841
|
+
function w(g) {
|
|
842
|
+
g && D.startWeekOnSunday && !$.value.getDay() ? A(n.addDays($.value, 1), !0, !0) : !g && D.startWeekOnSunday && $.value.getDay() === 1 && A(n.subtractDays($.value, 1), !0, !0);
|
|
799
843
|
}
|
|
800
|
-
function
|
|
801
|
-
console.log("toggling weekdays",
|
|
844
|
+
function S() {
|
|
845
|
+
console.log("toggling weekdays", D.hideWeekdays);
|
|
802
846
|
}
|
|
803
|
-
function
|
|
804
|
-
|
|
805
|
-
|
|
847
|
+
function Y(g) {
|
|
848
|
+
var X;
|
|
849
|
+
const z = (X = b.value) == null ? void 0 : X.querySelector(".vuecal__scrollable"), R = g ? g * D.timeCellHeight / D.timeStep : 0;
|
|
850
|
+
z == null || z.scrollTo({ top: R, behavior: "smooth" });
|
|
806
851
|
}
|
|
807
|
-
function
|
|
808
|
-
const
|
|
809
|
-
|
|
852
|
+
function N() {
|
|
853
|
+
const g = /* @__PURE__ */ new Date();
|
|
854
|
+
Y(g.getHours() * 60 + g.getMinutes());
|
|
810
855
|
}
|
|
811
|
-
function
|
|
812
|
-
|
|
856
|
+
function I() {
|
|
857
|
+
Y(0);
|
|
813
858
|
}
|
|
814
|
-
const
|
|
815
|
-
return
|
|
816
|
-
|
|
817
|
-
}),
|
|
818
|
-
|
|
819
|
-
}),
|
|
820
|
-
now:
|
|
821
|
-
id:
|
|
822
|
-
broaderView:
|
|
823
|
-
narrowerView:
|
|
824
|
-
title:
|
|
825
|
-
viewDate:
|
|
826
|
-
start:
|
|
827
|
-
end:
|
|
828
|
-
extendedStart:
|
|
859
|
+
const x = T(() => p.getViewEvents(_.value)), de = p.createEvent, ye = p.deleteEvent;
|
|
860
|
+
return me(() => D.view, (g) => q(g, !1)), me(() => D.availableViews, he), me(() => D.datePicker, () => q("month", !1)), me(() => D.viewDate, (g) => A(g, !1)), me(() => D.selectedDate, (g) => Q(g, !1)), me(() => D.startWeekOnSunday, (g) => c(g)), me(() => D.hideWeekends, (g) => w(g)), me(() => D.hideWeekdays, S), me(() => s.value, () => {
|
|
861
|
+
s.value > 90 && console.warn("Vue Cal: high cell count detected. Performance may degrade when interactions are enabled.");
|
|
862
|
+
}), me(() => D.watchRealTime, (g) => {
|
|
863
|
+
g && D.time ? M() : W = clearTimeout(W);
|
|
864
|
+
}), re(), D.time && D.watchRealTime && M(), Xe(() => W = clearTimeout(W)), {
|
|
865
|
+
now: i,
|
|
866
|
+
id: v,
|
|
867
|
+
broaderView: H,
|
|
868
|
+
narrowerView: U,
|
|
869
|
+
title: ae,
|
|
870
|
+
viewDate: m,
|
|
871
|
+
start: G,
|
|
872
|
+
end: o,
|
|
873
|
+
extendedStart: u,
|
|
829
874
|
// Full range, including out of scope month days, and hidden leading/trailing days.
|
|
830
875
|
extendedEnd: e,
|
|
831
876
|
// Full range, including out of scope month days, and hidden leading/trailing days.
|
|
832
|
-
firstCellDate:
|
|
833
|
-
lastCellDate:
|
|
834
|
-
containsToday:
|
|
835
|
-
selectedDate:
|
|
836
|
-
cellDates:
|
|
837
|
-
cols:
|
|
838
|
-
rows:
|
|
877
|
+
firstCellDate: l,
|
|
878
|
+
lastCellDate: t,
|
|
879
|
+
containsToday: d,
|
|
880
|
+
selectedDate: C,
|
|
881
|
+
cellDates: _,
|
|
882
|
+
cols: P,
|
|
883
|
+
rows: B,
|
|
839
884
|
// All the events are stored and indexed in the events object of the eventsManager.
|
|
840
885
|
// The following events array is only a subset of visible ones, plus any potential recurring
|
|
841
886
|
// and multi-day events.
|
|
842
|
-
events:
|
|
843
|
-
transitionDirection:
|
|
844
|
-
switch:
|
|
845
|
-
broader:
|
|
846
|
-
narrower:
|
|
847
|
-
previous:
|
|
848
|
-
next:
|
|
849
|
-
navigate:
|
|
850
|
-
goToToday:
|
|
851
|
-
updateViewDate:
|
|
852
|
-
updateSelectedDate:
|
|
853
|
-
scrollToCurrentTime:
|
|
854
|
-
scrollToTime:
|
|
855
|
-
scrollTop:
|
|
856
|
-
createEvent:
|
|
857
|
-
deleteEvent:
|
|
887
|
+
events: x,
|
|
888
|
+
transitionDirection: V,
|
|
889
|
+
switch: q,
|
|
890
|
+
broader: ce,
|
|
891
|
+
narrower: ee,
|
|
892
|
+
previous: oe,
|
|
893
|
+
next: a,
|
|
894
|
+
navigate: k,
|
|
895
|
+
goToToday: y,
|
|
896
|
+
updateViewDate: A,
|
|
897
|
+
updateSelectedDate: Q,
|
|
898
|
+
scrollToCurrentTime: N,
|
|
899
|
+
scrollToTime: Y,
|
|
900
|
+
scrollTop: I,
|
|
901
|
+
createEvent: de,
|
|
902
|
+
deleteEvent: ye,
|
|
858
903
|
// Getters.
|
|
859
904
|
get isDay() {
|
|
860
|
-
return
|
|
905
|
+
return v.value === "day";
|
|
861
906
|
},
|
|
862
907
|
get isDays() {
|
|
863
|
-
return
|
|
908
|
+
return v.value === "days";
|
|
864
909
|
},
|
|
865
910
|
get isWeek() {
|
|
866
|
-
return
|
|
911
|
+
return v.value === "week";
|
|
867
912
|
},
|
|
868
913
|
get isMonth() {
|
|
869
|
-
return
|
|
914
|
+
return v.value === "month";
|
|
870
915
|
},
|
|
871
916
|
get isYear() {
|
|
872
|
-
return
|
|
917
|
+
return v.value === "year";
|
|
873
918
|
},
|
|
874
919
|
get isYears() {
|
|
875
|
-
return
|
|
920
|
+
return v.value === "years";
|
|
876
921
|
}
|
|
877
922
|
};
|
|
878
|
-
},
|
|
879
|
-
texts: { ...
|
|
923
|
+
}, Fe = $e({
|
|
924
|
+
texts: { ...fe.texts },
|
|
880
925
|
// Make texts reactive before a locale is loaded.
|
|
881
|
-
dateUtils:
|
|
926
|
+
dateUtils: st(fe.texts, nt)
|
|
882
927
|
// Some Date utils functions need localized texts.
|
|
883
|
-
}),
|
|
884
|
-
const
|
|
885
|
-
uid:
|
|
928
|
+
}), yt = ({ props: D, emit: n, attrs: r, vuecalEl: h, uid: p }) => {
|
|
929
|
+
const b = $e({
|
|
930
|
+
uid: p,
|
|
886
931
|
// The Vuecal instance unique ID, used for dnd source-target identification.
|
|
887
932
|
emit: n,
|
|
888
|
-
texts: { ...
|
|
933
|
+
texts: { ...Fe.texts },
|
|
889
934
|
// Make texts reactive before a locale is loaded.
|
|
890
935
|
// The date utils composable.
|
|
891
936
|
// A class/composable is needed in order to access the user locale in all the methods, and
|
|
892
937
|
// independently of other potential Vue Cal instances on the same page.
|
|
893
|
-
dateUtils: { ...
|
|
938
|
+
dateUtils: { ...Fe.dateUtils },
|
|
894
939
|
now: /* @__PURE__ */ new Date(),
|
|
895
940
|
config: {},
|
|
896
941
|
eventsManager: {},
|
|
@@ -905,9 +950,11 @@ const Ke = (c) => {
|
|
|
905
950
|
isResizingEvent: !1
|
|
906
951
|
}
|
|
907
952
|
});
|
|
908
|
-
return
|
|
909
|
-
},
|
|
910
|
-
|
|
953
|
+
return b.dateUtils = st(Object.assign(fe.texts, b.texts), nt), b.config = mt(b, D, r), b.eventsManager = gt(b), b.view = ht(b, h), b.dnd = ft(b), b;
|
|
954
|
+
}, Dt = 24 * 60, pt = {
|
|
955
|
+
allDayEvents: { type: [Boolean, String], default: !1 },
|
|
956
|
+
// Coming soon.
|
|
957
|
+
// avoidEventOverlap: { type: Boolean, default: undefined }, // Coming soon.
|
|
911
958
|
clickToNavigate: { type: Boolean, default: void 0 },
|
|
912
959
|
// Setting to false will force it off on date-picker.
|
|
913
960
|
dark: { type: Boolean, default: !1 },
|
|
@@ -943,6 +990,7 @@ const Ke = (c) => {
|
|
|
943
990
|
// Mostly for date pickers, sets a minimum date for cell interactions.
|
|
944
991
|
// A 2-way binding that highlights the selected date in the calendar but does not navigate to it.
|
|
945
992
|
selectedDate: { type: [String, Date], default: "" },
|
|
993
|
+
// The selected date in the calendar !== viewDate.
|
|
946
994
|
sm: { type: Boolean, default: !1 },
|
|
947
995
|
// Small size (truncates texts + specific styles).
|
|
948
996
|
specialHours: { type: Object, default: () => ({}) },
|
|
@@ -967,14 +1015,12 @@ const Ke = (c) => {
|
|
|
967
1015
|
// Start time of the time column, in minutes.
|
|
968
1016
|
timeStep: { type: Number, default: 60 },
|
|
969
1017
|
// Step amount for the time in the time column, in minutes.
|
|
970
|
-
timeTo: { type: Number, default:
|
|
1018
|
+
timeTo: { type: Number, default: Dt },
|
|
971
1019
|
// End time of the time column, in minutes.
|
|
972
1020
|
titleBar: { type: Boolean, default: !0 },
|
|
973
1021
|
// Show or hide the header title bar.
|
|
974
1022
|
todayButton: { type: Boolean, default: !0 },
|
|
975
1023
|
// Show or hide the header today button.
|
|
976
|
-
transitions: { type: Boolean, default: !0 },
|
|
977
|
-
// Enables/disables the navigation transitions.
|
|
978
1024
|
twelveHour: { type: Boolean, default: !1 },
|
|
979
1025
|
// 12 or 24 hour format are respectively written like 1pm and 13:00.
|
|
980
1026
|
// Sets the calendar view to one of: 'day', 'days', 'week', 'month', 'year', 'years'. Default 'week' or 'month' if datePicker.
|
|
@@ -985,100 +1031,101 @@ const Ke = (c) => {
|
|
|
985
1031
|
// Only available for month and day views, this will shift the start of the view (left or right) by x days (signed integer).
|
|
986
1032
|
viewDayOffset: { type: Number, default: 0 },
|
|
987
1033
|
// The list of all the view that will be available in this calendar.
|
|
988
|
-
|
|
1034
|
+
// Default for normal layout: ['day', 'days', 'week', 'month', 'year', 'years'] }.
|
|
1035
|
+
// Default for date picker layout: ['month', 'year', 'years'].
|
|
1036
|
+
views: { type: [Array, Object] },
|
|
989
1037
|
viewsBar: { type: Boolean, default: !0 },
|
|
990
1038
|
// Show or hide the headers view selection bar.
|
|
991
1039
|
watchRealTime: { type: Boolean, default: !1 },
|
|
992
1040
|
// More expensive, so only trigger on demand.
|
|
993
|
-
weekNumbers: { type:
|
|
1041
|
+
weekNumbers: { type: Boolean, default: !1 },
|
|
994
1042
|
// Show the weeks numbers in a column on month view.
|
|
995
|
-
xs: { type: Boolean, default: !1 }
|
|
1043
|
+
xs: { type: Boolean, default: !1 }
|
|
996
1044
|
// Extra small size for date pickers (truncates texts + specific styles).
|
|
997
1045
|
// TODO:
|
|
998
|
-
minEventWidth: { type: Number, default: 0 },
|
|
999
|
-
minScheduleWidth: { type: Number, default: 0 },
|
|
1000
|
-
overlapsPerTimeStep: { type: Boolean, default:
|
|
1001
|
-
resizeX: { type: Boolean, default:
|
|
1002
|
-
|
|
1003
|
-
}, gt = { class: "vuecal__header" }, ft = {
|
|
1046
|
+
// minEventWidth: { type: Number, default: 0 },
|
|
1047
|
+
// minScheduleWidth: { type: Number, default: 0 },
|
|
1048
|
+
// overlapsPerTimeStep: { type: Boolean, default: false },
|
|
1049
|
+
// resizeX: { type: Boolean, default: false },
|
|
1050
|
+
}, wt = { class: "vuecal__header" }, _t = {
|
|
1004
1051
|
key: 0,
|
|
1005
1052
|
class: "vuecal__views-bar"
|
|
1006
|
-
},
|
|
1053
|
+
}, kt = ["onClick", "innerHTML"], bt = {
|
|
1007
1054
|
key: 1,
|
|
1008
1055
|
class: "vuecal__title-bar"
|
|
1009
|
-
},
|
|
1056
|
+
}, Tt = { class: "vuecal__transition-wrap" }, $t = ["disabled", "innerHTML"], Mt = {
|
|
1010
1057
|
__name: "header",
|
|
1011
|
-
setup(
|
|
1012
|
-
const n =
|
|
1013
|
-
|
|
1014
|
-
},
|
|
1015
|
-
return (L,
|
|
1058
|
+
setup(D) {
|
|
1059
|
+
const n = Ne("vuecal"), { view: r, config: h } = n, p = () => {
|
|
1060
|
+
h.clickToNavigate && r.broader();
|
|
1061
|
+
}, b = T(() => h.clickToNavigate ? { click: p } : {});
|
|
1062
|
+
return (L, v) => (E(), j("div", wt, [
|
|
1016
1063
|
F(L.$slots, "header", {
|
|
1017
|
-
view:
|
|
1018
|
-
availableViews:
|
|
1019
|
-
vuecal:
|
|
1064
|
+
view: O(r),
|
|
1065
|
+
availableViews: O(h).availableViews,
|
|
1066
|
+
vuecal: O(n)
|
|
1020
1067
|
}),
|
|
1021
|
-
L.$slots.header ? Z("", !0) : (
|
|
1022
|
-
|
|
1023
|
-
(
|
|
1024
|
-
class:
|
|
1025
|
-
onClick: (
|
|
1026
|
-
innerHTML:
|
|
1068
|
+
L.$slots.header ? Z("", !0) : (E(), j(te, { key: 0 }, [
|
|
1069
|
+
O(h).viewsBar ? (E(), j("div", _t, [
|
|
1070
|
+
(E(!0), j(te, null, we(O(h).availableViews, (C, i) => (E(), j("button", {
|
|
1071
|
+
class: _e(["vuecal__view-button", { "vuecal__view-button--active": O(r).id === i }]),
|
|
1072
|
+
onClick: (m) => O(r).switch(i),
|
|
1073
|
+
innerHTML: O(n).texts[i],
|
|
1027
1074
|
type: "button"
|
|
1028
|
-
}, null, 10,
|
|
1075
|
+
}, null, 10, kt))), 256))
|
|
1029
1076
|
])) : Z("", !0),
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
class:
|
|
1033
|
-
onClick:
|
|
1077
|
+
O(h).titleBar ? (E(), j("nav", bt, [
|
|
1078
|
+
ge("button", {
|
|
1079
|
+
class: _e(["vuecal__nav vuecal__nav--prev", { "vuecal__nav--default": !L.$slots["previous-button"] }]),
|
|
1080
|
+
onClick: v[0] || (v[0] = (...C) => O(r).previous && O(r).previous(...C)),
|
|
1034
1081
|
type: "button"
|
|
1035
1082
|
}, [
|
|
1036
1083
|
F(L.$slots, "previous-button")
|
|
1037
1084
|
], 2),
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
name: `vuecal-slide-fade--${
|
|
1085
|
+
ge("div", Tt, [
|
|
1086
|
+
Oe(Ge, {
|
|
1087
|
+
name: `vuecal-slide-fade--${O(r).transitionDirection}`
|
|
1041
1088
|
}, {
|
|
1042
|
-
default:
|
|
1043
|
-
(
|
|
1044
|
-
key:
|
|
1089
|
+
default: J(() => [
|
|
1090
|
+
(E(), j("div", {
|
|
1091
|
+
key: O(r).id + O(r).start.getTime()
|
|
1045
1092
|
}, [
|
|
1046
|
-
L.$slots.title ? (
|
|
1093
|
+
L.$slots.title ? (E(), Se(Ke(O(h).clickToNavigate && O(r).broaderView ? "button" : "div"), De({
|
|
1047
1094
|
key: 0,
|
|
1048
1095
|
class: "vuecal__title"
|
|
1049
|
-
},
|
|
1050
|
-
default:
|
|
1051
|
-
F(L.$slots, "title", ne(se(
|
|
1096
|
+
}, Ie(b.value)), {
|
|
1097
|
+
default: J(() => [
|
|
1098
|
+
F(L.$slots, "title", ne(se(O(r))))
|
|
1052
1099
|
]),
|
|
1053
1100
|
_: 3
|
|
1054
|
-
}, 16)) : (
|
|
1101
|
+
}, 16)) : (E(), Se(Ke(O(h).clickToNavigate && O(r).broaderView ? "button" : "div"), De({
|
|
1055
1102
|
key: 1,
|
|
1056
1103
|
class: "vuecal__title"
|
|
1057
|
-
},
|
|
1058
|
-
innerHTML:
|
|
1104
|
+
}, Ie(b.value), {
|
|
1105
|
+
innerHTML: O(r).title
|
|
1059
1106
|
}), null, 16, ["innerHTML"]))
|
|
1060
1107
|
]))
|
|
1061
1108
|
]),
|
|
1062
1109
|
_: 3
|
|
1063
1110
|
}, 8, ["name"])
|
|
1064
1111
|
]),
|
|
1065
|
-
|
|
1112
|
+
O(h).todayButton ? (E(), j(te, { key: 0 }, [
|
|
1066
1113
|
L.$slots["today-button"] ? F(L.$slots, "today-button", {
|
|
1067
1114
|
key: 0,
|
|
1068
|
-
navigate: () => !
|
|
1069
|
-
active:
|
|
1070
|
-
}) : (
|
|
1115
|
+
navigate: () => !O(r).containsToday && O(r).goToToday(),
|
|
1116
|
+
active: O(r).containsToday
|
|
1117
|
+
}) : (E(), j("button", {
|
|
1071
1118
|
key: 1,
|
|
1072
|
-
class:
|
|
1073
|
-
onClick:
|
|
1074
|
-
disabled: !!
|
|
1119
|
+
class: _e(["vuecal__nav vuecal__nav--today vuecal__nav--default", { "vuecal__nav--active": O(r).containsToday }]),
|
|
1120
|
+
onClick: v[1] || (v[1] = (C) => !O(r).containsToday && O(r).goToToday()),
|
|
1121
|
+
disabled: !!O(r).containsToday,
|
|
1075
1122
|
type: "button",
|
|
1076
|
-
innerHTML:
|
|
1077
|
-
}, null, 10,
|
|
1123
|
+
innerHTML: O(n).texts.today
|
|
1124
|
+
}, null, 10, $t))
|
|
1078
1125
|
], 64)) : Z("", !0),
|
|
1079
|
-
|
|
1080
|
-
class:
|
|
1081
|
-
onClick:
|
|
1126
|
+
ge("button", {
|
|
1127
|
+
class: _e(["vuecal__nav vuecal__nav--next", { "vuecal__nav--default": !L.$slots["next-button"] }]),
|
|
1128
|
+
onClick: v[2] || (v[2] = (...C) => O(r).next && O(r).next(...C)),
|
|
1082
1129
|
type: "button"
|
|
1083
1130
|
}, [
|
|
1084
1131
|
F(L.$slots, "next-button")
|
|
@@ -1087,119 +1134,119 @@ const Ke = (c) => {
|
|
|
1087
1134
|
], 64))
|
|
1088
1135
|
]));
|
|
1089
1136
|
}
|
|
1090
|
-
},
|
|
1137
|
+
}, Yt = {
|
|
1091
1138
|
key: 0,
|
|
1092
1139
|
class: "vuecal__headings"
|
|
1093
|
-
},
|
|
1140
|
+
}, Et = {
|
|
1094
1141
|
key: 0,
|
|
1095
1142
|
class: "vuecal__weekdays-headings"
|
|
1096
|
-
},
|
|
1143
|
+
}, St = ["onClick"], Ct = { class: "vuecal__weekday-day" }, Vt = {
|
|
1097
1144
|
key: 0,
|
|
1098
1145
|
class: "vuecal__weekday-date"
|
|
1099
|
-
},
|
|
1146
|
+
}, Ot = {
|
|
1100
1147
|
key: 1,
|
|
1101
1148
|
class: "vuecal__schedules-headings w-flex grow"
|
|
1102
|
-
},
|
|
1149
|
+
}, jt = ["innerHTML"], Pt = {
|
|
1103
1150
|
__name: "headings-bar",
|
|
1104
|
-
setup(
|
|
1105
|
-
const n =
|
|
1106
|
-
id:
|
|
1107
|
-
date:
|
|
1108
|
-
dateNumber:
|
|
1109
|
-
day:
|
|
1110
|
-
"day-sm":
|
|
1111
|
-
"day-xs":
|
|
1112
|
-
isToday:
|
|
1113
|
-
}))),
|
|
1114
|
-
click: (
|
|
1115
|
-
(
|
|
1151
|
+
setup(D) {
|
|
1152
|
+
const n = Ne("vuecal"), { view: r, config: h, dateUtils: p } = n, b = T(() => h.xs ? "day-xs" : h.sm || r.isDays || r.isMonth ? "day-sm" : "day"), L = T(() => (r.isDay || r.isDays || r.isWeek || r.isMonth) && !(r.isDay && !h.schedules)), v = T(() => r.cellDates.slice(0, r.cols).map(({ start: i }) => ({
|
|
1153
|
+
id: Re[i.getDay()],
|
|
1154
|
+
date: i,
|
|
1155
|
+
dateNumber: i.getDate(),
|
|
1156
|
+
day: p.formatDate(i, "dddd"),
|
|
1157
|
+
"day-sm": p.formatDate(i, "ddd"),
|
|
1158
|
+
"day-xs": p.formatDate(i, "dd"),
|
|
1159
|
+
isToday: p.isToday(i)
|
|
1160
|
+
}))), C = {
|
|
1161
|
+
click: (i) => {
|
|
1162
|
+
(r.isDays || r.isWeek) && r.updateSelectedDate(i);
|
|
1116
1163
|
}
|
|
1117
1164
|
};
|
|
1118
|
-
return (
|
|
1119
|
-
|
|
1120
|
-
(
|
|
1121
|
-
class:
|
|
1122
|
-
key:
|
|
1123
|
-
onClick: (
|
|
1165
|
+
return (i, m) => L.value ? (E(), j("div", Yt, [
|
|
1166
|
+
O(r).isDay ? Z("", !0) : (E(), j("div", Et, [
|
|
1167
|
+
(E(!0), j(te, null, we(v.value, ($, W) => (E(), j("div", {
|
|
1168
|
+
class: _e(["vuecal__weekday", { "vuecal__weekday--today": $.isToday }]),
|
|
1169
|
+
key: W,
|
|
1170
|
+
onClick: (G) => C.click($.date)
|
|
1124
1171
|
}, [
|
|
1125
|
-
F(
|
|
1126
|
-
label: b
|
|
1127
|
-
id:
|
|
1128
|
-
date:
|
|
1172
|
+
F(i.$slots, "weekday-heading", {
|
|
1173
|
+
label: $[b.value],
|
|
1174
|
+
id: $.id,
|
|
1175
|
+
date: $.date
|
|
1129
1176
|
}, () => [
|
|
1130
|
-
|
|
1131
|
-
|
|
1177
|
+
ge("span", Ct, le($[b.value]), 1),
|
|
1178
|
+
O(r).isMonth ? Z("", !0) : (E(), j("strong", Vt, le($.dateNumber), 1))
|
|
1132
1179
|
])
|
|
1133
|
-
], 10,
|
|
1180
|
+
], 10, St))), 128))
|
|
1134
1181
|
])),
|
|
1135
|
-
|
|
1136
|
-
(
|
|
1137
|
-
(
|
|
1138
|
-
|
|
1182
|
+
O(h).schedules ? (E(), j("div", Ot, [
|
|
1183
|
+
(E(!0), j(te, null, we(v.value, ($, W) => (E(), j(te, { key: W }, [
|
|
1184
|
+
(E(!0), j(te, null, we(O(h).schedules, (G, o) => (E(), j(te, { key: o }, [
|
|
1185
|
+
i.$slots["schedule-heading"] ? (E(), j("div", {
|
|
1139
1186
|
key: 0,
|
|
1140
|
-
class:
|
|
1187
|
+
class: _e(["vuecal__schedule vuecal__schedule--heading", G.class])
|
|
1141
1188
|
}, [
|
|
1142
|
-
F(
|
|
1143
|
-
schedule:
|
|
1144
|
-
view:
|
|
1189
|
+
F(i.$slots, "schedule-heading", {
|
|
1190
|
+
schedule: G,
|
|
1191
|
+
view: O(r)
|
|
1145
1192
|
})
|
|
1146
|
-
], 2)) : (
|
|
1193
|
+
], 2)) : (E(), j("div", {
|
|
1147
1194
|
key: 1,
|
|
1148
|
-
class:
|
|
1149
|
-
innerHTML:
|
|
1150
|
-
}, null, 10,
|
|
1195
|
+
class: _e(["vuecal__schedule vuecal__schedule--heading", G.class]),
|
|
1196
|
+
innerHTML: G.label
|
|
1197
|
+
}, null, 10, jt))
|
|
1151
1198
|
], 64))), 128))
|
|
1152
1199
|
], 64))), 128))
|
|
1153
1200
|
])) : Z("", !0)
|
|
1154
1201
|
])) : Z("", !0);
|
|
1155
1202
|
}
|
|
1156
|
-
},
|
|
1203
|
+
}, Ht = { class: "vuecal__time-column" }, Lt = {
|
|
1157
1204
|
__name: "time-column",
|
|
1158
|
-
setup(
|
|
1159
|
-
const n =
|
|
1160
|
-
const
|
|
1161
|
-
for (let
|
|
1162
|
-
const
|
|
1163
|
-
|
|
1164
|
-
minutesSum:
|
|
1205
|
+
setup(D) {
|
|
1206
|
+
const n = Ne("vuecal"), { config: r, texts: h } = n, p = T(() => {
|
|
1207
|
+
const b = [];
|
|
1208
|
+
for (let v = r.timeFrom; v < r.timeTo; v += r.timeStep) {
|
|
1209
|
+
const C = ~~(v / 60), i = v % 60, m = h[v < 720 ? "am" : "pm"];
|
|
1210
|
+
b.push({
|
|
1211
|
+
minutesSum: v,
|
|
1165
1212
|
// The sum of hours + minutes in minutes.
|
|
1166
|
-
hours:
|
|
1167
|
-
minutes:
|
|
1168
|
-
formatted12: `${
|
|
1169
|
-
formatted24: `${
|
|
1213
|
+
hours: C,
|
|
1214
|
+
minutes: i,
|
|
1215
|
+
formatted12: `${C % 12 ? C % 12 : 12}${i ? ":" + i.toString().padStart(2, 0) : ""}${m}`,
|
|
1216
|
+
formatted24: `${C.toString().padStart(2, 0)}:${i.toString().padStart(2, 0)}`
|
|
1170
1217
|
});
|
|
1171
1218
|
}
|
|
1172
|
-
return
|
|
1219
|
+
return b;
|
|
1173
1220
|
});
|
|
1174
|
-
return (
|
|
1175
|
-
(
|
|
1221
|
+
return (b, L) => (E(), j("div", Ht, [
|
|
1222
|
+
(E(!0), j(te, null, we(p.value, (v, C) => (E(), j("div", {
|
|
1176
1223
|
class: "vuecal__time-cell",
|
|
1177
|
-
key:
|
|
1224
|
+
key: C
|
|
1178
1225
|
}, [
|
|
1179
|
-
F(
|
|
1180
|
-
index:
|
|
1181
|
-
minutes:
|
|
1182
|
-
hours:
|
|
1183
|
-
minutesSum:
|
|
1184
|
-
format12:
|
|
1185
|
-
format24:
|
|
1226
|
+
F(b.$slots, "time-cell", {
|
|
1227
|
+
index: C,
|
|
1228
|
+
minutes: v.minutes,
|
|
1229
|
+
hours: v.hours,
|
|
1230
|
+
minutesSum: v.minutesSum,
|
|
1231
|
+
format12: v.formatted12,
|
|
1232
|
+
format24: v.formatted24
|
|
1186
1233
|
}, () => [
|
|
1187
|
-
|
|
1234
|
+
ge("label", null, le(O(r).twelveHour ? v.formatted12 : v.formatted24), 1)
|
|
1188
1235
|
])
|
|
1189
1236
|
]))), 128))
|
|
1190
1237
|
]));
|
|
1191
1238
|
}
|
|
1192
|
-
},
|
|
1239
|
+
}, zt = ["draggable"], Ft = { class: "vuecal__event-details" }, Nt = { class: "vuecal__event-title" }, Wt = {
|
|
1193
1240
|
key: 0,
|
|
1194
1241
|
class: "vuecal__event-time"
|
|
1195
|
-
},
|
|
1242
|
+
}, Bt = ["innerHTML"], at = {
|
|
1196
1243
|
__name: "event",
|
|
1197
1244
|
props: {
|
|
1198
1245
|
event: { type: Object, required: !0 }
|
|
1199
1246
|
},
|
|
1200
1247
|
emits: ["event-drag-start", "event-drag-end", "event-resize-start", "event-resize-end"],
|
|
1201
|
-
setup(
|
|
1202
|
-
const { config:
|
|
1248
|
+
setup(D, { emit: n }) {
|
|
1249
|
+
const { config: r, view: h, dnd: p, touch: b, dateUtils: L } = Ne("vuecal"), v = D, C = ie(null), i = $e(v.event), m = $e({
|
|
1203
1250
|
dragging: !1,
|
|
1204
1251
|
resizing: !1,
|
|
1205
1252
|
fromResizer: !1,
|
|
@@ -1233,180 +1280,186 @@ const Ke = (c) => {
|
|
|
1233
1280
|
cellEl: null,
|
|
1234
1281
|
// Store the cell DOM node for a more efficient resizing calc in mousemove/touchmove.
|
|
1235
1282
|
schedule: null
|
|
1236
|
-
}),
|
|
1237
|
-
|
|
1238
|
-
const
|
|
1239
|
-
var
|
|
1283
|
+
}), $ = T(() => r.editableEvents.drag && i.draggable !== !1 && !i.background), W = T(() => r.time && r.editableEvents.resize && i.resizable !== !1 && !i.background);
|
|
1284
|
+
T(() => r.editableEvents.delete && i.deletable !== !1 && !i.background);
|
|
1285
|
+
const G = T(() => {
|
|
1286
|
+
var s, l, _;
|
|
1240
1287
|
return {
|
|
1241
|
-
[`vuecal__event--${
|
|
1242
|
-
[
|
|
1243
|
-
"vuecal__event--recurring": !!
|
|
1244
|
-
"vuecal__event--background": !!
|
|
1245
|
-
"vuecal__event--multiday": !!((
|
|
1246
|
-
"vuecal__event--cut-top": ((
|
|
1247
|
-
"vuecal__event--cut-bottom": ((
|
|
1288
|
+
[`vuecal__event--${i._.id}`]: !0,
|
|
1289
|
+
[i.class]: !!i.class,
|
|
1290
|
+
"vuecal__event--recurring": !!i.recurring,
|
|
1291
|
+
"vuecal__event--background": !!i.background,
|
|
1292
|
+
"vuecal__event--multiday": !!((s = i._) != null && s.multiday),
|
|
1293
|
+
"vuecal__event--cut-top": ((l = i._) == null ? void 0 : l.startMinutes) < r.timeFrom,
|
|
1294
|
+
"vuecal__event--cut-bottom": ((_ = i._) == null ? void 0 : _.endMinutes) > r.timeTo || i.end.getDate() !== i.start.getDate(),
|
|
1248
1295
|
// Only apply the dragging class on the event copy that is being dragged.
|
|
1249
|
-
"vuecal__event--dragging": !
|
|
1296
|
+
"vuecal__event--dragging": !i._.draggingGhost && i._.dragging,
|
|
1250
1297
|
// Only apply the dragging-ghost class on the event original that remains fixed while a copy is being
|
|
1251
1298
|
// dragged. Sometimes when dragging fast the dragging-ghost class would get stuck and events stays
|
|
1252
1299
|
// invisible, so if dragging is false, disable the dragging-ghost class as well.
|
|
1253
1300
|
// On event drop, if the new position of the event is approved, only remove the dragging-ghost class
|
|
1254
1301
|
// after event deletion (event._.dragging is already false) so the event ghost does not flash in before
|
|
1255
1302
|
// deletion.
|
|
1256
|
-
"vuecal__event--dragging-ghost":
|
|
1257
|
-
"vuecal__event--resizing":
|
|
1303
|
+
"vuecal__event--dragging-ghost": i._.draggingGhost,
|
|
1304
|
+
"vuecal__event--resizing": m.resizing
|
|
1258
1305
|
};
|
|
1259
|
-
}),
|
|
1260
|
-
const
|
|
1261
|
-
if (!
|
|
1262
|
-
const
|
|
1263
|
-
backgroundColor:
|
|
1264
|
-
color:
|
|
1306
|
+
}), o = T(() => {
|
|
1307
|
+
const s = (h.isDay || h.isDays || h.isWeek) && r.time;
|
|
1308
|
+
if (!s && !i.backgroundColor && !i.color) return !1;
|
|
1309
|
+
const l = {
|
|
1310
|
+
backgroundColor: i.backgroundColor || null,
|
|
1311
|
+
color: i.color || null
|
|
1265
1312
|
};
|
|
1266
|
-
if (
|
|
1267
|
-
const
|
|
1268
|
-
|
|
1313
|
+
if (s) {
|
|
1314
|
+
const _ = Math.max(r.timeFrom, i._.startMinutes), t = Math.min(r.timeTo, i._.endMinutes), V = Ve(_, r), H = Ve(t, r) - V;
|
|
1315
|
+
l.top = `${V}%`, l.height = `${H}%`;
|
|
1269
1316
|
}
|
|
1270
|
-
return
|
|
1271
|
-
}),
|
|
1272
|
-
const
|
|
1273
|
-
Object.entries(
|
|
1274
|
-
["resize-end"].includes(
|
|
1275
|
-
|
|
1317
|
+
return l;
|
|
1318
|
+
}), u = T(() => {
|
|
1319
|
+
const s = { ...r.eventListeners.event };
|
|
1320
|
+
Object.entries(s).forEach(([t, V]) => {
|
|
1321
|
+
["resize-end"].includes(t) || (s[t] = (H) => {
|
|
1322
|
+
H.type !== "drop" && V(H.type ? { e: H, event: i } : H);
|
|
1276
1323
|
});
|
|
1277
1324
|
});
|
|
1278
|
-
const
|
|
1279
|
-
|
|
1280
|
-
var
|
|
1281
|
-
|
|
1282
|
-
},
|
|
1283
|
-
var
|
|
1284
|
-
|
|
1325
|
+
const l = { ...s };
|
|
1326
|
+
s.touchstart = (t) => {
|
|
1327
|
+
var V;
|
|
1328
|
+
t.stopPropagation(), e(t), (V = l.touchstart) == null || V.call(l, { e: t, event: i });
|
|
1329
|
+
}, s.mousedown = (t) => {
|
|
1330
|
+
var V;
|
|
1331
|
+
t.stopPropagation(), e(t), (V = l.mousedown) == null || V.call(l, { e: t, event: i });
|
|
1285
1332
|
};
|
|
1286
|
-
let
|
|
1287
|
-
return
|
|
1288
|
-
var
|
|
1289
|
-
(
|
|
1290
|
-
var
|
|
1291
|
-
|
|
1333
|
+
let _ = null;
|
|
1334
|
+
return s.click = (t) => {
|
|
1335
|
+
var V;
|
|
1336
|
+
(V = l.click) == null || V.call(l, { e: t, event: i }), _ ? _ = clearTimeout(_) : _ = setTimeout(() => {
|
|
1337
|
+
var H;
|
|
1338
|
+
_ = null, (H = l["delayed-click"]) == null || H.call(l, { e: t, event: i });
|
|
1292
1339
|
}, 400);
|
|
1293
|
-
},
|
|
1294
|
-
|
|
1295
|
-
},
|
|
1296
|
-
}), e = (
|
|
1297
|
-
var
|
|
1298
|
-
const
|
|
1299
|
-
|
|
1300
|
-
const
|
|
1301
|
-
|
|
1302
|
-
var
|
|
1303
|
-
|
|
1340
|
+
}, s.dblclick = (t) => {
|
|
1341
|
+
l.dblclick ? l.dblclick({ e: t, event: i }) : i.delete(1);
|
|
1342
|
+
}, s;
|
|
1343
|
+
}), e = (s) => {
|
|
1344
|
+
var t, V, H;
|
|
1345
|
+
const l = ((t = s.touches) == null ? void 0 : t[0]) || s;
|
|
1346
|
+
m.fromResizer = l.target.matches(".vuecal__event-resizer, .vuecal__event-resizer *");
|
|
1347
|
+
const _ = C.value.getBoundingClientRect();
|
|
1348
|
+
m.startX = (((V = s.touches) == null ? void 0 : V[0]) || s).clientX - _.left, m.startY = (((H = s.touches) == null ? void 0 : H[0]) || s).clientY - _.top, m.startPercentageX = m.startX * 100 / _.width, m.startPercentageY = m.startY * 100 / _.height, m.cellEl = C.value.closest(".vuecal__cell"), m.resizeStartDate = i.start, B(s.type === "touchstart" ? "touchmove" : "mousemove", d), B(s.type === "touchstart" ? "touchend" : "mouseup", f, { once: !0 }), m.holdTimer = setTimeout(() => {
|
|
1349
|
+
var U, K;
|
|
1350
|
+
m.holding = !0, (K = (U = u.value).hold) == null || K.call(U, { e: s, event: i });
|
|
1304
1351
|
}, 1e3);
|
|
1305
|
-
},
|
|
1306
|
-
var
|
|
1307
|
-
const
|
|
1308
|
-
if (
|
|
1309
|
-
const { top:
|
|
1310
|
-
|
|
1352
|
+
}, d = async (s) => {
|
|
1353
|
+
var _, t, V, H;
|
|
1354
|
+
const l = ((_ = s.touches) == null ? void 0 : _[0]) || s;
|
|
1355
|
+
if (m.fromResizer && !m.resizing && (m.resizing = !0, m.resizingOriginalEvent = { ...i, _: { ...i._ } }, b.isResizingEvent = !0, (V = (t = u.value).resizeStart) == null || V.call(t, { e: s, event: i })), m.holdTimer = clearTimeout(m.holdTimer), m.holding = !1, m.cellEl) {
|
|
1356
|
+
const { top: U, left: K, width: ue, height: ae } = m.cellEl.getBoundingClientRect();
|
|
1357
|
+
m.moveX = l.clientX - K, m.moveY = l.clientY - U, m.movePercentageX = m.moveX * 100 / ue, m.movePercentageY = m.moveY * 100 / ae;
|
|
1311
1358
|
}
|
|
1312
|
-
if (
|
|
1313
|
-
const { newStart:
|
|
1314
|
-
let
|
|
1315
|
-
const { resize:
|
|
1316
|
-
|
|
1317
|
-
e:
|
|
1318
|
-
event: { ...
|
|
1319
|
-
overlaps:
|
|
1320
|
-
})),
|
|
1359
|
+
if (m.fromResizer) {
|
|
1360
|
+
const { newStart: U, newEnd: K } = M(i);
|
|
1361
|
+
let ue = !0;
|
|
1362
|
+
const { resize: ae } = (H = r.eventListeners) == null ? void 0 : H.event;
|
|
1363
|
+
ae && (ue = await ae({
|
|
1364
|
+
e: s,
|
|
1365
|
+
event: { ...i, start: U, end: K },
|
|
1366
|
+
overlaps: i.getOverlappingEvents({ start: U, end: K })
|
|
1367
|
+
})), ue !== !1 ? (i.start = U, i.end = K, m.resizingLastAcceptedEvent && (m.resizingLastAcceptedEvent = null)) : ae && (m.resizingLastAcceptedEvent = { ...i, _: { ...i._ } });
|
|
1321
1368
|
}
|
|
1322
|
-
},
|
|
1323
|
-
var
|
|
1324
|
-
if (
|
|
1325
|
-
const { newStart:
|
|
1326
|
-
let
|
|
1327
|
-
const
|
|
1328
|
-
|
|
1329
|
-
e:
|
|
1330
|
-
event:
|
|
1331
|
-
original:
|
|
1369
|
+
}, f = async (s) => {
|
|
1370
|
+
var l, _;
|
|
1371
|
+
if (m.holdTimer = clearTimeout(m.holdTimer), m.holding = !1, m.resizing) {
|
|
1372
|
+
const { newStart: t, newEnd: V } = M(i);
|
|
1373
|
+
let H = !0;
|
|
1374
|
+
const U = u.value["resize-end"];
|
|
1375
|
+
U && (H = await U({
|
|
1376
|
+
e: s,
|
|
1377
|
+
event: i,
|
|
1378
|
+
original: m.resizingOriginalEvent,
|
|
1332
1379
|
// Original event details before resizing.
|
|
1333
|
-
overlaps:
|
|
1334
|
-
})),
|
|
1380
|
+
overlaps: i.getOverlappingEvents({ start: t, end: V })
|
|
1381
|
+
})), i.start = H === !1 ? (m.resizingLastAcceptedEvent || m.resizingOriginalEvent).start : ((l = m.resizingLastAcceptedEvent) == null ? void 0 : l.start) || t, i.end = H === !1 ? (m.resizingLastAcceptedEvent || m.resizingOriginalEvent).end : ((_ = m.resizingLastAcceptedEvent) == null ? void 0 : _.end) || V, i._.duration < 1 && (i.start = m.resizingOriginalEvent.start, i.end = m.resizingOriginalEvent.end), b.isResizingEvent = !1;
|
|
1335
1382
|
}
|
|
1336
|
-
document.removeEventListener(
|
|
1337
|
-
},
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
const I = a + s.snapToInterval / 2;
|
|
1345
|
-
a = I - I % s.snapToInterval;
|
|
1383
|
+
document.removeEventListener(s.type === "touchend" ? "touchmove" : "mousemove", d), m.resizing = !1, m.fromResizer = !1, m.dragging = !1, m.startX = 0, m.startY = 0, m.moveX = 0, m.moveY = 0, m.startPercentageX = 0, m.startPercentageY = 0, m.movePercentageX = 0, m.movePercentageY = 0, m.cellEl = null, m.resizeStartDate = null, m.resizingOriginalEvent = null, m.resizingLastAcceptedEvent = null, m.schedule = null;
|
|
1384
|
+
}, M = (s) => {
|
|
1385
|
+
const l = new Date(s.start.getFullYear(), s.start.getMonth(), s.start.getDate());
|
|
1386
|
+
new Date(l).setDate(l.getDate() + 1);
|
|
1387
|
+
let t = Pe(m.movePercentageY, r);
|
|
1388
|
+
if (t = Math.max(0, Math.min(t, 24 * 60)), r.snapToInterval) {
|
|
1389
|
+
const U = t + r.snapToInterval / 2;
|
|
1390
|
+
t = U - U % r.snapToInterval;
|
|
1346
1391
|
}
|
|
1347
|
-
let
|
|
1348
|
-
return
|
|
1392
|
+
let V = s.start, H = new Date(l.getTime() + t * 6e4);
|
|
1393
|
+
return H < m.resizeStartDate && (V = H, H = m.resizeStartDate), { newStart: V, newEnd: H };
|
|
1394
|
+
};
|
|
1395
|
+
Ze(() => i._.register(C.value));
|
|
1396
|
+
const P = [], B = (s, l, _) => {
|
|
1397
|
+
document.addEventListener(s, l, _), P.push({ event: s, handler: l, options: _ });
|
|
1349
1398
|
};
|
|
1350
|
-
return
|
|
1399
|
+
return Xe(() => {
|
|
1400
|
+
i._.unregister(), P.forEach(({ event: s, handler: l, options: _ }) => {
|
|
1401
|
+
document.removeEventListener(s, l, _);
|
|
1402
|
+
});
|
|
1403
|
+
}), (s, l) => (E(), j("div", De({ class: "vuecal__event" }, Ie(u.value, !0), {
|
|
1351
1404
|
ref_key: "eventEl",
|
|
1352
|
-
ref:
|
|
1353
|
-
class:
|
|
1354
|
-
style:
|
|
1355
|
-
draggable:
|
|
1356
|
-
onDragstart:
|
|
1357
|
-
onDragend:
|
|
1405
|
+
ref: C,
|
|
1406
|
+
class: G.value,
|
|
1407
|
+
style: o.value,
|
|
1408
|
+
draggable: $.value ? "true" : void 0,
|
|
1409
|
+
onDragstart: l[2] || (l[2] = (_) => $.value && O(p).eventDragStart(_, i)),
|
|
1410
|
+
onDragend: l[3] || (l[3] = (_) => $.value && O(p).eventDragEnd(_, i))
|
|
1358
1411
|
}), [
|
|
1359
|
-
|
|
1360
|
-
F(
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
- ` + le(
|
|
1364
|
-
|
|
1412
|
+
ge("div", Ft, [
|
|
1413
|
+
F(s.$slots, "event", { event: i }, () => [
|
|
1414
|
+
ge("div", Nt, le(i.title), 1),
|
|
1415
|
+
O(r).time ? (E(), j("div", Wt, le(i._[`startTimeFormatted${O(r).twelveHour ? 12 : 24}`]) + `
|
|
1416
|
+
- ` + le(i._[`endTimeFormatted${O(r).twelveHour ? 12 : 24}`]), 1)) : Z("", !0),
|
|
1417
|
+
ge("div", {
|
|
1365
1418
|
class: "vuecal__event-content",
|
|
1366
|
-
innerHTML:
|
|
1367
|
-
}, null, 8,
|
|
1419
|
+
innerHTML: i.content
|
|
1420
|
+
}, null, 8, Bt)
|
|
1368
1421
|
])
|
|
1369
1422
|
]),
|
|
1370
|
-
|
|
1423
|
+
W.value ? (E(), j("div", {
|
|
1371
1424
|
key: 0,
|
|
1372
1425
|
class: "vuecal__event-resizer",
|
|
1373
|
-
onDragstart:
|
|
1426
|
+
onDragstart: l[0] || (l[0] = Qe(() => {
|
|
1374
1427
|
}, ["prevent", "stop"]))
|
|
1375
1428
|
}, null, 32)) : Z("", !0),
|
|
1376
|
-
|
|
1377
|
-
default:
|
|
1378
|
-
|
|
1429
|
+
Oe(Ge, { name: "vuecal-delete-btn" }, {
|
|
1430
|
+
default: J(() => [
|
|
1431
|
+
i._.deleting ? (E(), j("div", {
|
|
1379
1432
|
key: 0,
|
|
1380
1433
|
class: "vuecal__event-delete",
|
|
1381
|
-
onClick:
|
|
1434
|
+
onClick: l[1] || (l[1] = Qe((_) => i.delete(3), ["stop"]))
|
|
1382
1435
|
}, "Delete")) : Z("", !0)
|
|
1383
1436
|
]),
|
|
1384
1437
|
_: 1
|
|
1385
1438
|
})
|
|
1386
|
-
], 16,
|
|
1439
|
+
], 16, zt));
|
|
1387
1440
|
}
|
|
1388
|
-
},
|
|
1441
|
+
}, At = ["innerHTML"], It = ["data-schedule"], Rt = {
|
|
1389
1442
|
key: 1,
|
|
1390
1443
|
class: "vuecal__cell-date"
|
|
1391
|
-
},
|
|
1444
|
+
}, Xt = {
|
|
1392
1445
|
key: 2,
|
|
1393
1446
|
class: "vuecal__cell-content"
|
|
1394
|
-
},
|
|
1447
|
+
}, Gt = {
|
|
1395
1448
|
key: 3,
|
|
1396
1449
|
class: "vuecal__cell-events"
|
|
1397
|
-
},
|
|
1450
|
+
}, qt = {
|
|
1398
1451
|
key: 1,
|
|
1399
1452
|
class: "vuecal__cell-date"
|
|
1400
|
-
},
|
|
1453
|
+
}, Ut = {
|
|
1401
1454
|
key: 2,
|
|
1402
1455
|
class: "vuecal__cell-content"
|
|
1403
|
-
},
|
|
1456
|
+
}, Zt = {
|
|
1404
1457
|
key: 3,
|
|
1405
1458
|
class: "vuecal__cell-events"
|
|
1406
|
-
},
|
|
1459
|
+
}, Jt = {
|
|
1407
1460
|
key: 5,
|
|
1408
1461
|
class: "vuecal__cell-events-count"
|
|
1409
|
-
},
|
|
1462
|
+
}, Kt = ["title"], Qt = {
|
|
1410
1463
|
__name: "cell",
|
|
1411
1464
|
props: {
|
|
1412
1465
|
// Even with time=false, the date of the cell will still be provided in order to attach
|
|
@@ -1415,10 +1468,10 @@ const Ke = (c) => {
|
|
|
1415
1468
|
end: { type: Date, required: !0 },
|
|
1416
1469
|
index: { type: Number, required: !0 }
|
|
1417
1470
|
},
|
|
1418
|
-
setup(
|
|
1419
|
-
const n =
|
|
1420
|
-
|
|
1421
|
-
},
|
|
1471
|
+
setup(D) {
|
|
1472
|
+
const n = D, r = Ne("vuecal"), { view: h, config: p, dateUtils: b, eventsManager: L, dnd: v, touch: C } = r, i = T(() => b.isToday(n.start)), m = ie(null), $ = ie([]), W = ie(!1), G = (c) => {
|
|
1473
|
+
$.value.push(c.detail), W.value = !0;
|
|
1474
|
+
}, o = () => setTimeout(() => W.value = !1, 300), u = $e({
|
|
1422
1475
|
dragging: !1,
|
|
1423
1476
|
holding: !1,
|
|
1424
1477
|
// When the cell is clicked and hold for a certain amount of time.
|
|
@@ -1439,260 +1492,248 @@ const Ke = (c) => {
|
|
|
1439
1492
|
movePercentageX: 0,
|
|
1440
1493
|
movePercentageY: 0,
|
|
1441
1494
|
schedule: null
|
|
1442
|
-
}), e =
|
|
1443
|
-
let
|
|
1444
|
-
return
|
|
1495
|
+
}), e = ie(!1), d = ie({ cellOverlaps: {}, longestStreak: 0 }), f = T(() => {
|
|
1496
|
+
let c = Math.min(u.startPercentageY, u.movePercentageY), w = Math.max(u.startPercentageY, u.movePercentageY), S = Pe(c, p), Y = Pe(w, p);
|
|
1497
|
+
return p.snapToInterval && (S = b.snapToInterval(S, p.snapToInterval), Y = b.snapToInterval(Y, p.snapToInterval), c = Ve(S, p), w = Ve(Y, p)), {
|
|
1445
1498
|
style: {
|
|
1446
|
-
top:
|
|
1447
|
-
height: Math.abs(
|
|
1499
|
+
top: c + "%",
|
|
1500
|
+
height: Math.abs(w - c) + "%"
|
|
1448
1501
|
},
|
|
1449
|
-
startMinutes:
|
|
1450
|
-
endMinutes:
|
|
1451
|
-
start:
|
|
1452
|
-
end:
|
|
1453
|
-
...
|
|
1502
|
+
startMinutes: S,
|
|
1503
|
+
endMinutes: Y,
|
|
1504
|
+
start: b.formatMinutes(S),
|
|
1505
|
+
end: b.formatMinutes(Y),
|
|
1506
|
+
...u.schedule ? { schedule: u.schedule } : {}
|
|
1454
1507
|
};
|
|
1455
|
-
}),
|
|
1456
|
-
const
|
|
1457
|
-
return
|
|
1458
|
-
}),
|
|
1508
|
+
}), M = T(() => {
|
|
1509
|
+
const c = p.editableEvents.create && (u.dragging || e.value), w = p.eventCreateMinDrag && u.thresholdPassed || !p.eventCreateMinDrag;
|
|
1510
|
+
return c && w;
|
|
1511
|
+
}), P = T(() => {
|
|
1459
1512
|
var x;
|
|
1460
|
-
const
|
|
1513
|
+
const c = /* @__PURE__ */ new Date(), w = h.start.getFullYear(), S = h.start.getMonth(), Y = n.start.getFullYear(), N = n.start.getMonth();
|
|
1461
1514
|
return {
|
|
1462
|
-
[`vuecal__cell--${
|
|
1463
|
-
[`vuecal__cell--${
|
|
1464
|
-
[`vuecal__cell--${
|
|
1465
|
-
"vuecal__cell--today":
|
|
1466
|
-
"vuecal__cell--current-month":
|
|
1467
|
-
"vuecal__cell--current-year":
|
|
1468
|
-
"vuecal__cell--out-of-range":
|
|
1469
|
-
"vuecal__cell--before-min":
|
|
1470
|
-
"vuecal__cell--after-max":
|
|
1471
|
-
"vuecal__cell--disabled":
|
|
1472
|
-
"vuecal__cell--selected":
|
|
1473
|
-
"vuecal__cell--has-schedules": (x =
|
|
1474
|
-
"vuecal__cell--dragging":
|
|
1475
|
-
"vuecal__cell--has-events":
|
|
1515
|
+
[`vuecal__cell--${Re[n.start.getDay()]}`]: h.isDay || h.isDays || h.isWeek || h.isMonth,
|
|
1516
|
+
[`vuecal__cell--${dt[N]}`]: h.isYear,
|
|
1517
|
+
[`vuecal__cell--${Y}`]: h.isYears,
|
|
1518
|
+
"vuecal__cell--today": i.value,
|
|
1519
|
+
"vuecal__cell--current-month": h.isYear && Y === c.getFullYear() && N === c.getMonth(),
|
|
1520
|
+
"vuecal__cell--current-year": h.isYears && Y === c.getFullYear(),
|
|
1521
|
+
"vuecal__cell--out-of-range": h.isMonth && (Y !== w || N !== S),
|
|
1522
|
+
"vuecal__cell--before-min": ae.value && K.value,
|
|
1523
|
+
"vuecal__cell--after-max": ae.value && ue.value,
|
|
1524
|
+
"vuecal__cell--disabled": ae.value,
|
|
1525
|
+
"vuecal__cell--selected": h.selectedDate && h.selectedDate.getTime() >= n.start.getTime() && h.selectedDate.getTime() <= n.end.getTime(),
|
|
1526
|
+
"vuecal__cell--has-schedules": (x = p.schedules) == null ? void 0 : x.length,
|
|
1527
|
+
"vuecal__cell--dragging": u.dragging,
|
|
1528
|
+
"vuecal__cell--has-events": l.value.length
|
|
1476
1529
|
};
|
|
1477
|
-
}),
|
|
1478
|
-
switch (
|
|
1530
|
+
}), B = T(() => b.formatDate(n.start)), s = T(() => {
|
|
1531
|
+
switch (h.id) {
|
|
1479
1532
|
case "day":
|
|
1480
1533
|
return "";
|
|
1481
1534
|
case "days":
|
|
1482
|
-
return
|
|
1535
|
+
return p.availableViews.days.rows > 1 && b.formatDate(n.start, "D"), "";
|
|
1483
1536
|
case "week":
|
|
1484
1537
|
return "";
|
|
1485
1538
|
case "month":
|
|
1486
|
-
return
|
|
1539
|
+
return b.formatDate(n.start, "D");
|
|
1487
1540
|
case "year":
|
|
1488
|
-
return
|
|
1541
|
+
return b.formatDate(n.start, p.xs ? "MMM" : "MMMM");
|
|
1489
1542
|
case "years":
|
|
1490
|
-
return
|
|
1543
|
+
return b.formatDate(n.start, "YYYY");
|
|
1491
1544
|
}
|
|
1492
|
-
}),
|
|
1493
|
-
var
|
|
1494
|
-
return (
|
|
1495
|
-
}),
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
{ immediate: !0 }
|
|
1503
|
-
);
|
|
1504
|
-
const P = M(() => {
|
|
1505
|
-
const l = {};
|
|
1506
|
-
for (const T of u.value) {
|
|
1507
|
-
const C = T._.id, { maxConcurrent: E = 1, position: B = 0 } = $.value.cellOverlaps[C] || {};
|
|
1508
|
-
l[C] = {
|
|
1509
|
-
width: `${100 / E}%`,
|
|
1510
|
-
left: `${100 / E * B}%`
|
|
1545
|
+
}), l = T(() => p.datePicker ? [] : L.getEventsByDate(B.value, !0, !0).filter((c) => !$.value.includes(c._.id))), _ = T(() => l.value.filter((c) => !c.background)), t = T(() => {
|
|
1546
|
+
var c;
|
|
1547
|
+
return (c = p.schedules) == null ? void 0 : c.reduce((w, S) => (w[S.id] = l.value.filter((Y) => Y.schedule === S.id), w), {});
|
|
1548
|
+
}), V = T(() => {
|
|
1549
|
+
const c = {};
|
|
1550
|
+
for (const w of l.value) {
|
|
1551
|
+
const S = w._.id, { maxConcurrent: Y = 1, position: N = 0 } = d.value.cellOverlaps[S] || {};
|
|
1552
|
+
c[S] = {
|
|
1553
|
+
width: `${100 / Y}%`,
|
|
1554
|
+
left: `${100 / Y * N}%`
|
|
1511
1555
|
};
|
|
1512
1556
|
}
|
|
1513
|
-
return
|
|
1514
|
-
}),
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
B = Math.max(w.timeFrom, B), A = Math.min(w.timeTo, A);
|
|
1526
|
-
const H = Te(B, w), W = Te(A, w) - H;
|
|
1557
|
+
return c;
|
|
1558
|
+
}), H = T(() => h.isMonth && p.eventCount && !p.eventsOnMonthView && _.value.length), U = T(() => {
|
|
1559
|
+
var S;
|
|
1560
|
+
if (!p.specialHours || h.isMonth || h.isYear || h.isYears) return;
|
|
1561
|
+
const c = Re[n.start.getDay()];
|
|
1562
|
+
let w = (S = p.specialHours) == null ? void 0 : S[c];
|
|
1563
|
+
if (w)
|
|
1564
|
+
return Array.isArray(w) || (w = [w]), w.map((Y) => {
|
|
1565
|
+
let { from: N, to: I, class: x, label: de } = Y;
|
|
1566
|
+
if (isNaN(N) || isNaN(I) || p.timeFrom >= I || p.timeTo <= N) return;
|
|
1567
|
+
N = Math.max(p.timeFrom, N), I = Math.min(p.timeTo, I);
|
|
1568
|
+
const ye = Ve(N, p), g = Ve(I, p) - ye;
|
|
1527
1569
|
return {
|
|
1528
|
-
style: { top: `${
|
|
1529
|
-
label:
|
|
1570
|
+
style: { top: `${ye}%`, height: `${g}%` },
|
|
1571
|
+
label: de,
|
|
1530
1572
|
class: x
|
|
1531
1573
|
};
|
|
1532
|
-
}).filter((
|
|
1533
|
-
}),
|
|
1534
|
-
const { disableDays:
|
|
1535
|
-
return
|
|
1536
|
-
}),
|
|
1537
|
-
show:
|
|
1538
|
-
if (!(!
|
|
1574
|
+
}).filter((Y) => !!Y);
|
|
1575
|
+
}), K = T(() => p.minTimestamp !== null && p.minTimestamp > n.end.getTime()), ue = T(() => p.maxTimestamp && p.maxTimestamp < n.start.getTime()), ae = T(() => {
|
|
1576
|
+
const { disableDays: c } = p, w = h.isYear || h.isYears;
|
|
1577
|
+
return c.length && c.includes(b.formatDate(n.start)) && !w ? !0 : K.value || ue.value;
|
|
1578
|
+
}), re = $e({
|
|
1579
|
+
show: T(() => {
|
|
1580
|
+
if (!(!h.isDay && !h.isDays && !h.isWeek) && !(!i.value || !p.time) && !(p.timeFrom > b.dateToMinutes(h.now)) && !(b.dateToMinutes(h.now) > p.timeTo))
|
|
1539
1581
|
return !0;
|
|
1540
1582
|
}),
|
|
1541
|
-
nowInMinutes:
|
|
1542
|
-
todaysTimePosition:
|
|
1543
|
-
style:
|
|
1544
|
-
currentTime:
|
|
1545
|
-
}),
|
|
1546
|
-
if (
|
|
1547
|
-
const
|
|
1548
|
-
Object.entries(
|
|
1549
|
-
|
|
1550
|
-
var x,
|
|
1551
|
-
(
|
|
1583
|
+
nowInMinutes: T(() => b.dateToMinutes(h.now)),
|
|
1584
|
+
todaysTimePosition: T(() => Ve(re.nowInMinutes, p)),
|
|
1585
|
+
style: T(() => `top: ${re.todaysTimePosition}%`),
|
|
1586
|
+
currentTime: T(() => b.formatTime(h.now))
|
|
1587
|
+
}), he = T(() => {
|
|
1588
|
+
if (ae.value) return {};
|
|
1589
|
+
const c = { ...p.eventListeners.cell };
|
|
1590
|
+
Object.entries(c).forEach(([Y, N]) => {
|
|
1591
|
+
c[Y] = (I) => {
|
|
1592
|
+
var x, de, ye;
|
|
1593
|
+
(ye = (de = I.target || ((x = I.e) == null ? void 0 : x.target)).closest) != null && ye.call(de, ".vuecal__event") || N(I.type ? { e: I, cell: q.value, cursor: ce.value } : I);
|
|
1552
1594
|
};
|
|
1553
1595
|
});
|
|
1554
|
-
const
|
|
1555
|
-
let
|
|
1556
|
-
return
|
|
1557
|
-
var
|
|
1558
|
-
|
|
1559
|
-
var
|
|
1560
|
-
|
|
1596
|
+
const w = { ...c };
|
|
1597
|
+
let S = null;
|
|
1598
|
+
return c.click = (Y) => {
|
|
1599
|
+
var N;
|
|
1600
|
+
ee(), (N = w.click) == null || N.call(w, { e: Y, cell: q.value, cursor: ce.value }), S ? S = clearTimeout(S) : S = setTimeout(() => {
|
|
1601
|
+
var I;
|
|
1602
|
+
S = null, (I = w["delayed-click"]) == null || I.call(w, { e: Y, cell: q.value, cursor: ce.value });
|
|
1561
1603
|
}, 400);
|
|
1562
|
-
}, (
|
|
1563
|
-
var
|
|
1564
|
-
|
|
1565
|
-
},
|
|
1566
|
-
var
|
|
1567
|
-
|
|
1568
|
-
}),
|
|
1569
|
-
var
|
|
1570
|
-
const
|
|
1571
|
-
|
|
1572
|
-
const
|
|
1604
|
+
}, (p.time && h.isDay || h.isDays || h.isWeek) && (c.touchstart = (Y) => {
|
|
1605
|
+
var N;
|
|
1606
|
+
oe(Y.e || Y), (N = w.touchstart) == null || N.call(w, { e: Y, cell: q.value, cursor: ce.value });
|
|
1607
|
+
}, c.mousedown = (Y) => {
|
|
1608
|
+
var N;
|
|
1609
|
+
oe(Y.e || Y), (N = w.mousedown) == null || N.call(w, { e: Y, cell: q.value, cursor: ce.value });
|
|
1610
|
+
}), w.dblclick && (c.dblclick = (Y) => {
|
|
1611
|
+
var z, R;
|
|
1612
|
+
const N = (((z = Y.touches) == null ? void 0 : z[0]) || Y).clientY, { top: I } = m.value.getBoundingClientRect(), x = Je(N - I, m.value), de = Pe(x, p), ye = new Date(n.start);
|
|
1613
|
+
ye.setMinutes(de);
|
|
1614
|
+
const g = {
|
|
1573
1615
|
y: x,
|
|
1574
|
-
date:
|
|
1616
|
+
date: ye
|
|
1575
1617
|
};
|
|
1576
|
-
(
|
|
1577
|
-
}),
|
|
1578
|
-
|
|
1618
|
+
(R = w.dblclick) == null || R.call(w, { e: Y, cell: q.value, cursor: g });
|
|
1619
|
+
}), p.editableEvents.drag && (c.dragenter = (Y) => v.cellDragEnter(Y, q.value), c.dragover = (Y) => {
|
|
1620
|
+
Y.preventDefault(), v.cellDragOver(Y, q.value);
|
|
1621
|
+
}, c.dragleave = (Y) => v.cellDragLeave(Y, q.value), c.drop = (Y) => v.cellDragDrop(Y, q.value)), c;
|
|
1622
|
+
}), q = T(() => ({
|
|
1579
1623
|
start: n.start,
|
|
1580
1624
|
end: n.end,
|
|
1581
|
-
events:
|
|
1582
|
-
...
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1625
|
+
events: l,
|
|
1626
|
+
...u.schedule ? { schedule: u.schedule } : {},
|
|
1627
|
+
goNarrower: () => h.narrower(),
|
|
1628
|
+
goBroader: () => h.broader(),
|
|
1629
|
+
broader: h.broaderView,
|
|
1630
|
+
narrower: h.narrowerView
|
|
1631
|
+
})), ce = T(() => {
|
|
1632
|
+
const c = Pe(u.movePercentageY || u.startPercentageY, p), w = new Date(n.start);
|
|
1633
|
+
return w.setMinutes(c), {
|
|
1634
|
+
x: u.movePercentageX || u.startPercentageX,
|
|
1635
|
+
y: u.movePercentageY || u.startPercentageY,
|
|
1636
|
+
date: w
|
|
1589
1637
|
};
|
|
1590
|
-
}),
|
|
1591
|
-
|
|
1592
|
-
},
|
|
1593
|
-
var
|
|
1594
|
-
|
|
1595
|
-
const
|
|
1596
|
-
|
|
1597
|
-
var
|
|
1598
|
-
|
|
1638
|
+
}), ee = () => {
|
|
1639
|
+
h.updateSelectedDate(n.start), p.clickToNavigate && ((h.isMonth || h.isDays || h.isWeek) && p.availableViews.day ? h.switch("day") : h.isYear && p.availableViews.month ? h.switch("month") : h.isYears && p.availableViews.year && h.switch("year")), h.updateViewDate(n.start);
|
|
1640
|
+
}, oe = (c) => {
|
|
1641
|
+
var S, Y;
|
|
1642
|
+
u.schedule = ~~c.target.dataset.schedule;
|
|
1643
|
+
const w = m.value.getBoundingClientRect();
|
|
1644
|
+
u.startX = (((S = c.touches) == null ? void 0 : S[0]) || c).clientX - w.left, u.startY = (((Y = c.touches) == null ? void 0 : Y[0]) || c).clientY - w.top, u.startPercentageX = u.startX * 100 / w.width, u.startPercentageY = u.startY * 100 / w.height, u.thresholdPassed = !1, document.addEventListener(c.type === "touchstart" ? "touchmove" : "mousemove", a), document.addEventListener(c.type === "touchstart" ? "touchend" : "mouseup", k, { once: !0 }), u.holdTimer = setTimeout(() => {
|
|
1645
|
+
var N, I;
|
|
1646
|
+
u.holding = !0, (I = (N = he.value).hold) == null || I.call(N, { e: c, cell: q.value, cursor: ce.value });
|
|
1599
1647
|
}, 1e3);
|
|
1600
|
-
},
|
|
1601
|
-
var
|
|
1602
|
-
|
|
1603
|
-
const
|
|
1604
|
-
|
|
1605
|
-
},
|
|
1606
|
-
var
|
|
1607
|
-
document.removeEventListener(
|
|
1608
|
-
},
|
|
1609
|
-
if (!
|
|
1610
|
-
let { start:
|
|
1611
|
-
|
|
1612
|
-
let
|
|
1613
|
-
const { create: x } =
|
|
1648
|
+
}, a = (c) => {
|
|
1649
|
+
var S, Y, N, I, x, de;
|
|
1650
|
+
u.dragging || (C.isDraggingCell = !0, (Y = (S = he.value).dragStart) == null || Y.call(S, { e: c, cell: q.value, cursor: ce.value })), u.dragging = !0, u.holdTimer = clearTimeout(u.holdTimer), u.holding = !1;
|
|
1651
|
+
const w = m.value.getBoundingClientRect();
|
|
1652
|
+
u.moveX = (((N = c.touches) == null ? void 0 : N[0]) || c).clientX - w.left, u.moveY = (((I = c.touches) == null ? void 0 : I[0]) || c).clientY - w.top, u.movePercentageX = u.moveX * 100 / w.width, u.movePercentageY = u.moveY * 100 / w.height, p.eventCreateMinDrag && Math.abs(u.startY - u.moveY) > p.eventCreateMinDrag && (u.thresholdPassed = !0), (de = (x = he.value).drag) == null || de.call(x, { e: c, cell: q.value, cursor: ce.value });
|
|
1653
|
+
}, k = async (c) => {
|
|
1654
|
+
var w, S;
|
|
1655
|
+
document.removeEventListener(c.type === "touchend" ? "touchmove" : "mousemove", a, { passive: !1 }), u.dragging && ((S = (w = he.value).dragEnd) == null || S.call(w, { e: c, cell: q.value, cursor: ce.value }), C.isDraggingCell = !1, p.editableEvents.create && (e.value = !0, await y(c), e.value = !1)), u.holdTimer = clearTimeout(u.holdTimer), u.holding = !1, u.dragging = !1, u.startX = 0, u.startY = 0, u.moveX = 0, u.moveY = 0, u.startPercentageX = 0, u.startPercentageY = 0, u.movePercentageX = 0, u.movePercentageY = 0, u.thresholdPassed = !1, u.schedule = null;
|
|
1656
|
+
}, y = async (c) => {
|
|
1657
|
+
if (!M.value) return;
|
|
1658
|
+
let { start: w, end: S, startMinutes: Y, endMinutes: N } = f.value;
|
|
1659
|
+
w = new Date(n.start), w.setMinutes(Y), S = new Date(n.start), S.setMinutes(N);
|
|
1660
|
+
let I = { ...f.value, start: w, end: S };
|
|
1661
|
+
const { create: x } = p.eventListeners.event;
|
|
1614
1662
|
if (typeof x == "function") {
|
|
1615
|
-
const
|
|
1616
|
-
|
|
1617
|
-
} else
|
|
1618
|
-
},
|
|
1619
|
-
Object.keys(
|
|
1620
|
-
var
|
|
1621
|
-
(
|
|
1663
|
+
const de = I;
|
|
1664
|
+
I = await new Promise((ye) => x({ e: c, event: I, cell: q.value, resolve: ye, cursor: ce.value })), I && typeof I == "object" && h.createEvent(I), I && typeof I == "boolean" && h.createEvent(de);
|
|
1665
|
+
} else h.createEvent(I);
|
|
1666
|
+
}, A = () => {
|
|
1667
|
+
Object.keys(he.value).forEach((c) => {
|
|
1668
|
+
var w;
|
|
1669
|
+
(w = m.value) == null || w.removeEventListener(c, he.value[c]);
|
|
1622
1670
|
});
|
|
1671
|
+
}, Q = () => {
|
|
1672
|
+
d.value = L.getCellOverlappingEvents(B.value);
|
|
1623
1673
|
};
|
|
1624
|
-
return
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1674
|
+
return me(
|
|
1675
|
+
// Watch event IDs and start/end dates (only) to detect event resizing/dnd.
|
|
1676
|
+
() => _.value.map((c) => `${c._.id}${c.start.getTime()}${c.end.getTime()}`).join(),
|
|
1677
|
+
async () => {
|
|
1678
|
+
await Ue(), Q();
|
|
1679
|
+
},
|
|
1680
|
+
{ immediate: !0, flush: "post" }
|
|
1681
|
+
// Use flush: 'post' to prevent infinite updates.
|
|
1682
|
+
), Xe(async () => {
|
|
1683
|
+
$.value.forEach((c) => L.deleteEvent(c, 3)), A(), await Ue();
|
|
1684
|
+
}), (c, w) => (E(), j("div", De({
|
|
1685
|
+
class: ["vuecal__cell", P.value],
|
|
1628
1686
|
ref_key: "cellEl",
|
|
1629
|
-
ref:
|
|
1630
|
-
},
|
|
1631
|
-
|
|
1687
|
+
ref: m
|
|
1688
|
+
}, Ie(he.value, !0)), [
|
|
1689
|
+
c.$slots.cell ? F(c.$slots, "cell", {
|
|
1632
1690
|
key: 0,
|
|
1633
|
-
|
|
1634
|
-
end: c.end,
|
|
1635
|
-
index: c.index,
|
|
1636
|
-
events: u.value
|
|
1691
|
+
cell: q.value
|
|
1637
1692
|
}) : Z("", !0),
|
|
1638
|
-
|
|
1639
|
-
class:
|
|
1640
|
-
style:
|
|
1641
|
-
innerHTML:
|
|
1642
|
-
}, null, 14,
|
|
1643
|
-
!
|
|
1644
|
-
class:
|
|
1645
|
-
key:
|
|
1646
|
-
style:
|
|
1647
|
-
"data-schedule":
|
|
1693
|
+
U.value ? (E(!0), j(te, { key: 1 }, we(U.value, (S, Y) => (E(), j("div", {
|
|
1694
|
+
class: _e(["vuecal__special-hours", S.class]),
|
|
1695
|
+
style: Te(S.style),
|
|
1696
|
+
innerHTML: S.label || ""
|
|
1697
|
+
}, null, 14, At))), 256)) : Z("", !0),
|
|
1698
|
+
!c.$slots.cell && O(p).schedules ? (E(!0), j(te, { key: 2 }, we(O(p).schedules, (S) => (E(), j("div", {
|
|
1699
|
+
class: _e(["vuecal__schedule vuecal__schedule--cell", S.class]),
|
|
1700
|
+
key: S.id,
|
|
1701
|
+
style: Te(S.style || null),
|
|
1702
|
+
"data-schedule": S.id
|
|
1648
1703
|
}, [
|
|
1649
|
-
|
|
1704
|
+
c.$slots["cell-events"] ? F(c.$slots, "cell-events", {
|
|
1650
1705
|
key: 0,
|
|
1651
|
-
|
|
1652
|
-
end: c.end,
|
|
1653
|
-
events: u.value
|
|
1706
|
+
cell: q.value
|
|
1654
1707
|
}) : Z("", !0),
|
|
1655
|
-
|
|
1656
|
-
F(
|
|
1657
|
-
|
|
1658
|
-
end: c.end,
|
|
1659
|
-
events: u.value
|
|
1660
|
-
}, () => [
|
|
1661
|
-
Ge(le(v.value), 1)
|
|
1708
|
+
s.value || c.$slots["cell-date"] ? (E(), j("div", Rt, [
|
|
1709
|
+
F(c.$slots, "cell-date", { cell: q.value }, () => [
|
|
1710
|
+
xe(le(s.value), 1)
|
|
1662
1711
|
])
|
|
1663
1712
|
])) : Z("", !0),
|
|
1664
|
-
|
|
1665
|
-
F(
|
|
1666
|
-
start: c.start,
|
|
1667
|
-
end: c.end,
|
|
1668
|
-
events: u.value
|
|
1669
|
-
})
|
|
1713
|
+
c.$slots["cell-content"] ? (E(), j("div", Xt, [
|
|
1714
|
+
F(c.$slots, "cell-content", { cell: q.value })
|
|
1670
1715
|
])) : Z("", !0),
|
|
1671
|
-
|
|
1672
|
-
F(
|
|
1673
|
-
|
|
1674
|
-
end: c.end,
|
|
1675
|
-
events: u.value
|
|
1676
|
-
})
|
|
1677
|
-
])) : u.value.length || N.value ? (S(), _e(Ze, {
|
|
1716
|
+
c.$slots["cell-events"] && l.value.length ? (E(), j("div", Gt, [
|
|
1717
|
+
F(c.$slots, "cell-events", { cell: q.value })
|
|
1718
|
+
])) : l.value.length || W.value ? (E(), Se(et, {
|
|
1678
1719
|
key: 4,
|
|
1679
1720
|
class: "vuecal__cell-events",
|
|
1680
1721
|
name: "vuecal-event-delete",
|
|
1681
|
-
onBeforeLeave:
|
|
1682
|
-
onAfterLeave:
|
|
1722
|
+
onBeforeLeave: w[0] || (w[0] = (Y) => W.value = !0),
|
|
1723
|
+
onAfterLeave: o,
|
|
1683
1724
|
tag: "div"
|
|
1684
1725
|
}, {
|
|
1685
|
-
default:
|
|
1686
|
-
(
|
|
1687
|
-
key:
|
|
1688
|
-
event:
|
|
1689
|
-
onEventDeleted:
|
|
1690
|
-
style:
|
|
1691
|
-
},
|
|
1692
|
-
|
|
1726
|
+
default: J(() => [
|
|
1727
|
+
(E(!0), j(te, null, we(t.value[S.id], (Y) => (E(), Se(at, {
|
|
1728
|
+
key: Y._.id,
|
|
1729
|
+
event: Y,
|
|
1730
|
+
onEventDeleted: G,
|
|
1731
|
+
style: Te(V.value[Y._.id])
|
|
1732
|
+
}, je({ _: 2 }, [
|
|
1733
|
+
c.$slots.event ? {
|
|
1693
1734
|
name: "event",
|
|
1694
|
-
fn:
|
|
1695
|
-
F(
|
|
1735
|
+
fn: J((N) => [
|
|
1736
|
+
F(c.$slots, "event", De({ ref_for: !0 }, N))
|
|
1696
1737
|
]),
|
|
1697
1738
|
key: "0"
|
|
1698
1739
|
} : void 0
|
|
@@ -1700,55 +1741,46 @@ const Ke = (c) => {
|
|
|
1700
1741
|
]),
|
|
1701
1742
|
_: 2
|
|
1702
1743
|
}, 1024)) : Z("", !0),
|
|
1703
|
-
|
|
1744
|
+
M.value && u.schedule === S.id ? (E(), j("div", {
|
|
1704
1745
|
key: 5,
|
|
1705
1746
|
class: "vuecal__event-placeholder",
|
|
1706
|
-
style:
|
|
1707
|
-
}, le(
|
|
1708
|
-
], 14,
|
|
1709
|
-
!
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
Ge(le(v.value), 1)
|
|
1747
|
+
style: Te(f.value.style)
|
|
1748
|
+
}, le(f.value.start) + " - " + le(f.value.end), 5)) : Z("", !0)
|
|
1749
|
+
], 14, It))), 128)) : Z("", !0),
|
|
1750
|
+
!c.$slots.cell && !O(p).schedules ? (E(), j(te, { key: 3 }, [
|
|
1751
|
+
c.$slots["cell-events"] ? F(c.$slots, "cell-events", {
|
|
1752
|
+
key: 0,
|
|
1753
|
+
cell: q.value
|
|
1754
|
+
}) : Z("", !0),
|
|
1755
|
+
s.value || c.$slots["cell-date"] ? (E(), j("div", qt, [
|
|
1756
|
+
F(c.$slots, "cell-date", { cell: q.value }, () => [
|
|
1757
|
+
xe(le(s.value), 1)
|
|
1718
1758
|
])
|
|
1719
1759
|
])) : Z("", !0),
|
|
1720
|
-
|
|
1721
|
-
F(
|
|
1722
|
-
start: c.start,
|
|
1723
|
-
end: c.end,
|
|
1724
|
-
events: u.value
|
|
1725
|
-
})
|
|
1760
|
+
c.$slots["cell-content"] ? (E(), j("div", Ut, [
|
|
1761
|
+
F(c.$slots, "cell-content", { cell: q.value })
|
|
1726
1762
|
])) : Z("", !0),
|
|
1727
|
-
|
|
1728
|
-
F(
|
|
1729
|
-
|
|
1730
|
-
end: c.end,
|
|
1731
|
-
events: u.value
|
|
1732
|
-
})
|
|
1733
|
-
])) : (u.value.length || N.value) && !(V(y).isMonth && !V(w).eventsOnMonthView) ? (S(), _e(Ze, {
|
|
1763
|
+
c.$slots["cell-events"] && l.value.length ? (E(), j("div", Zt, [
|
|
1764
|
+
F(c.$slots, "cell-events", { cell: q.value })
|
|
1765
|
+
])) : (l.value.length || W.value) && !(O(h).isMonth && !O(p).eventsOnMonthView) ? (E(), Se(et, {
|
|
1734
1766
|
key: 4,
|
|
1735
1767
|
class: "vuecal__cell-events",
|
|
1736
1768
|
name: "vuecal-event-delete",
|
|
1737
|
-
onBeforeLeave:
|
|
1738
|
-
onAfterLeave:
|
|
1769
|
+
onBeforeLeave: w[1] || (w[1] = (S) => W.value = !0),
|
|
1770
|
+
onAfterLeave: o,
|
|
1739
1771
|
tag: "div"
|
|
1740
1772
|
}, {
|
|
1741
|
-
default:
|
|
1742
|
-
(
|
|
1743
|
-
key:
|
|
1744
|
-
event:
|
|
1745
|
-
onEventDeleted:
|
|
1746
|
-
style:
|
|
1747
|
-
},
|
|
1748
|
-
|
|
1773
|
+
default: J(() => [
|
|
1774
|
+
(E(!0), j(te, null, we(l.value, (S) => (E(), Se(at, {
|
|
1775
|
+
key: S._.id,
|
|
1776
|
+
event: S,
|
|
1777
|
+
onEventDeleted: G,
|
|
1778
|
+
style: Te(V.value[S._.id])
|
|
1779
|
+
}, je({ _: 2 }, [
|
|
1780
|
+
c.$slots.event ? {
|
|
1749
1781
|
name: "event",
|
|
1750
|
-
fn:
|
|
1751
|
-
F(
|
|
1782
|
+
fn: J((Y) => [
|
|
1783
|
+
F(c.$slots, "event", De({ ref_for: !0 }, Y))
|
|
1752
1784
|
]),
|
|
1753
1785
|
key: "0"
|
|
1754
1786
|
} : void 0
|
|
@@ -1756,125 +1788,123 @@ const Ke = (c) => {
|
|
|
1756
1788
|
]),
|
|
1757
1789
|
_: 3
|
|
1758
1790
|
})) : Z("", !0),
|
|
1759
|
-
|
|
1791
|
+
M.value ? (E(), j("div", {
|
|
1760
1792
|
key: 5,
|
|
1761
1793
|
class: "vuecal__event-placeholder",
|
|
1762
|
-
style:
|
|
1763
|
-
}, le(
|
|
1794
|
+
style: Te(f.value.style)
|
|
1795
|
+
}, le(f.value.start) + " - " + le(f.value.end), 5)) : Z("", !0)
|
|
1764
1796
|
], 64)) : Z("", !0),
|
|
1765
|
-
|
|
1797
|
+
c.$slots["event-count"] ? F(c.$slots, "event-count", {
|
|
1766
1798
|
key: 4,
|
|
1767
|
-
events:
|
|
1768
|
-
}) :
|
|
1769
|
-
|
|
1799
|
+
events: _.value
|
|
1800
|
+
}) : H.value ? (E(), j("div", Jt, le(_.value.length), 1)) : Z("", !0),
|
|
1801
|
+
re.show ? (E(), j("div", {
|
|
1770
1802
|
key: 6,
|
|
1771
1803
|
class: "vuecal__now-line",
|
|
1772
|
-
style:
|
|
1773
|
-
title:
|
|
1804
|
+
style: Te(re.style),
|
|
1805
|
+
title: re.currentTime
|
|
1774
1806
|
}, [
|
|
1775
|
-
|
|
1776
|
-
], 12,
|
|
1807
|
+
ge("span", null, le(re.currentTime), 1)
|
|
1808
|
+
], 12, Kt)) : Z("", !0)
|
|
1777
1809
|
], 16));
|
|
1778
1810
|
}
|
|
1779
|
-
},
|
|
1811
|
+
}, xt = {
|
|
1780
1812
|
__name: "body",
|
|
1781
|
-
setup(
|
|
1782
|
-
const n =
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
})), O = M(() => {
|
|
1788
|
-
const b = w.formatTime(Ee(L.value, y));
|
|
1813
|
+
setup(D) {
|
|
1814
|
+
const n = Ne("vuecal"), { view: r, config: h, dateUtils: p } = n, b = ie(null), L = ie(null), v = T(() => ({
|
|
1815
|
+
"--vuecal-grid-columns": r.cols,
|
|
1816
|
+
"--vuecal-grid-rows": r.rows
|
|
1817
|
+
})), C = T(() => {
|
|
1818
|
+
const $ = p.formatTime(Pe(L.value, h));
|
|
1789
1819
|
return {
|
|
1790
|
-
style: { top: L.value
|
|
1791
|
-
time:
|
|
1820
|
+
style: { top: `${L.value}%` },
|
|
1821
|
+
time: $
|
|
1792
1822
|
};
|
|
1793
|
-
}),
|
|
1794
|
-
var
|
|
1795
|
-
if (
|
|
1796
|
-
const
|
|
1797
|
-
L.value =
|
|
1798
|
-
},
|
|
1823
|
+
}), i = ($) => {
|
|
1824
|
+
var o;
|
|
1825
|
+
if (r.isMonth || r.isYear || r.isYears) return;
|
|
1826
|
+
const W = (((o = $.touches) == null ? void 0 : o[0]) || $).clientY, { top: G } = b.value.getBoundingClientRect();
|
|
1827
|
+
L.value = Je(W - G, b.value);
|
|
1828
|
+
}, m = () => {
|
|
1799
1829
|
L.value = null;
|
|
1800
1830
|
};
|
|
1801
|
-
return
|
|
1802
|
-
|
|
1803
|
-
}),
|
|
1804
|
-
|
|
1805
|
-
}), (
|
|
1831
|
+
return Ze(() => {
|
|
1832
|
+
b.value.addEventListener("mousemove", i), b.value.addEventListener("touchmove", i), b.value.addEventListener("mouseleave", m), b.value.addEventListener("touchend", m);
|
|
1833
|
+
}), Xe(() => {
|
|
1834
|
+
b.value && (b.value.removeEventListener("mousemove", i), b.value.removeEventListener("touchmove", i), b.value.removeEventListener("mouseleave", m), b.value.removeEventListener("touchend", m));
|
|
1835
|
+
}), ($, W) => (E(), j("div", {
|
|
1806
1836
|
class: "vuecal__body",
|
|
1807
1837
|
ref_key: "bodyEl",
|
|
1808
|
-
ref:
|
|
1809
|
-
style:
|
|
1838
|
+
ref: b,
|
|
1839
|
+
style: Te(v.value)
|
|
1810
1840
|
}, [
|
|
1811
|
-
|
|
1812
|
-
default:
|
|
1813
|
-
|
|
1841
|
+
Oe(Ge, { name: "vuecal-shrink" }, {
|
|
1842
|
+
default: J(() => [
|
|
1843
|
+
O(h).timeAtCursor && L.value !== null ? (E(), j("div", {
|
|
1814
1844
|
key: 0,
|
|
1815
1845
|
class: "vuecal__time-at-cursor",
|
|
1816
|
-
style:
|
|
1846
|
+
style: Te(C.value.style)
|
|
1817
1847
|
}, [
|
|
1818
|
-
|
|
1848
|
+
ge("label", null, le(C.value.time), 1)
|
|
1819
1849
|
], 4)) : Z("", !0)
|
|
1820
1850
|
]),
|
|
1821
1851
|
_: 1
|
|
1822
1852
|
}),
|
|
1823
|
-
(
|
|
1824
|
-
key:
|
|
1825
|
-
start:
|
|
1826
|
-
end:
|
|
1827
|
-
index:
|
|
1828
|
-
},
|
|
1829
|
-
|
|
1853
|
+
(E(!0), j(te, null, we(O(r).cellDates, (G, o) => (E(), Se(Qt, {
|
|
1854
|
+
key: o,
|
|
1855
|
+
start: G.start,
|
|
1856
|
+
end: G.end,
|
|
1857
|
+
index: o
|
|
1858
|
+
}, je({ _: 2 }, [
|
|
1859
|
+
$.$slots.cell ? {
|
|
1830
1860
|
name: "cell",
|
|
1831
|
-
fn:
|
|
1832
|
-
F(
|
|
1861
|
+
fn: J((u) => [
|
|
1862
|
+
F($.$slots, "cell", De({ ref_for: !0 }, u))
|
|
1833
1863
|
]),
|
|
1834
1864
|
key: "0"
|
|
1835
1865
|
} : void 0,
|
|
1836
|
-
|
|
1866
|
+
$.$slots["cell-date"] ? {
|
|
1837
1867
|
name: "cell-date",
|
|
1838
|
-
fn:
|
|
1839
|
-
F(
|
|
1868
|
+
fn: J((u) => [
|
|
1869
|
+
F($.$slots, "cell-date", De({ ref_for: !0 }, u))
|
|
1840
1870
|
]),
|
|
1841
1871
|
key: "1"
|
|
1842
1872
|
} : void 0,
|
|
1843
|
-
|
|
1873
|
+
$.$slots["cell-content"] ? {
|
|
1844
1874
|
name: "cell-content",
|
|
1845
|
-
fn:
|
|
1846
|
-
F(
|
|
1875
|
+
fn: J((u) => [
|
|
1876
|
+
F($.$slots, "cell-content", De({ ref_for: !0 }, u))
|
|
1847
1877
|
]),
|
|
1848
1878
|
key: "2"
|
|
1849
1879
|
} : void 0,
|
|
1850
|
-
|
|
1880
|
+
$.$slots["cell-events"] ? {
|
|
1851
1881
|
name: "cell-events",
|
|
1852
|
-
fn:
|
|
1853
|
-
F(
|
|
1882
|
+
fn: J((u) => [
|
|
1883
|
+
F($.$slots, "cell-events", De({ ref_for: !0 }, u))
|
|
1854
1884
|
]),
|
|
1855
1885
|
key: "3"
|
|
1856
|
-
} :
|
|
1886
|
+
} : $.$slots.event ? {
|
|
1857
1887
|
name: "event",
|
|
1858
|
-
fn:
|
|
1859
|
-
F(
|
|
1888
|
+
fn: J((u) => [
|
|
1889
|
+
F($.$slots, "event", De({ ref_for: !0 }, u))
|
|
1860
1890
|
]),
|
|
1861
1891
|
key: "4"
|
|
1862
|
-
} :
|
|
1892
|
+
} : $.$slots["event-count"] ? {
|
|
1863
1893
|
name: "event-count",
|
|
1864
|
-
fn:
|
|
1865
|
-
F(
|
|
1894
|
+
fn: J((u) => [
|
|
1895
|
+
F($.$slots, "event-count", De({ ref_for: !0 }, u))
|
|
1866
1896
|
]),
|
|
1867
1897
|
key: "5"
|
|
1868
1898
|
} : void 0
|
|
1869
1899
|
]), 1032, ["start", "end", "index"]))), 128))
|
|
1870
1900
|
], 4));
|
|
1871
1901
|
}
|
|
1872
|
-
},
|
|
1902
|
+
}, ea = ["data-locale"], ta = { class: "vuecal__scrollable-wrap" }, aa = {
|
|
1873
1903
|
key: 1,
|
|
1874
1904
|
class: "vuecal__week-numbers"
|
|
1875
|
-
},
|
|
1905
|
+
}, na = { class: "vuecal__week-number" }, sa = { class: "vuecal__body-wrap" }, oa = {
|
|
1876
1906
|
__name: "index",
|
|
1877
|
-
props:
|
|
1907
|
+
props: pt,
|
|
1878
1908
|
emits: [
|
|
1879
1909
|
"ready",
|
|
1880
1910
|
"view-change",
|
|
@@ -1884,179 +1914,176 @@ const Ke = (c) => {
|
|
|
1884
1914
|
"update:events",
|
|
1885
1915
|
"event-delete",
|
|
1886
1916
|
"event-created",
|
|
1887
|
-
"event-dropped"
|
|
1888
|
-
"event-change"
|
|
1917
|
+
"event-dropped"
|
|
1889
1918
|
],
|
|
1890
|
-
setup(
|
|
1891
|
-
const
|
|
1919
|
+
setup(D, { expose: n, emit: r }) {
|
|
1920
|
+
const h = D, p = r, b = ot("vuecal-el"), L = yt({ props: h, emit: p, attrs: ut(), vuecalEl: b, uid: it() }), { config: v, view: C, dateUtils: i, touch: m } = L, $ = T(() => v.time && (C.isDay || C.isDays || C.isWeek)), W = T(() => Array(C.rows).fill().map((e, d) => i.getWeek(i.addDays(C.firstCellDate, 7 * d)))), G = T(() => {
|
|
1892
1921
|
var e;
|
|
1893
1922
|
return {
|
|
1894
|
-
"vuecal--ready":
|
|
1895
|
-
[`vuecal--${
|
|
1896
|
-
[`vuecal--${
|
|
1897
|
-
"vuecal--date-picker":
|
|
1898
|
-
"vuecal--dark":
|
|
1899
|
-
"vuecal--light": !
|
|
1900
|
-
[`vuecal--${
|
|
1901
|
-
"vuecal--view-has-time":
|
|
1902
|
-
"vuecal--timeless": !
|
|
1903
|
-
"vuecal--dragging-cell":
|
|
1904
|
-
"vuecal--dragging-event":
|
|
1905
|
-
"vuecal--resizing-event":
|
|
1906
|
-
"vuecal--has-schedules": (e =
|
|
1923
|
+
"vuecal--ready": v.ready,
|
|
1924
|
+
[`vuecal--${v.theme}-theme`]: v.theme,
|
|
1925
|
+
[`vuecal--${v.size}`]: !0,
|
|
1926
|
+
"vuecal--date-picker": v.datePicker,
|
|
1927
|
+
"vuecal--dark": v.dark,
|
|
1928
|
+
"vuecal--light": !v.dark,
|
|
1929
|
+
[`vuecal--${C.id}-view`]: !0,
|
|
1930
|
+
"vuecal--view-has-time": $.value,
|
|
1931
|
+
"vuecal--timeless": !v.time,
|
|
1932
|
+
"vuecal--dragging-cell": m.isDraggingCell,
|
|
1933
|
+
"vuecal--dragging-event": m.isDraggingEvent,
|
|
1934
|
+
"vuecal--resizing-event": m.isResizingEvent,
|
|
1935
|
+
"vuecal--has-schedules": (e = v.schedules) == null ? void 0 : e.length
|
|
1907
1936
|
};
|
|
1908
|
-
}),
|
|
1909
|
-
"--vuecal-time-cell-height":
|
|
1910
|
-
})),
|
|
1911
|
-
var e,
|
|
1937
|
+
}), o = T(() => ({
|
|
1938
|
+
"--vuecal-time-cell-height": v.timeCellHeight && `${v.timeCellHeight}px`
|
|
1939
|
+
})), u = T(() => {
|
|
1940
|
+
var e, d;
|
|
1912
1941
|
return {
|
|
1913
|
-
"vuecal__scrollable--row":
|
|
1942
|
+
"vuecal__scrollable--row": $.value || v.weekNumbers && C.isMonth,
|
|
1914
1943
|
// Keep the states inside the Vue transition wrapper for smooth CSS transitions.
|
|
1915
|
-
[`vuecal__scrollable--${
|
|
1916
|
-
"vuecal__scrollable--has-schedules": (e =
|
|
1917
|
-
"vuecal__scrollable--no-schedules": !((
|
|
1944
|
+
[`vuecal__scrollable--${C.id}-view`]: !0,
|
|
1945
|
+
"vuecal__scrollable--has-schedules": (e = v.schedules) == null ? void 0 : e.length,
|
|
1946
|
+
"vuecal__scrollable--no-schedules": !((d = v.schedules) != null && d.length)
|
|
1918
1947
|
};
|
|
1919
1948
|
});
|
|
1920
|
-
return
|
|
1921
|
-
await Ue(),
|
|
1922
|
-
}),
|
|
1923
|
-
class:
|
|
1949
|
+
return Ze(async () => {
|
|
1950
|
+
await Ue(), v.ready = !0, p("ready", { config: v, view: C });
|
|
1951
|
+
}), ct("vuecal", L), n({ view: L.view }), (e, d) => (E(), j("div", {
|
|
1952
|
+
class: _e(["vuecal", G.value]),
|
|
1924
1953
|
ref: "vuecal-el",
|
|
1925
1954
|
"data-locale": e.locale,
|
|
1926
|
-
style:
|
|
1955
|
+
style: Te(o.value)
|
|
1927
1956
|
}, [
|
|
1928
1957
|
e.$slots.diy ? F(e.$slots, "diy", {
|
|
1929
1958
|
key: 0,
|
|
1930
|
-
vuecal:
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
}) : (S(), j(ae, { key: 1 }, [
|
|
1934
|
-
Me(pt, null, $e({ _: 2 }, [
|
|
1959
|
+
vuecal: O(L)
|
|
1960
|
+
}) : (E(), j(te, { key: 1 }, [
|
|
1961
|
+
Oe(Mt, null, je({ _: 2 }, [
|
|
1935
1962
|
e.$slots.header ? {
|
|
1936
1963
|
name: "header",
|
|
1937
|
-
fn:
|
|
1938
|
-
F(e.$slots, "header", ne(se(
|
|
1964
|
+
fn: J((f) => [
|
|
1965
|
+
F(e.$slots, "header", ne(se(f)))
|
|
1939
1966
|
]),
|
|
1940
1967
|
key: "0"
|
|
1941
1968
|
} : void 0,
|
|
1942
1969
|
!e.$slots.header && e.$slots["previous-button"] ? {
|
|
1943
1970
|
name: "previous-button",
|
|
1944
|
-
fn:
|
|
1945
|
-
F(e.$slots, "previous-button", ne(se(
|
|
1971
|
+
fn: J((f) => [
|
|
1972
|
+
F(e.$slots, "previous-button", ne(se(f)))
|
|
1946
1973
|
]),
|
|
1947
1974
|
key: "1"
|
|
1948
1975
|
} : void 0,
|
|
1949
1976
|
!e.$slots.header && e.$slots["next-button"] ? {
|
|
1950
1977
|
name: "next-button",
|
|
1951
|
-
fn:
|
|
1952
|
-
F(e.$slots, "next-button", ne(se(
|
|
1978
|
+
fn: J((f) => [
|
|
1979
|
+
F(e.$slots, "next-button", ne(se(f)))
|
|
1953
1980
|
]),
|
|
1954
1981
|
key: "2"
|
|
1955
1982
|
} : void 0,
|
|
1956
1983
|
!e.$slots.header && e.$slots["today-button"] ? {
|
|
1957
1984
|
name: "today-button",
|
|
1958
|
-
fn:
|
|
1959
|
-
F(e.$slots, "today-button", ne(se(
|
|
1985
|
+
fn: J((f) => [
|
|
1986
|
+
F(e.$slots, "today-button", ne(se(f)))
|
|
1960
1987
|
]),
|
|
1961
1988
|
key: "3"
|
|
1962
1989
|
} : void 0,
|
|
1963
1990
|
!e.$slots.header && e.$slots.title ? {
|
|
1964
1991
|
name: "title",
|
|
1965
|
-
fn:
|
|
1966
|
-
F(e.$slots, "title", ne(se(
|
|
1992
|
+
fn: J((f) => [
|
|
1993
|
+
F(e.$slots, "title", ne(se(f)))
|
|
1967
1994
|
]),
|
|
1968
1995
|
key: "4"
|
|
1969
1996
|
} : void 0,
|
|
1970
1997
|
!e.$slots.header && e.$slots["schedule-heading"] ? {
|
|
1971
1998
|
name: "schedule-heading",
|
|
1972
|
-
fn:
|
|
1973
|
-
F(e.$slots, "schedule-heading", ne(se(
|
|
1999
|
+
fn: J((f) => [
|
|
2000
|
+
F(e.$slots, "schedule-heading", ne(se(f)))
|
|
1974
2001
|
]),
|
|
1975
2002
|
key: "5"
|
|
1976
2003
|
} : void 0
|
|
1977
2004
|
]), 1024),
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
name: `vuecal-slide-fade--${
|
|
2005
|
+
ge("div", ta, [
|
|
2006
|
+
Oe(Ge, {
|
|
2007
|
+
name: `vuecal-slide-fade--${O(C).transitionDirection}`
|
|
1981
2008
|
}, {
|
|
1982
|
-
default:
|
|
1983
|
-
(
|
|
1984
|
-
class:
|
|
1985
|
-
key:
|
|
2009
|
+
default: J(() => [
|
|
2010
|
+
(E(), j("div", {
|
|
2011
|
+
class: _e(["vuecal__scrollable", u.value]),
|
|
2012
|
+
key: O(C).id + O(C).start.getTime()
|
|
1986
2013
|
}, [
|
|
1987
|
-
|
|
2014
|
+
$.value ? (E(), Se(Lt, { key: 0 }, je({ _: 2 }, [
|
|
1988
2015
|
e.$slots["time-cell"] ? {
|
|
1989
2016
|
name: "time-cell",
|
|
1990
|
-
fn:
|
|
1991
|
-
F(e.$slots, "time-cell", ne(se(
|
|
2017
|
+
fn: J((f) => [
|
|
2018
|
+
F(e.$slots, "time-cell", ne(se(f)))
|
|
1992
2019
|
]),
|
|
1993
2020
|
key: "0"
|
|
1994
2021
|
} : void 0
|
|
1995
2022
|
]), 1024)) : Z("", !0),
|
|
1996
|
-
|
|
1997
|
-
(
|
|
2023
|
+
O(v).weekNumbers && O(C).isMonth ? (E(), j("div", aa, [
|
|
2024
|
+
(E(!0), j(te, null, we(W.value, (f) => (E(), j("div", na, [
|
|
1998
2025
|
F(e.$slots, "week-number", {}, () => [
|
|
1999
|
-
|
|
2026
|
+
ge("small", null, le(f), 1)
|
|
2000
2027
|
])
|
|
2001
2028
|
]))), 256))
|
|
2002
2029
|
])) : Z("", !0),
|
|
2003
|
-
|
|
2004
|
-
|
|
2030
|
+
ge("div", sa, [
|
|
2031
|
+
Oe(Pt, null, je({ _: 2 }, [
|
|
2005
2032
|
e.$slots["weekday-heading"] ? {
|
|
2006
2033
|
name: "weekday-heading",
|
|
2007
|
-
fn:
|
|
2008
|
-
F(e.$slots, "weekday-heading", ne(se(
|
|
2034
|
+
fn: J((f) => [
|
|
2035
|
+
F(e.$slots, "weekday-heading", ne(se(f)))
|
|
2009
2036
|
]),
|
|
2010
2037
|
key: "0"
|
|
2011
2038
|
} : void 0,
|
|
2012
2039
|
e.$slots["schedule-heading"] ? {
|
|
2013
2040
|
name: "schedule-heading",
|
|
2014
|
-
fn:
|
|
2015
|
-
F(e.$slots, "schedule-heading", ne(se(
|
|
2041
|
+
fn: J((f) => [
|
|
2042
|
+
F(e.$slots, "schedule-heading", ne(se(f)))
|
|
2016
2043
|
]),
|
|
2017
2044
|
key: "1"
|
|
2018
2045
|
} : void 0
|
|
2019
2046
|
]), 1024),
|
|
2020
|
-
|
|
2047
|
+
Oe(xt, null, je({ _: 2 }, [
|
|
2021
2048
|
e.$slots.cell ? {
|
|
2022
2049
|
name: "cell",
|
|
2023
|
-
fn:
|
|
2024
|
-
F(e.$slots, "cell", ne(se(
|
|
2050
|
+
fn: J((f) => [
|
|
2051
|
+
F(e.$slots, "cell", ne(se(f)))
|
|
2025
2052
|
]),
|
|
2026
2053
|
key: "0"
|
|
2027
2054
|
} : void 0,
|
|
2028
2055
|
!e.$slots.cell && e.$slots["cell-date"] ? {
|
|
2029
2056
|
name: "cell-date",
|
|
2030
|
-
fn:
|
|
2031
|
-
F(e.$slots, "cell-date", ne(se(
|
|
2057
|
+
fn: J((f) => [
|
|
2058
|
+
F(e.$slots, "cell-date", ne(se(f)))
|
|
2032
2059
|
]),
|
|
2033
2060
|
key: "1"
|
|
2034
2061
|
} : void 0,
|
|
2035
2062
|
!e.$slots.cell && e.$slots["cell-content"] ? {
|
|
2036
2063
|
name: "cell-content",
|
|
2037
|
-
fn:
|
|
2038
|
-
F(e.$slots, "cell-content", ne(se(
|
|
2064
|
+
fn: J((f) => [
|
|
2065
|
+
F(e.$slots, "cell-content", ne(se(f)))
|
|
2039
2066
|
]),
|
|
2040
2067
|
key: "2"
|
|
2041
2068
|
} : void 0,
|
|
2042
2069
|
!e.$slots.cell && e.$slots["cell-events"] ? {
|
|
2043
2070
|
name: "cell-events",
|
|
2044
|
-
fn:
|
|
2045
|
-
F(e.$slots, "cell-events", ne(se(
|
|
2071
|
+
fn: J((f) => [
|
|
2072
|
+
F(e.$slots, "cell-events", ne(se(f)))
|
|
2046
2073
|
]),
|
|
2047
2074
|
key: "3"
|
|
2048
2075
|
} : void 0,
|
|
2049
2076
|
!e.$slots.cell && e.$slots.event ? {
|
|
2050
2077
|
name: "event",
|
|
2051
|
-
fn:
|
|
2052
|
-
F(e.$slots, "event", ne(se(
|
|
2078
|
+
fn: J((f) => [
|
|
2079
|
+
F(e.$slots, "event", ne(se(f)))
|
|
2053
2080
|
]),
|
|
2054
2081
|
key: "4"
|
|
2055
2082
|
} : void 0,
|
|
2056
2083
|
!e.$slots.cell && e.$slots["event-count"] ? {
|
|
2057
2084
|
name: "event-count",
|
|
2058
|
-
fn:
|
|
2059
|
-
F(e.$slots, "event-count", ne(se(
|
|
2085
|
+
fn: J((f) => [
|
|
2086
|
+
F(e.$slots, "event-count", ne(se(f)))
|
|
2060
2087
|
]),
|
|
2061
2088
|
key: "5"
|
|
2062
2089
|
} : void 0
|
|
@@ -2068,63 +2095,63 @@ const Ke = (c) => {
|
|
|
2068
2095
|
}, 8, ["name"])
|
|
2069
2096
|
])
|
|
2070
2097
|
], 64))
|
|
2071
|
-
], 14,
|
|
2098
|
+
], 14, ea));
|
|
2072
2099
|
}
|
|
2073
|
-
},
|
|
2074
|
-
|
|
2100
|
+
}, ia = (D) => {
|
|
2101
|
+
Fe.texts = { ...fe.texts, ...D }, Fe.dateUtils.updateTexts(Fe.texts);
|
|
2075
2102
|
}, {
|
|
2076
|
-
addDatePrototypes:
|
|
2077
|
-
removeDatePrototypes:
|
|
2078
|
-
updateTexts:
|
|
2079
|
-
addDays:
|
|
2080
|
-
subtractDays:
|
|
2081
|
-
addHours:
|
|
2082
|
-
subtractHours:
|
|
2083
|
-
addMinutes:
|
|
2084
|
-
subtractMinutes:
|
|
2085
|
-
getWeek:
|
|
2086
|
-
isToday:
|
|
2087
|
-
isSameDate:
|
|
2088
|
-
isInRange:
|
|
2089
|
-
isLeapYear:
|
|
2090
|
-
getPreviousFirstDayOfWeek:
|
|
2091
|
-
stringToDate:
|
|
2092
|
-
dateToMinutes:
|
|
2093
|
-
countDays:
|
|
2094
|
-
datesInSameTimeStep:
|
|
2095
|
-
isValid:
|
|
2096
|
-
formatDate:
|
|
2097
|
-
formatDateLite:
|
|
2098
|
-
formatTime:
|
|
2099
|
-
formatTimeLite:
|
|
2100
|
-
formatMinutes:
|
|
2101
|
-
} =
|
|
2103
|
+
addDatePrototypes: ua,
|
|
2104
|
+
removeDatePrototypes: ca,
|
|
2105
|
+
updateTexts: da,
|
|
2106
|
+
addDays: va,
|
|
2107
|
+
subtractDays: ma,
|
|
2108
|
+
addHours: fa,
|
|
2109
|
+
subtractHours: ga,
|
|
2110
|
+
addMinutes: ha,
|
|
2111
|
+
subtractMinutes: ya,
|
|
2112
|
+
getWeek: Da,
|
|
2113
|
+
isToday: pa,
|
|
2114
|
+
isSameDate: wa,
|
|
2115
|
+
isInRange: _a,
|
|
2116
|
+
isLeapYear: ka,
|
|
2117
|
+
getPreviousFirstDayOfWeek: ba,
|
|
2118
|
+
stringToDate: Ta,
|
|
2119
|
+
dateToMinutes: $a,
|
|
2120
|
+
countDays: Ma,
|
|
2121
|
+
datesInSameTimeStep: Ya,
|
|
2122
|
+
isValid: Ea,
|
|
2123
|
+
formatDate: Sa,
|
|
2124
|
+
formatDateLite: Ca,
|
|
2125
|
+
formatTime: Va,
|
|
2126
|
+
formatTimeLite: Oa,
|
|
2127
|
+
formatMinutes: ja
|
|
2128
|
+
} = Fe.dateUtils;
|
|
2102
2129
|
export {
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
+
oa as VueCal,
|
|
2131
|
+
ua as addDatePrototypes,
|
|
2132
|
+
va as addDays,
|
|
2133
|
+
fa as addHours,
|
|
2134
|
+
ha as addMinutes,
|
|
2135
|
+
Ma as countDays,
|
|
2136
|
+
$a as dateToMinutes,
|
|
2137
|
+
Ya as datesInSameTimeStep,
|
|
2138
|
+
Sa as formatDate,
|
|
2139
|
+
Ca as formatDateLite,
|
|
2140
|
+
ja as formatMinutes,
|
|
2141
|
+
Va as formatTime,
|
|
2142
|
+
Oa as formatTimeLite,
|
|
2143
|
+
ba as getPreviousFirstDayOfWeek,
|
|
2144
|
+
Da as getWeek,
|
|
2145
|
+
_a as isInRange,
|
|
2146
|
+
ka as isLeapYear,
|
|
2147
|
+
wa as isSameDate,
|
|
2148
|
+
pa as isToday,
|
|
2149
|
+
Ea as isValidDate,
|
|
2150
|
+
ca as removeDatePrototypes,
|
|
2151
|
+
Ta as stringToDate,
|
|
2152
|
+
ma as subtractDays,
|
|
2153
|
+
ga as subtractHours,
|
|
2154
|
+
ya as subtractMinutes,
|
|
2155
|
+
da as updateTexts,
|
|
2156
|
+
ia as useLocale
|
|
2130
2157
|
};
|