vue-cal 5.0.1-rc.4 → 5.0.1-rc.6
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 +1 -1
- package/dist/vue-cal.es.js +321 -315
- package/dist/vue-cal.umd.js +3 -3
- package/package.json +7 -3
package/dist/vue-cal.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { computed as T, reactive as $e, watch as me, toRefs as lt, ref as ie, onBeforeUnmount as Xe, inject as Ne, createElementBlock as j, openBlock as
|
|
1
|
+
import { computed as T, reactive as $e, watch as me, toRefs as lt, ref as ie, onBeforeUnmount as Xe, inject as Ne, createElementBlock as j, openBlock as E, renderSlot as F, createCommentVNode as U, unref as C, Fragment as te, renderList as pe, normalizeClass as ke, createElementVNode as ge, createVNode as Oe, Transition as Ge, withCtx as Z, createBlock as Se, resolveDynamicComponent as Ke, mergeProps as ye, toHandlers as Ie, normalizeProps as se, guardReactiveProps as ne, 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 rt, useId as it, useAttrs as ot, provide as ut } from "vue";
|
|
2
2
|
/**
|
|
3
|
-
* vue-cal v5.0.1-rc.
|
|
3
|
+
* vue-cal v5.0.1-rc.6
|
|
4
4
|
* (c) 2024-2025 Antoni Andre <antoniandre.web@gmail.com>
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
@@ -69,7 +69,7 @@ const fe = {
|
|
|
69
69
|
const { cols: K, rows: oe } = fe.availableViews[P];
|
|
70
70
|
return O[P] = { cols: I.cols || K, rows: I.rows || oe }, O;
|
|
71
71
|
}, {})), n && console.warn("Vue Cal: the provided `views` prop contains invalid views that will be ignored."), Object.keys(k).length || (console.warn("Vue Cal: No valid view in the provided `views` prop. Falling back to default views."), k = { ...fe.availableViews })) : k = { ...fe.availableViews }, k);
|
|
72
|
-
}),
|
|
72
|
+
}), G = T(() => s.datePicker ? "month" : N.value.week ? "week" : Object.keys(N.value)[0]), u = T(() => {
|
|
73
73
|
if (typeof s.selectedDate == "string") return D.stringToDate(s.selectedDate);
|
|
74
74
|
if (s.selectedDate instanceof Date) return s.selectedDate;
|
|
75
75
|
s.selectedDate ? console.warn("Vue Cal: The provided selected date is invalid:", s.selectedDate) : console.log("Vue Cal: Info - The provided selected date is undefined.");
|
|
@@ -89,11 +89,11 @@ const fe = {
|
|
|
89
89
|
}), v = T(() => {
|
|
90
90
|
let l = null;
|
|
91
91
|
return s.maxDate && typeof s.maxDate == "string" ? l = D.stringToDate(s.maxDate) : s.maxDate && s.maxDate instanceof Date && (l = s.maxDate), (l == null ? void 0 : l.getTime()) || null;
|
|
92
|
-
}),
|
|
92
|
+
}), y = T(() => {
|
|
93
93
|
var k;
|
|
94
94
|
const { view: l } = c;
|
|
95
95
|
return s.schedules.length && (l.isDay || l.isDays || l.isWeek) && ((k = s.schedules) == null ? void 0 : k.map((t, O) => ({ ...t, id: t.id ?? O + 1 }))) || void 0;
|
|
96
|
-
}),
|
|
96
|
+
}), Y = T(() => {
|
|
97
97
|
const l = {
|
|
98
98
|
drag: !0,
|
|
99
99
|
resize: !0,
|
|
@@ -119,7 +119,7 @@ const fe = {
|
|
|
119
119
|
events: B,
|
|
120
120
|
// All the events listeners for cells and events that the end user may have attached to vue-cal.
|
|
121
121
|
eventListeners: o,
|
|
122
|
-
defaultView:
|
|
122
|
+
defaultView: G,
|
|
123
123
|
availableViews: N,
|
|
124
124
|
disableDays: d,
|
|
125
125
|
ready: w,
|
|
@@ -130,9 +130,9 @@ const fe = {
|
|
|
130
130
|
hideWeekends: b,
|
|
131
131
|
minTimestamp: e,
|
|
132
132
|
maxTimestamp: v,
|
|
133
|
-
schedules:
|
|
133
|
+
schedules: y,
|
|
134
134
|
selectedDate: u,
|
|
135
|
-
editableEvents:
|
|
135
|
+
editableEvents: Y,
|
|
136
136
|
view: _,
|
|
137
137
|
// Getters.
|
|
138
138
|
get hasHiddenDays() {
|
|
@@ -162,44 +162,44 @@ const we = $e({ el: null, cell: null, timeout: null }), be = $e({
|
|
|
162
162
|
function mt(c) {
|
|
163
163
|
const { config: s, view: i, eventsManager: D, emit: w, uid: _, dateUtils: z } = c, m = (e) => {
|
|
164
164
|
var n;
|
|
165
|
-
const { timeStep: v, timeCellHeight:
|
|
165
|
+
const { timeStep: v, timeCellHeight: y, timeFrom: Y } = s, L = (((n = e.touches) == null ? void 0 : n[0]) || e).clientY, { top: B } = e.currentTarget.getBoundingClientRect(), l = L - B - ~~e.dataTransfer.getData("cursor-grab-at");
|
|
166
166
|
return Pe(Je(l, e.currentTarget), s);
|
|
167
|
-
}, V = (e, v,
|
|
168
|
-
const
|
|
167
|
+
}, V = (e, v, y) => {
|
|
168
|
+
const Y = v.duration || o(v.start, v.end) || s.timeStep;
|
|
169
169
|
let L = Math.max(m(e), 0);
|
|
170
170
|
if (s.snapToInterval) {
|
|
171
171
|
const k = L + s.snapToInterval / 2;
|
|
172
172
|
L = k - k % s.snapToInterval;
|
|
173
173
|
}
|
|
174
|
-
const B = new Date(new Date(
|
|
174
|
+
const B = new Date(new Date(y).setMinutes(L)), l = Math.min(L + Y, 24 * 60), n = new Date(new Date(y).setMinutes(l));
|
|
175
175
|
return { start: B, end: n };
|
|
176
176
|
}, o = (e, v) => Math.round((v - e) / 6e4);
|
|
177
177
|
return {
|
|
178
178
|
eventDragStart: (e, v) => {
|
|
179
179
|
if (e.target.nodeType === 3 || c.touch.isResizingEvent) return e.preventDefault();
|
|
180
180
|
e.dataTransfer.dropEffect = "move";
|
|
181
|
-
const
|
|
182
|
-
e.dataTransfer.setData("event", JSON.stringify(
|
|
183
|
-
const
|
|
184
|
-
|
|
185
|
-
|
|
181
|
+
const y = { ...v, _: { id: v._.id, duration: o(v.start, v.end) } };
|
|
182
|
+
e.dataTransfer.setData("event", JSON.stringify(y)), e.dataTransfer.setData("cursor-grab-at", e.offsetY), be.eventId = v._.id, be.fromVueCal = _;
|
|
183
|
+
const Y = e.target.closest(".vuecal__event");
|
|
184
|
+
Y.classList.add("vuecal__event--dragging-ghost"), setTimeout(() => {
|
|
185
|
+
Y.classList.add("vuecal__event--dragging-original"), Y.classList.remove("vuecal__event--dragging-ghost");
|
|
186
186
|
}, 0), tt = !1, Object.assign(Ae, { id: i.id, date: i.firstCellDate }), qe = !0, c.touch.isDraggingEvent = !0;
|
|
187
187
|
},
|
|
188
188
|
eventDragEnd: (e, v) => {
|
|
189
189
|
be.eventId = null, e.target.closest(".vuecal__event").classList.remove("vuecal__event--dragging-original");
|
|
190
|
-
const { fromVueCal:
|
|
191
|
-
|
|
190
|
+
const { fromVueCal: y, toVueCal: Y } = be;
|
|
191
|
+
Y && y !== Y && D.deleteEvent(v._.id, 3), be.fromVueCal = null, be.toVueCal = null, tt && qe && Ae.id && i.switchView(Ae.id, Ae.date, !0), c.touch.isDraggingEvent = !1;
|
|
192
192
|
},
|
|
193
193
|
cellDragEnter: (e, v) => {
|
|
194
|
-
const { start:
|
|
194
|
+
const { start: y } = v, Y = e.currentTarget;
|
|
195
195
|
if (!e.currentTarget.contains(e.relatedTarget)) {
|
|
196
|
-
if (
|
|
197
|
-
we.el && (we.cell.highlighted = !1), Object.assign(we, { el:
|
|
196
|
+
if (Y === we.el || !Y.className.includes("vuecal__cell-content")) return !1;
|
|
197
|
+
we.el && (we.cell.highlighted = !1), Object.assign(we, { el: Y, cell: v, timeout: clearTimeout(we.timeout) }), v.highlighted = !0, ["years", "year", "month"].includes(i.id) && (we.timeout = setTimeout(() => c.switchToNarrowerView(y), 2e3));
|
|
198
198
|
}
|
|
199
199
|
},
|
|
200
200
|
cellDragOver: (e, v) => {
|
|
201
|
-
const { start:
|
|
202
|
-
e.preventDefault(), v.highlighted = !0, (
|
|
201
|
+
const { start: y, schedule: Y } = v;
|
|
202
|
+
e.preventDefault(), v.highlighted = !0, (Y || Y === 0) && (v.highlightedSchedule = Y);
|
|
203
203
|
},
|
|
204
204
|
cellDragLeave: (e, v) => {
|
|
205
205
|
e.preventDefault(), !e.currentTarget.contains(e.relatedTarget) && (v.highlightedSchedule = !1, we.cell === v && (clearTimeout(we.timeout), Object.assign(we, { el: null, cell: null, timeout: null }), v.highlighted = !1));
|
|
@@ -207,37 +207,43 @@ function mt(c) {
|
|
|
207
207
|
cellDragDrop: async (e, v) => {
|
|
208
208
|
var O, P, I;
|
|
209
209
|
e.preventDefault(), clearTimeout(we.timeout), Object.assign(we, { el: null, cell: null, timeout: null });
|
|
210
|
-
const
|
|
211
|
-
|
|
212
|
-
let
|
|
213
|
-
const { start: L, end: B } = V(e,
|
|
210
|
+
const y = JSON.parse(e.dataTransfer.getData("event") || "{}");
|
|
211
|
+
y.start && (y.start = new Date(y.start)), y.end && (y.end = new Date(y.end));
|
|
212
|
+
let Y;
|
|
213
|
+
const { start: L, end: B } = V(e, y, v.start), { schedule: l } = ((O = e.target.closest("[data-schedule]")) == null ? void 0 : O.dataset) || {};
|
|
214
214
|
let n = () => {
|
|
215
215
|
};
|
|
216
|
-
be.fromVueCal === _ ? (
|
|
217
|
-
|
|
218
|
-
})) : (
|
|
219
|
-
...
|
|
216
|
+
be.fromVueCal === _ ? (Y = D.getEvent(y._.id), Y && (Y._.dragging = !1, n = () => {
|
|
217
|
+
Y.start = L, Y.end = B, l !== void 0 && (Y.schedule = ~~l);
|
|
218
|
+
})) : (Y = {
|
|
219
|
+
...y,
|
|
220
220
|
start: L,
|
|
221
221
|
end: B,
|
|
222
222
|
...l !== void 0 && { schedule: ~~l },
|
|
223
|
-
_: { id: ((P =
|
|
223
|
+
_: { id: ((P = y._) == null ? void 0 : P.id) || y.id, duration: o(L, B) },
|
|
224
224
|
getOverlappingEvents: () => D.getEventsInRange(
|
|
225
225
|
D.getEventsByDate(z.formatDate(L), !0),
|
|
226
226
|
{ start: L, end: B },
|
|
227
227
|
{ schedule: ~~l }
|
|
228
228
|
)
|
|
229
229
|
}, n = () => {
|
|
230
|
-
|
|
230
|
+
Y = D.createEvent(Y);
|
|
231
231
|
});
|
|
232
232
|
let k = !0;
|
|
233
233
|
const { drop: t } = (I = s.eventListeners) == null ? void 0 : I.event;
|
|
234
234
|
t && (k = await t({
|
|
235
235
|
e,
|
|
236
|
-
event: { ...
|
|
237
|
-
overlaps:
|
|
236
|
+
event: { ...Y, start: L, end: B, schedule: ~~l },
|
|
237
|
+
overlaps: Y.getOverlappingEvents({ start: L, end: B, schedule: ~~l }),
|
|
238
238
|
cell: v,
|
|
239
239
|
external: be.fromVueCal !== _
|
|
240
|
-
})), k !== !1 && n(), v.highlighted = !1, v.highlightedSchedule = null, qe = !1, be.toVueCal = _, w("event-dropped", {
|
|
240
|
+
})), k !== !1 && n(), v.highlighted = !1, v.highlightedSchedule = null, qe = !1, be.toVueCal = _, w("event-dropped", {
|
|
241
|
+
e,
|
|
242
|
+
cell: v,
|
|
243
|
+
event: Y,
|
|
244
|
+
originalEvent: y,
|
|
245
|
+
external: be.fromVueCal !== _
|
|
246
|
+
});
|
|
241
247
|
}
|
|
242
248
|
};
|
|
243
249
|
}
|
|
@@ -249,7 +255,7 @@ const st = (c) => {
|
|
|
249
255
|
}, Date.prototype.subtractDays = function(a) {
|
|
250
256
|
return N(this, a || 0);
|
|
251
257
|
}, Date.prototype.addHours = function(a) {
|
|
252
|
-
return
|
|
258
|
+
return G(this, a || 0);
|
|
253
259
|
}, Date.prototype.subtractHours = function(a) {
|
|
254
260
|
return u(this, a || 0);
|
|
255
261
|
}, Date.prototype.addMinutes = function(a) {
|
|
@@ -257,9 +263,9 @@ const st = (c) => {
|
|
|
257
263
|
}, Date.prototype.subtractMinutes = function(a) {
|
|
258
264
|
return e(this, a || 0);
|
|
259
265
|
}, Date.prototype.getWeek = function() {
|
|
260
|
-
return
|
|
266
|
+
return y(this);
|
|
261
267
|
}, Date.prototype.isToday = function() {
|
|
262
|
-
return
|
|
268
|
+
return Y(this);
|
|
263
269
|
}, Date.prototype.isLeapYear = function() {
|
|
264
270
|
return l(this);
|
|
265
271
|
}, Date.prototype.format = function(a = "YYYY-MM-DD") {
|
|
@@ -270,108 +276,108 @@ const st = (c) => {
|
|
|
270
276
|
}, V = () => {
|
|
271
277
|
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;
|
|
272
278
|
}, o = (a) => z.value = a, f = () => (i !== (/* @__PURE__ */ new Date()).getDate() && (s = /* @__PURE__ */ new Date(), i = s.getDate(), D = `${s.getFullYear()}-${s.getMonth()}-${s.getDate()}`), D), b = (a, p) => {
|
|
273
|
-
const
|
|
274
|
-
return
|
|
279
|
+
const h = new Date(a.valueOf());
|
|
280
|
+
return h.setDate(h.getDate() + p), h;
|
|
275
281
|
}, N = (a, p) => {
|
|
276
|
-
const
|
|
277
|
-
return
|
|
278
|
-
},
|
|
279
|
-
const
|
|
280
|
-
return
|
|
282
|
+
const h = new Date(a.valueOf());
|
|
283
|
+
return h.setDate(h.getDate() - p), h;
|
|
284
|
+
}, G = (a, p) => {
|
|
285
|
+
const h = new Date(a.valueOf());
|
|
286
|
+
return h.setHours(h.getHours() + p), h;
|
|
281
287
|
}, u = (a, p) => {
|
|
282
|
-
const
|
|
283
|
-
return
|
|
288
|
+
const h = new Date(a.valueOf());
|
|
289
|
+
return h.setHours(h.getHours() - p), h;
|
|
284
290
|
}, d = (a, p) => {
|
|
285
|
-
const
|
|
286
|
-
return
|
|
291
|
+
const h = new Date(a.valueOf());
|
|
292
|
+
return h.setMinutes(h.getMinutes() + p), h;
|
|
287
293
|
}, e = (a, p) => {
|
|
288
|
-
const
|
|
289
|
-
return
|
|
294
|
+
const h = new Date(a.valueOf());
|
|
295
|
+
return h.setMinutes(h.getMinutes() - p), h;
|
|
290
296
|
}, v = (a, p) => {
|
|
291
|
-
const
|
|
292
|
-
const J =
|
|
293
|
-
return J !== 0 && (
|
|
297
|
+
const h = (q) => {
|
|
298
|
+
const J = q % p;
|
|
299
|
+
return J !== 0 && (q += J >= p / 2 ? p - J : -J), q;
|
|
294
300
|
};
|
|
295
|
-
if (typeof a == "number") return
|
|
301
|
+
if (typeof a == "number") return h(a);
|
|
296
302
|
if (a instanceof Date) {
|
|
297
|
-
let
|
|
298
|
-
|
|
303
|
+
let q = h(a.getMinutes());
|
|
304
|
+
q >= 60 && (a.setHours(a.getHours() + 1), q = 0), a.setMinutes(q, 0, 0);
|
|
299
305
|
}
|
|
300
|
-
},
|
|
301
|
-
const
|
|
302
|
-
|
|
303
|
-
const J = new Date(Date.UTC(
|
|
304
|
-
return Math.ceil(((
|
|
305
|
-
},
|
|
306
|
+
}, y = (a, p = !1) => {
|
|
307
|
+
const h = new Date(Date.UTC(a.getFullYear(), a.getMonth(), a.getDate())), q = h.getUTCDay() || 7;
|
|
308
|
+
h.setUTCDate(h.getUTCDate() + 4 - q);
|
|
309
|
+
const J = new Date(Date.UTC(h.getUTCFullYear(), 0, 1));
|
|
310
|
+
return Math.ceil(((h - J) / 864e5 + 1) / 7) + (p ? 1 : 0);
|
|
311
|
+
}, Y = (a) => `${a.getFullYear()}-${a.getMonth()}-${a.getDate()}` === f(), L = (a, p) => {
|
|
306
312
|
if (!a || !p) return console.warn(`Vue Cal: missing date${a ? "2" : "1"} parameter for comparison with \`isSameDate(date1, date2)\`.`);
|
|
307
313
|
if (I(a)) {
|
|
308
314
|
if (!I(p)) return console.warn(`Vue Cal: invalid date2 provided for comparison with \`isSameDate(date1, date2)\`: \`${p}\`.`);
|
|
309
315
|
} else return console.warn(`Vue Cal: invalid date1 provided for comparison with \`isSameDate(date1, date2)\`: \`${a}\`.`);
|
|
310
316
|
return a.getFullYear() === p.getFullYear() && a.getMonth() === p.getMonth() && a.getDate() === p.getDate();
|
|
311
|
-
}, B = (a, p,
|
|
317
|
+
}, B = (a, p, h) => I(a) ? a.getTime() >= p && a.getTime() <= h : console.warn(`Vue Cal: invalid date provided to \`isInRange(date, rangeStart, rangeEnd)\`: \`${a}\`.`), l = (a) => {
|
|
312
318
|
const p = a.getFullYear();
|
|
313
319
|
return !(p % 400) || p % 100 && !(p % 4);
|
|
314
320
|
}, n = (a = null, p) => {
|
|
315
|
-
const
|
|
316
|
-
return
|
|
321
|
+
const h = a && new Date(a.valueOf()) || /* @__PURE__ */ new Date(), q = p ? 7 : 6;
|
|
322
|
+
return h.setDate(h.getDate() - (h.getDay() + q) % 7), h;
|
|
317
323
|
}, k = (a) => a instanceof Date ? a : (a.length === 10 && (a += " 00:00"), new Date(a.replace(/-/g, "/"))), t = (a) => a.getHours() * 60 + a.getMinutes(), O = (a, p) => {
|
|
318
324
|
typeof a == "string" && (a = a.replace(/-/g, "/")), typeof p == "string" && (p = p.replace(/-/g, "/")), a = new Date(a).setHours(0, 0, 0, 0), p = new Date(p).setHours(0, 0, 1, 0);
|
|
319
|
-
const
|
|
320
|
-
return Math.ceil((p - a -
|
|
321
|
-
}, P = (a, p,
|
|
322
|
-
if (
|
|
325
|
+
const h = (new Date(p).getTimezoneOffset() - new Date(a).getTimezoneOffset()) * 60 * 1e3;
|
|
326
|
+
return Math.ceil((p - a - h) / (24 * 3600 * 1e3));
|
|
327
|
+
}, P = (a, p, h) => Math.abs(a.getTime() - p.getTime()) <= h * 60 * 1e3, I = (a) => a && a instanceof Date && !isNaN(a), K = (a, p = "YYYY-MM-DD", h = null) => {
|
|
328
|
+
if (h || (h = z.value), p || (p = "YYYY-MM-DD"), p === "YYYY-MM-DD") return oe(a);
|
|
323
329
|
w = {}, _ = {};
|
|
324
|
-
const
|
|
325
|
-
YYYY: () => Q(a,
|
|
326
|
-
YY: () => Q(a,
|
|
327
|
-
M: () => Q(a,
|
|
328
|
-
MM: () => Q(a,
|
|
329
|
-
MMM: () => Q(a,
|
|
330
|
-
MMMM: () => Q(a,
|
|
331
|
-
MMMMG: () => Q(a,
|
|
332
|
-
D: () => Q(a,
|
|
333
|
-
DD: () => Q(a,
|
|
334
|
-
S: () => Q(a,
|
|
335
|
-
d: () => Q(a,
|
|
336
|
-
dd: () => Q(a,
|
|
337
|
-
ddd: () => Q(a,
|
|
338
|
-
dddd: () => Q(a,
|
|
339
|
-
HH: () => ue(a,
|
|
340
|
-
H: () => ue(a,
|
|
341
|
-
hh: () => ue(a,
|
|
342
|
-
h: () => ue(a,
|
|
343
|
-
am: () => ue(a,
|
|
344
|
-
AM: () => ue(a,
|
|
345
|
-
mm: () => ue(a,
|
|
346
|
-
m: () => ue(a,
|
|
347
|
-
s: () => ue(a,
|
|
330
|
+
const q = {
|
|
331
|
+
YYYY: () => Q(a, h).YYYY,
|
|
332
|
+
YY: () => Q(a, h).YY(),
|
|
333
|
+
M: () => Q(a, h).M,
|
|
334
|
+
MM: () => Q(a, h).MM(),
|
|
335
|
+
MMM: () => Q(a, h).MMM(),
|
|
336
|
+
MMMM: () => Q(a, h).MMMM(),
|
|
337
|
+
MMMMG: () => Q(a, h).MMMMG(),
|
|
338
|
+
D: () => Q(a, h).D,
|
|
339
|
+
DD: () => Q(a, h).DD(),
|
|
340
|
+
S: () => Q(a, h).S(),
|
|
341
|
+
d: () => Q(a, h).d,
|
|
342
|
+
dd: () => Q(a, h).dd(),
|
|
343
|
+
ddd: () => Q(a, h).ddd(),
|
|
344
|
+
dddd: () => Q(a, h).dddd(),
|
|
345
|
+
HH: () => ue(a, h).HH,
|
|
346
|
+
H: () => ue(a, h).H,
|
|
347
|
+
hh: () => ue(a, h).hh,
|
|
348
|
+
h: () => ue(a, h).h,
|
|
349
|
+
am: () => ue(a, h).am,
|
|
350
|
+
AM: () => ue(a, h).AM,
|
|
351
|
+
mm: () => ue(a, h).mm,
|
|
352
|
+
m: () => ue(a, h).m,
|
|
353
|
+
s: () => ue(a, h).s
|
|
348
354
|
};
|
|
349
355
|
return p.replace(/(\{[a-zA-Z]+\}|[a-zA-Z]+)/g, (J, ce) => {
|
|
350
|
-
const r =
|
|
356
|
+
const r = q[ce.replace(/\{|\}/g, "")];
|
|
351
357
|
return r !== void 0 ? r() : ce;
|
|
352
358
|
});
|
|
353
359
|
}, oe = (a) => {
|
|
354
|
-
const p = a.getMonth() + 1,
|
|
355
|
-
return `${a.getFullYear()}-${p < 10 ? "0" : ""}${p}-${
|
|
356
|
-
}, ae = (a, p = "HH:mm",
|
|
360
|
+
const p = a.getMonth() + 1, h = a.getDate();
|
|
361
|
+
return `${a.getFullYear()}-${p < 10 ? "0" : ""}${p}-${h < 10 ? "0" : ""}${h}`;
|
|
362
|
+
}, ae = (a, p = "HH:mm", h = null, q = !1) => {
|
|
357
363
|
let J = !1;
|
|
358
|
-
if (
|
|
364
|
+
if (q) {
|
|
359
365
|
const [$, S, M] = [a.getHours(), a.getMinutes(), a.getSeconds()];
|
|
360
366
|
$ + S + M === 141 && (J = !0);
|
|
361
367
|
}
|
|
362
368
|
if (a instanceof Date && p === "HH:mm") return J ? "24:00" : re(a);
|
|
363
|
-
_ = {},
|
|
364
|
-
const ce = ue(a,
|
|
369
|
+
_ = {}, h || (h = z.value);
|
|
370
|
+
const ce = ue(a, h), r = p.replace(/(\{[a-zA-Z]+\}|[a-zA-Z]+)/g, ($, S) => {
|
|
365
371
|
const M = ce[S.replace(/\{|\}/g, "")];
|
|
366
372
|
return M !== void 0 ? M : S;
|
|
367
373
|
});
|
|
368
374
|
return J ? r.replace("23:59", "24:00") : r;
|
|
369
375
|
}, re = (a) => {
|
|
370
|
-
const p = a.getHours(),
|
|
371
|
-
return `${(p < 10 ? "0" : "") + p}:${(
|
|
376
|
+
const p = a.getHours(), h = a.getMinutes();
|
|
377
|
+
return `${(p < 10 ? "0" : "") + p}:${(h < 10 ? "0" : "") + h}`;
|
|
372
378
|
}, De = (a) => {
|
|
373
|
-
const p = Math.floor(a / 60).toString().padStart(2, 0),
|
|
374
|
-
return `${p}:${
|
|
379
|
+
const p = Math.floor(a / 60).toString().padStart(2, 0), h = (a % 60).toString().padStart(2, 0);
|
|
380
|
+
return `${p}:${h}`;
|
|
375
381
|
}, x = (a) => {
|
|
376
382
|
if (a > 3 && a < 21) return "th";
|
|
377
383
|
switch (a % 10) {
|
|
@@ -386,23 +392,23 @@ const st = (c) => {
|
|
|
386
392
|
}
|
|
387
393
|
}, Q = (a, p) => {
|
|
388
394
|
if (w.D) return w;
|
|
389
|
-
const
|
|
395
|
+
const h = a.getFullYear(), q = a.getMonth() + 1, J = a.getDate(), r = (a.getDay() - 1 + 7) % 7;
|
|
390
396
|
return w = {
|
|
391
397
|
// Year.
|
|
392
|
-
YYYY:
|
|
398
|
+
YYYY: h,
|
|
393
399
|
// 2024.
|
|
394
|
-
YY: () =>
|
|
400
|
+
YY: () => h.toString().substring(2),
|
|
395
401
|
// 24.
|
|
396
402
|
// Month.
|
|
397
|
-
M:
|
|
403
|
+
M: q,
|
|
398
404
|
// 1 to 12.
|
|
399
|
-
MM: () =>
|
|
405
|
+
MM: () => q.toString().padStart(2, 0),
|
|
400
406
|
// 01 to 12.
|
|
401
|
-
MMM: () => p.months[
|
|
407
|
+
MMM: () => p.months[q - 1].substring(0, 3),
|
|
402
408
|
// Jan to Dec.
|
|
403
|
-
MMMM: () => p.months[
|
|
409
|
+
MMMM: () => p.months[q - 1],
|
|
404
410
|
// January to December.
|
|
405
|
-
MMMMG: () => (p.monthsGenitive || p.months)[
|
|
411
|
+
MMMMG: () => (p.monthsGenitive || p.months)[q - 1],
|
|
406
412
|
// January to December in genitive form (Greek...)
|
|
407
413
|
// Day.
|
|
408
414
|
D: J,
|
|
@@ -424,18 +430,18 @@ const st = (c) => {
|
|
|
424
430
|
}, w;
|
|
425
431
|
}, ue = (a, p) => {
|
|
426
432
|
if (_.am) return _;
|
|
427
|
-
let
|
|
428
|
-
a instanceof Date ? (
|
|
429
|
-
const ce =
|
|
433
|
+
let h, q, J;
|
|
434
|
+
a instanceof Date ? (h = a.getHours(), q = a.getMinutes(), J = a.getSeconds()) : (h = Math.floor(a / 60), q = Math.floor(a % 60));
|
|
435
|
+
const ce = h % 12 ? h % 12 : 12, r = (p || { am: "am", pm: "pm" })[h === 24 || h < 12 ? "am" : "pm"];
|
|
430
436
|
return _ = {
|
|
431
|
-
H:
|
|
437
|
+
H: h,
|
|
432
438
|
h: ce,
|
|
433
|
-
HH:
|
|
439
|
+
HH: h.toString().padStart(2, 0),
|
|
434
440
|
hh: ce.toString().padStart(2, 0),
|
|
435
441
|
am: r,
|
|
436
442
|
AM: r.toUpperCase(),
|
|
437
|
-
m:
|
|
438
|
-
mm:
|
|
443
|
+
m: q,
|
|
444
|
+
mm: q.toString().padStart(2, 0),
|
|
439
445
|
s: J
|
|
440
446
|
}, _;
|
|
441
447
|
};
|
|
@@ -445,13 +451,13 @@ const st = (c) => {
|
|
|
445
451
|
updateTexts: o,
|
|
446
452
|
addDays: b,
|
|
447
453
|
subtractDays: N,
|
|
448
|
-
addHours:
|
|
454
|
+
addHours: G,
|
|
449
455
|
subtractHours: u,
|
|
450
456
|
addMinutes: d,
|
|
451
457
|
subtractMinutes: e,
|
|
452
458
|
snapToInterval: v,
|
|
453
|
-
getWeek:
|
|
454
|
-
isToday:
|
|
459
|
+
getWeek: y,
|
|
460
|
+
isToday: Y,
|
|
455
461
|
isSameDate: L,
|
|
456
462
|
isInRange: B,
|
|
457
463
|
isLeapYear: l,
|
|
@@ -483,11 +489,11 @@ const st = (c) => {
|
|
|
483
489
|
};
|
|
484
490
|
return i.events.sort((e, v) => e.start - v.start < 0 ? -1 : 1).forEach((e) => {
|
|
485
491
|
_(e), e._ || (e._ = {}), e._.id = e._.id || ++D, e.delete || (e.delete = (v) => f(e._.id, v)), e._.deleting = !1, e._.deleted = !1, e.isOverlapping = (v = null) => e.getOverlappingEvents(v).length, e.getOverlappingEvents = (v = null) => {
|
|
486
|
-
var
|
|
492
|
+
var y;
|
|
487
493
|
return N(
|
|
488
494
|
m(s.formatDate((v == null ? void 0 : v.start) || e.start), !0),
|
|
489
495
|
{ start: (v == null ? void 0 : v.start) || e.start, end: (v == null ? void 0 : v.end) || e.end },
|
|
490
|
-
{ excludeIds: [e._.id], schedule: (
|
|
496
|
+
{ excludeIds: [e._.id], schedule: (y = i.schedules) != null && y.length ? ~~((v == null ? void 0 : v.schedule) || e.schedule) : null }
|
|
491
497
|
);
|
|
492
498
|
}, e._.register = (v) => {
|
|
493
499
|
e._.$el = v, e._.fireCreated && (c.emit("event-created", e), delete e._.fireCreated);
|
|
@@ -501,11 +507,11 @@ const st = (c) => {
|
|
|
501
507
|
return;
|
|
502
508
|
} else u.end.getTime() < u.start.getTime() && console.error(`Vue Cal: invalid event dates for event "${u.title}". The event ends before it starts.`, u.start, u.end);
|
|
503
509
|
u._ || (u._ = {}), u._.multiday = !s.isSameDate(u.start, new Date(u.end.getTime() - 1)), u._.startFormatted = s.formatDate(u.start), u._.startMinutes = ~~s.dateToMinutes(u.start), u._.endMinutes = ~~s.dateToMinutes(u.end);
|
|
504
|
-
const d = u.start.getHours(), e = u.start.getMinutes().toString().padStart(2, 0), v = u.end.getHours(),
|
|
505
|
-
u._.startTimeFormatted24 = `${d.toString().padStart(2, 0)}:${e}`, u._.startTimeFormatted12 = `${d % 12 || 12}${e ? `:${e}` : ""} ${d < 12 ? "AM" : "PM"}`, u._.endTimeFormatted24 = `${v.toString().padStart(2, 0)}:${
|
|
510
|
+
const d = u.start.getHours(), e = u.start.getMinutes().toString().padStart(2, 0), v = u.end.getHours(), y = u.end.getMinutes().toString().padStart(2, 0);
|
|
511
|
+
u._.startTimeFormatted24 = `${d.toString().padStart(2, 0)}:${e}`, u._.startTimeFormatted12 = `${d % 12 || 12}${e ? `:${e}` : ""} ${d < 12 ? "AM" : "PM"}`, u._.endTimeFormatted24 = `${v.toString().padStart(2, 0)}:${y}`, u._.endTimeFormatted12 = `${v % 12 || 12}${y ? `:${y}` : ""} ${v < 12 ? "AM" : "PM"}`, u._.duration = Math.abs(~~((u.end - u.start) / 6e4));
|
|
506
512
|
}, z = (u) => w.value.byId[u], m = (u, d = !1, e = !1) => {
|
|
507
513
|
let v = w.value.byDate[u] || [];
|
|
508
|
-
return v = d || e ? v.map(z) : v, e || (v = v.filter((
|
|
514
|
+
return v = d || e ? v.map(z) : v, e || (v = v.filter((y) => !y.background), d || (v = v.map((y) => y._.id))), v;
|
|
509
515
|
}, V = (u) => {
|
|
510
516
|
const d = {};
|
|
511
517
|
return u.forEach(({ startFormatted: e }) => {
|
|
@@ -520,11 +526,11 @@ const st = (c) => {
|
|
|
520
526
|
}
|
|
521
527
|
return i.snapToInterval && (s.snapToInterval(u.start, i.snapToInterval), s.snapToInterval(u.end, i.snapToInterval)), u = { ...u }, u._ || (u._ = {}), u._.id = ++D, u._.fireCreated = !0, i.events.push(u), u;
|
|
522
528
|
}, f = (u, d = 0) => {
|
|
523
|
-
var
|
|
529
|
+
var y;
|
|
524
530
|
if (!i.editableEvents.delete)
|
|
525
531
|
return console.info("Vue Cal: Event deletion is disabled. Enable it with the `editable-events` props.");
|
|
526
532
|
if (!u) return console.warn("Vue Cal: Cannot delete event without its ID.");
|
|
527
|
-
const e = i.events.findIndex((
|
|
533
|
+
const e = i.events.findIndex((Y) => Y._.id === u);
|
|
528
534
|
if (e === -1) return console.warn(`Vue Cal: Cannot delete unknown event \`${u}\`.`);
|
|
529
535
|
const v = i.events[e];
|
|
530
536
|
if (v.deletable === !1) return console.warn(`Vue Cal: Can't delete event \`${u}\` since it was explicitely set to \`delete: false\`.`);
|
|
@@ -540,7 +546,7 @@ const st = (c) => {
|
|
|
540
546
|
// When explicitly using this stage, the event will be visually deleted but still present in the
|
|
541
547
|
// source of truth until the cell is unmounted (by navigating away).
|
|
542
548
|
case 2:
|
|
543
|
-
v._.deleted = !0, i.events[e]._.deleted = !0, (
|
|
549
|
+
v._.deleted = !0, i.events[e]._.deleted = !0, (y = v._.$el) == null || y.dispatchEvent(new CustomEvent("event-deleted", { detail: v._.id }));
|
|
544
550
|
break;
|
|
545
551
|
// Effective deletion from the source of truth (by default, when unmounting the cell).
|
|
546
552
|
case 3:
|
|
@@ -551,20 +557,20 @@ const st = (c) => {
|
|
|
551
557
|
}, b = (u) => {
|
|
552
558
|
const d = m(u, !0);
|
|
553
559
|
if (!d.length) return { cellOverlaps: {}, longestStreak: 0 };
|
|
554
|
-
let e = {}, v = [],
|
|
555
|
-
d.sort((
|
|
556
|
-
for (const
|
|
557
|
-
const L =
|
|
558
|
-
e[L] || (e[L] = { overlaps: /* @__PURE__ */ new Set(), maxConcurrent: 1, position: 0 }), v = v.filter((t) => t.end >
|
|
560
|
+
let e = {}, v = [], y = 0;
|
|
561
|
+
d.sort((Y, L) => Y.start - L.start || Y.end - Y.start - (L.end - L.start));
|
|
562
|
+
for (const Y of d) {
|
|
563
|
+
const L = Y._.id;
|
|
564
|
+
e[L] || (e[L] = { overlaps: /* @__PURE__ */ new Set(), maxConcurrent: 1, position: 0 }), v = v.filter((t) => t.end > Y.start);
|
|
559
565
|
let B = v.filter((t) => {
|
|
560
566
|
var P;
|
|
561
|
-
return (!((P = i.schedules) != null && P.length) ||
|
|
567
|
+
return (!((P = i.schedules) != null && P.length) || Y.schedule === t.schedule) && t.start < Y.end;
|
|
562
568
|
}), l = new Set(B.map((t) => {
|
|
563
569
|
var O;
|
|
564
570
|
return ((O = e[t._.id]) == null ? void 0 : O.position) ?? 0;
|
|
565
571
|
})), n = 0;
|
|
566
572
|
for (; l.has(n); ) n++;
|
|
567
|
-
e[L].position = n, v.push(
|
|
573
|
+
e[L].position = n, v.push(Y);
|
|
568
574
|
let k = Math.max(1, ...B.map((t) => {
|
|
569
575
|
var O;
|
|
570
576
|
return ((O = e[t._.id]) == null ? void 0 : O.maxConcurrent) ?? 1;
|
|
@@ -572,19 +578,19 @@ const st = (c) => {
|
|
|
572
578
|
e[L].maxConcurrent = Math.max(B.length + 1, k);
|
|
573
579
|
for (const t of B)
|
|
574
580
|
e[t._.id].overlaps.add(L), e[L].overlaps.add(t._.id), e[t._.id].maxConcurrent = e[L].maxConcurrent;
|
|
575
|
-
|
|
581
|
+
y = Math.max(y, e[L].maxConcurrent);
|
|
576
582
|
}
|
|
577
|
-
for (const
|
|
578
|
-
return { cellOverlaps: e, longestStreak:
|
|
579
|
-
}, N = (u = [], { start: d, end: e }, { excludeIds: v = [], schedule:
|
|
583
|
+
for (const Y in e) e[Y].overlaps = [...e[Y].overlaps];
|
|
584
|
+
return { cellOverlaps: e, longestStreak: y };
|
|
585
|
+
}, N = (u = [], { start: d, end: e }, { excludeIds: v = [], schedule: y = null }) => {
|
|
580
586
|
var B;
|
|
581
|
-
const
|
|
587
|
+
const Y = new Set(v), L = [];
|
|
582
588
|
for (const l of u)
|
|
583
|
-
!
|
|
589
|
+
!Y.has((B = l._) == null ? void 0 : B.id) && (y === null || y === l.schedule) && G(l, d, e) && L.push(l);
|
|
584
590
|
return L;
|
|
585
|
-
},
|
|
586
|
-
const v = u.allDay || !i.time,
|
|
587
|
-
return
|
|
591
|
+
}, G = (u, d, e) => {
|
|
592
|
+
const v = u.allDay || !i.time, y = v ? new Date(u.start).setHours(0, 0, 0, 0) : u.start.getTime(), Y = v ? new Date(u.end).setHours(23, 59, 59, 999) : u.end.getTime(), L = v ? new Date(d).setHours(0, 0, 0, 0) : d.getTime(), B = v ? new Date(e).setHours(23, 59, 59, 999) : e.getTime();
|
|
593
|
+
return Y > L && y < B;
|
|
588
594
|
};
|
|
589
595
|
return {
|
|
590
596
|
events: w,
|
|
@@ -595,7 +601,7 @@ const st = (c) => {
|
|
|
595
601
|
getEventsInRange: N,
|
|
596
602
|
createEvent: o,
|
|
597
603
|
deleteEvent: f,
|
|
598
|
-
isEventInRange:
|
|
604
|
+
isEventInRange: G
|
|
599
605
|
};
|
|
600
606
|
}, gt = ({ config: c, dateUtils: s, emit: i, texts: D, eventsManager: w }, _) => {
|
|
601
607
|
const { availableViews: z } = c, m = ie(c.view && z[c.view] ? c.view : c.defaultView), V = ie(c.selectedDate || null);
|
|
@@ -604,7 +610,7 @@ const st = (c) => {
|
|
|
604
610
|
f.value.setHours(0, 0, 0, 0);
|
|
605
611
|
const b = ie(new Date(f));
|
|
606
612
|
let N = null;
|
|
607
|
-
const
|
|
613
|
+
const G = T(() => m.value === "month" ? b.value : n.value), u = T(() => m.value === "month" ? new Date(b.value.getFullYear(), b.value.getMonth() + 1, 0, 23, 59, 59, 999) : t.value), d = T(() => m.value === "week" ? s.getPreviousFirstDayOfWeek(n.value, c.startWeekOnSunday) : m.value === "month" ? n.value : G.value), e = T(() => {
|
|
608
614
|
if (m.value === "week") {
|
|
609
615
|
const g = s.addDays(d.value, 7);
|
|
610
616
|
return g.setMilliseconds(-1), g;
|
|
@@ -617,11 +623,11 @@ const st = (c) => {
|
|
|
617
623
|
const H = n.value.getTime(), R = t.value.getTime();
|
|
618
624
|
return H <= g && g <= R;
|
|
619
625
|
});
|
|
620
|
-
function
|
|
621
|
-
o.value = /* @__PURE__ */ new Date(), N = setTimeout(
|
|
626
|
+
function y() {
|
|
627
|
+
o.value = /* @__PURE__ */ new Date(), N = setTimeout(y, 60 * 1e3);
|
|
622
628
|
}
|
|
623
|
-
function
|
|
624
|
-
N = setTimeout(
|
|
629
|
+
function Y() {
|
|
630
|
+
N = setTimeout(y, (60 - (/* @__PURE__ */ new Date()).getSeconds()) * 1e3), y();
|
|
625
631
|
}
|
|
626
632
|
const L = T(() => {
|
|
627
633
|
if (!c.availableViews[m.value]) return 1;
|
|
@@ -642,13 +648,13 @@ const st = (c) => {
|
|
|
642
648
|
}), k = T(() => {
|
|
643
649
|
const g = [], H = ["days", "week", "month"].includes(m.value);
|
|
644
650
|
let R = 0;
|
|
645
|
-
for (let
|
|
651
|
+
for (let X = 0; X < l.value + R; X++)
|
|
646
652
|
switch (m.value) {
|
|
647
653
|
case "day":
|
|
648
654
|
case "days":
|
|
649
655
|
case "week":
|
|
650
656
|
case "month": {
|
|
651
|
-
const ve = s.addDays(n.value,
|
|
657
|
+
const ve = s.addDays(n.value, X), We = ve.getDay() || 7;
|
|
652
658
|
if (H && c.hasHiddenDays && c.hideWeekdays[We]) {
|
|
653
659
|
R++;
|
|
654
660
|
continue;
|
|
@@ -659,14 +665,14 @@ const st = (c) => {
|
|
|
659
665
|
}
|
|
660
666
|
case "year":
|
|
661
667
|
g.push({
|
|
662
|
-
start: new Date(n.value.getFullYear(),
|
|
663
|
-
end: new Date(n.value.getFullYear(),
|
|
668
|
+
start: new Date(n.value.getFullYear(), X, 1, 0, 0, 0, 0),
|
|
669
|
+
end: new Date(n.value.getFullYear(), X + 1, 0, 23, 59, 59, 999)
|
|
664
670
|
});
|
|
665
671
|
break;
|
|
666
672
|
case "years":
|
|
667
673
|
g.push({
|
|
668
|
-
start: new Date(n.value.getFullYear() +
|
|
669
|
-
end: new Date(n.value.getFullYear() +
|
|
674
|
+
start: new Date(n.value.getFullYear() + X, 0, 1, 0, 0, 0, 0),
|
|
675
|
+
end: new Date(n.value.getFullYear() + X + 1, 0, 0, 23, 59, 59, 999)
|
|
670
676
|
});
|
|
671
677
|
break;
|
|
672
678
|
}
|
|
@@ -680,39 +686,39 @@ const st = (c) => {
|
|
|
680
686
|
});
|
|
681
687
|
function K(g, H, R = !1) {
|
|
682
688
|
if (!H || !H[g]) return g + 1;
|
|
683
|
-
const
|
|
684
|
-
return R && typeof
|
|
689
|
+
const X = H[g];
|
|
690
|
+
return R && typeof X == "string" ? X.substring(0, 3) : X;
|
|
685
691
|
}
|
|
686
692
|
function oe(g, H, R) {
|
|
687
|
-
const { monthsArray:
|
|
688
|
-
return nt ? ve ? `${K(Me,
|
|
693
|
+
const { monthsArray: X, monthBeforeDay: ve, canTruncate: We, xs: Ce } = R, Me = g.getMonth(), Ye = g.getFullYear(), Ee = H.getMonth(), He = H.getFullYear(), Be = Me !== Ee, nt = Ye !== He, _e = We && (Ce || Be), Le = g.getDate(), ze = H.getDate();
|
|
694
|
+
return nt ? ve ? `${K(Me, X, _e)} ${Le}, ${Ye} - ${K(Ee, X, _e)} ${ze}, ${He}` : `${Le} ${K(Me, X, _e)} ${Ye} - ${ze} ${K(Ee, X, _e)} ${He}` : Be ? ve ? `${K(Me, X, _e)} ${Le} - ${K(Ee, X, _e)} ${ze}, ${Ye}` : `${Le} ${K(Me, X, _e)} - ${ze} ${K(Ee, X, _e)} ${Ye}` : ve ? `${K(Me, X, _e)} ${Le}-${ze}, ${Ye}` : `${Le}-${ze} ${K(Me, X, _e)} ${Ye}`;
|
|
689
695
|
}
|
|
690
696
|
const ae = T(() => {
|
|
691
|
-
const { dateFormat: g, months: H, monthsGenitive: R, week:
|
|
697
|
+
const { dateFormat: g, months: H, monthsGenitive: R, week: X, truncations: ve } = D, We = c.locale, Ce = ve !== !1, Me = g.indexOf("M") < g.indexOf("D"), Ye = R && We === "el" ? R : H;
|
|
692
698
|
switch (m.value) {
|
|
693
699
|
case "day":
|
|
694
700
|
return s.formatDate(n.value, g);
|
|
695
701
|
case "days":
|
|
696
702
|
case "week": {
|
|
697
|
-
const
|
|
698
|
-
monthsArray:
|
|
703
|
+
const Ee = {
|
|
704
|
+
monthsArray: Ye,
|
|
699
705
|
monthBeforeDay: Me,
|
|
700
706
|
canTruncate: Ce,
|
|
701
707
|
xs: c.xs
|
|
702
708
|
};
|
|
703
|
-
let He = oe(n.value, t.value,
|
|
709
|
+
let He = oe(n.value, t.value, Ee);
|
|
704
710
|
if (m.value === "week") {
|
|
705
711
|
const Be = s.getWeek(
|
|
706
712
|
n.value,
|
|
707
713
|
c.startWeekOnSunday && !c.hideWeekdays[7]
|
|
708
714
|
);
|
|
709
|
-
He += ` <small>${
|
|
715
|
+
He += ` <small>${X} ${Be}</small>`;
|
|
710
716
|
}
|
|
711
717
|
return He;
|
|
712
718
|
}
|
|
713
719
|
case "month": {
|
|
714
|
-
const
|
|
715
|
-
return s.formatDate(
|
|
720
|
+
const Ee = `${c.xs && Ce ? "MMM" : "MMMM"} YYYY`;
|
|
721
|
+
return s.formatDate(G.value, Ee);
|
|
716
722
|
}
|
|
717
723
|
case "year":
|
|
718
724
|
return n.value.getFullYear();
|
|
@@ -739,10 +745,10 @@ const st = (c) => {
|
|
|
739
745
|
b.value = new Date(b.value.getFullYear() - b.value.getFullYear() % l.value, 0, 1, 0, 0, 0, 0);
|
|
740
746
|
break;
|
|
741
747
|
}
|
|
742
|
-
i("view-change", {
|
|
748
|
+
c.ready && i("view-change", {
|
|
743
749
|
id: m.value,
|
|
744
750
|
title: ae.value,
|
|
745
|
-
start:
|
|
751
|
+
start: G.value,
|
|
746
752
|
end: u.value,
|
|
747
753
|
extendedStart: d.value,
|
|
748
754
|
extendedEnd: e.value,
|
|
@@ -766,12 +772,12 @@ const st = (c) => {
|
|
|
766
772
|
I.value ? x(I.value) : console.warn("Vue Cal: no narrower view is available.");
|
|
767
773
|
}
|
|
768
774
|
function a() {
|
|
769
|
-
|
|
775
|
+
h(!1);
|
|
770
776
|
}
|
|
771
777
|
function p() {
|
|
772
|
-
|
|
778
|
+
h(!0);
|
|
773
779
|
}
|
|
774
|
-
function
|
|
780
|
+
function h(g = !0) {
|
|
775
781
|
let H = new Date(f.value);
|
|
776
782
|
switch (m.value) {
|
|
777
783
|
case "day":
|
|
@@ -800,19 +806,19 @@ const st = (c) => {
|
|
|
800
806
|
}
|
|
801
807
|
J(H);
|
|
802
808
|
}
|
|
803
|
-
function
|
|
809
|
+
function q() {
|
|
804
810
|
const g = /* @__PURE__ */ new Date();
|
|
805
811
|
g.setHours(0, 0, 0, 0), J(g);
|
|
806
812
|
}
|
|
807
813
|
function J(g, H = !0, R = !1) {
|
|
808
814
|
if (!s.isValid(g)) return console.warn("Vue Cal: can't navigate to the given date: invalid date provided to `updateViewDate(date)`.");
|
|
809
|
-
let [
|
|
810
|
-
m.value === "month" && ([
|
|
815
|
+
let [X, ve] = [n.value, t.value];
|
|
816
|
+
m.value === "month" && ([X, ve] = [G.value, u.value]), (!s.isInRange(g, X, ve) || R) && (g.setHours(0, 0, 0, 0), O.value = g.getTime() < X.getTime() ? "left" : "right", f.value = g, H && i("update:viewDate", g), re());
|
|
811
817
|
}
|
|
812
818
|
function ce(g, H = !0) {
|
|
813
819
|
if (s.isValid(g)) {
|
|
814
|
-
const { isValid: R, isSameDate:
|
|
815
|
-
(!V.value || !R(V.value) || !
|
|
820
|
+
const { isValid: R, isSameDate: X } = s;
|
|
821
|
+
(!V.value || !R(V.value) || !X(g, V.value)) && (g.setHours(0, 0, 0, 0), V.value = g, H && i("update:selectedDate", g));
|
|
816
822
|
} else
|
|
817
823
|
return console.warn("Vue Cal: can't update the selected date: invalid date provided to `updateSelectedDate(date)`.");
|
|
818
824
|
}
|
|
@@ -826,7 +832,8 @@ const st = (c) => {
|
|
|
826
832
|
console.log("toggling weekdays", c.hideWeekdays);
|
|
827
833
|
}
|
|
828
834
|
function M(g) {
|
|
829
|
-
|
|
835
|
+
var X;
|
|
836
|
+
const H = (X = _.value) == null ? void 0 : X.querySelector(".vuecal__scrollable"), R = g ? g * c.timeCellHeight / c.timeStep : 0;
|
|
830
837
|
H == null || H.scrollTo({ top: R, behavior: "smooth" });
|
|
831
838
|
}
|
|
832
839
|
function W() {
|
|
@@ -840,15 +847,15 @@ const st = (c) => {
|
|
|
840
847
|
return me(() => c.view, (g) => x(g, !1)), me(() => c.availableViews, De), me(() => c.datePicker, () => x("month", !1)), me(() => c.viewDate, (g) => J(g, !1)), me(() => c.selectedDate, (g) => ce(g, !1)), me(() => c.startWeekOnSunday, (g) => r(g)), me(() => c.hideWeekends, (g) => $(g)), me(() => c.hideWeekdays, S), me(() => l.value, () => {
|
|
841
848
|
l.value > 90 && console.warn("Vue Cal: high cell count detected. Performance may degrade when interactions are enabled.");
|
|
842
849
|
}), me(() => c.watchRealTime, (g) => {
|
|
843
|
-
g && c.time ?
|
|
844
|
-
}), re(), c.time && c.watchRealTime &&
|
|
850
|
+
g && c.time ? Y() : N = clearTimeout(N);
|
|
851
|
+
}), re(), c.time && c.watchRealTime && Y(), Xe(() => N = clearTimeout(N)), {
|
|
845
852
|
now: o,
|
|
846
853
|
id: m,
|
|
847
854
|
broaderView: P,
|
|
848
855
|
narrowerView: I,
|
|
849
856
|
title: ae,
|
|
850
857
|
viewDate: f,
|
|
851
|
-
start:
|
|
858
|
+
start: G,
|
|
852
859
|
end: u,
|
|
853
860
|
extendedStart: d,
|
|
854
861
|
// Full range, including out of scope month days, and hidden leading/trailing days.
|
|
@@ -871,8 +878,8 @@ const st = (c) => {
|
|
|
871
878
|
narrower: ue,
|
|
872
879
|
previous: a,
|
|
873
880
|
next: p,
|
|
874
|
-
navigate:
|
|
875
|
-
goToToday:
|
|
881
|
+
navigate: h,
|
|
882
|
+
goToToday: q,
|
|
876
883
|
updateViewDate: J,
|
|
877
884
|
updateSelectedDate: ce,
|
|
878
885
|
scrollToCurrentTime: W,
|
|
@@ -1039,22 +1046,22 @@ const st = (c) => {
|
|
|
1039
1046
|
const s = Ne("vuecal"), { view: i, config: D } = s, w = () => {
|
|
1040
1047
|
D.clickToNavigate && i.broader();
|
|
1041
1048
|
}, _ = T(() => D.clickToNavigate ? { click: w } : {});
|
|
1042
|
-
return (z, m) => (
|
|
1049
|
+
return (z, m) => (E(), j("div", wt, [
|
|
1043
1050
|
F(z.$slots, "header", {
|
|
1044
1051
|
view: C(i),
|
|
1045
1052
|
availableViews: C(D).availableViews,
|
|
1046
1053
|
vuecal: C(s)
|
|
1047
1054
|
}),
|
|
1048
|
-
z.$slots.header ? U("", !0) : (
|
|
1049
|
-
C(D).viewsBar ? (
|
|
1050
|
-
(
|
|
1055
|
+
z.$slots.header ? U("", !0) : (E(), j(te, { key: 0 }, [
|
|
1056
|
+
C(D).viewsBar ? (E(), j("div", pt, [
|
|
1057
|
+
(E(!0), j(te, null, pe(C(D).availableViews, (V, o) => (E(), j("button", {
|
|
1051
1058
|
class: ke(["vuecal__view-button", { "vuecal__view-button--active": C(i).id === o }]),
|
|
1052
1059
|
onClick: (f) => C(i).switch(o),
|
|
1053
1060
|
innerHTML: C(s).texts[o],
|
|
1054
1061
|
type: "button"
|
|
1055
1062
|
}, null, 10, kt))), 256))
|
|
1056
1063
|
])) : U("", !0),
|
|
1057
|
-
C(D).titleBar ? (
|
|
1064
|
+
C(D).titleBar ? (E(), j("nav", _t, [
|
|
1058
1065
|
ge("button", {
|
|
1059
1066
|
class: ke(["vuecal__nav vuecal__nav--prev", { "vuecal__nav--default": !z.$slots["previous-button"] }]),
|
|
1060
1067
|
onClick: m[0] || (m[0] = (...V) => C(i).previous && C(i).previous(...V)),
|
|
@@ -1067,10 +1074,10 @@ const st = (c) => {
|
|
|
1067
1074
|
name: `vuecal-slide-fade--${C(i).transitionDirection}`
|
|
1068
1075
|
}, {
|
|
1069
1076
|
default: Z(() => [
|
|
1070
|
-
(
|
|
1077
|
+
(E(), j("div", {
|
|
1071
1078
|
key: C(i).id + C(i).start.getTime()
|
|
1072
1079
|
}, [
|
|
1073
|
-
z.$slots.title ? (
|
|
1080
|
+
z.$slots.title ? (E(), Se(Ke(C(D).clickToNavigate && C(i).broaderView ? "button" : "div"), ye({
|
|
1074
1081
|
key: 0,
|
|
1075
1082
|
class: "vuecal__title"
|
|
1076
1083
|
}, Ie(_.value)), {
|
|
@@ -1078,7 +1085,7 @@ const st = (c) => {
|
|
|
1078
1085
|
F(z.$slots, "title", se(ne(C(i))))
|
|
1079
1086
|
]),
|
|
1080
1087
|
_: 3
|
|
1081
|
-
}, 16)) : (
|
|
1088
|
+
}, 16)) : (E(), Se(Ke(C(D).clickToNavigate && C(i).broaderView ? "button" : "div"), ye({
|
|
1082
1089
|
key: 1,
|
|
1083
1090
|
class: "vuecal__title"
|
|
1084
1091
|
}, Ie(_.value), {
|
|
@@ -1089,12 +1096,12 @@ const st = (c) => {
|
|
|
1089
1096
|
_: 3
|
|
1090
1097
|
}, 8, ["name"])
|
|
1091
1098
|
]),
|
|
1092
|
-
C(D).todayButton ? (
|
|
1099
|
+
C(D).todayButton ? (E(), j(te, { key: 0 }, [
|
|
1093
1100
|
z.$slots["today-button"] ? F(z.$slots, "today-button", {
|
|
1094
1101
|
key: 0,
|
|
1095
1102
|
navigate: () => !C(i).containsToday && C(i).goToToday(),
|
|
1096
1103
|
active: C(i).containsToday
|
|
1097
|
-
}) : (
|
|
1104
|
+
}) : (E(), j("button", {
|
|
1098
1105
|
key: 1,
|
|
1099
1106
|
class: ke(["vuecal__nav vuecal__nav--today vuecal__nav--default", { "vuecal__nav--active": C(i).containsToday }]),
|
|
1100
1107
|
onClick: m[1] || (m[1] = (V) => !C(i).containsToday && C(i).goToToday()),
|
|
@@ -1117,10 +1124,10 @@ const st = (c) => {
|
|
|
1117
1124
|
}, Mt = {
|
|
1118
1125
|
key: 0,
|
|
1119
1126
|
class: "vuecal__headings"
|
|
1120
|
-
},
|
|
1127
|
+
}, Yt = {
|
|
1121
1128
|
key: 0,
|
|
1122
1129
|
class: "vuecal__weekdays-headings"
|
|
1123
|
-
},
|
|
1130
|
+
}, Et = ["onClick"], St = { class: "vuecal__weekday-day" }, Ct = {
|
|
1124
1131
|
key: 0,
|
|
1125
1132
|
class: "vuecal__weekday-date"
|
|
1126
1133
|
}, Vt = {
|
|
@@ -1142,12 +1149,12 @@ const st = (c) => {
|
|
|
1142
1149
|
(i.isDays || i.isWeek) && i.updateSelectedDate(o);
|
|
1143
1150
|
}
|
|
1144
1151
|
};
|
|
1145
|
-
return (o, f) => z.value ? (
|
|
1146
|
-
C(i).isDay ? U("", !0) : (
|
|
1147
|
-
(
|
|
1152
|
+
return (o, f) => z.value ? (E(), j("div", Mt, [
|
|
1153
|
+
C(i).isDay ? U("", !0) : (E(), j("div", Yt, [
|
|
1154
|
+
(E(!0), j(te, null, pe(m.value, (b, N) => (E(), j("div", {
|
|
1148
1155
|
class: ke(["vuecal__weekday", { "vuecal__weekday--today": b.isToday }]),
|
|
1149
1156
|
key: N,
|
|
1150
|
-
onClick: (
|
|
1157
|
+
onClick: (G) => V.click(b.date)
|
|
1151
1158
|
}, [
|
|
1152
1159
|
F(o.$slots, "weekday-heading", {
|
|
1153
1160
|
label: b[_.value],
|
|
@@ -1155,25 +1162,25 @@ const st = (c) => {
|
|
|
1155
1162
|
date: b.date
|
|
1156
1163
|
}, () => [
|
|
1157
1164
|
ge("span", St, le(b[_.value]), 1),
|
|
1158
|
-
C(i).isMonth ? U("", !0) : (
|
|
1165
|
+
C(i).isMonth ? U("", !0) : (E(), j("strong", Ct, le(b.dateNumber), 1))
|
|
1159
1166
|
])
|
|
1160
|
-
], 10,
|
|
1167
|
+
], 10, Et))), 128))
|
|
1161
1168
|
])),
|
|
1162
|
-
C(D).schedules ? (
|
|
1163
|
-
(
|
|
1164
|
-
(
|
|
1165
|
-
o.$slots["schedule-heading"] ? (
|
|
1169
|
+
C(D).schedules ? (E(), j("div", Vt, [
|
|
1170
|
+
(E(!0), j(te, null, pe(m.value, (b, N) => (E(), j(te, { key: N }, [
|
|
1171
|
+
(E(!0), j(te, null, pe(C(D).schedules, (G, u) => (E(), j(te, { key: u }, [
|
|
1172
|
+
o.$slots["schedule-heading"] ? (E(), j("div", {
|
|
1166
1173
|
key: 0,
|
|
1167
|
-
class: ke(["vuecal__schedule vuecal__schedule--heading",
|
|
1174
|
+
class: ke(["vuecal__schedule vuecal__schedule--heading", G.class])
|
|
1168
1175
|
}, [
|
|
1169
1176
|
F(o.$slots, "schedule-heading", {
|
|
1170
|
-
schedule:
|
|
1177
|
+
schedule: G,
|
|
1171
1178
|
view: C(i)
|
|
1172
1179
|
})
|
|
1173
|
-
], 2)) : (
|
|
1180
|
+
], 2)) : (E(), j("div", {
|
|
1174
1181
|
key: 1,
|
|
1175
|
-
class: ke(["vuecal__schedule vuecal__schedule--heading",
|
|
1176
|
-
innerHTML:
|
|
1182
|
+
class: ke(["vuecal__schedule vuecal__schedule--heading", G.class]),
|
|
1183
|
+
innerHTML: G.label
|
|
1177
1184
|
}, null, 10, Ot))
|
|
1178
1185
|
], 64))), 128))
|
|
1179
1186
|
], 64))), 128))
|
|
@@ -1198,8 +1205,8 @@ const st = (c) => {
|
|
|
1198
1205
|
}
|
|
1199
1206
|
return _;
|
|
1200
1207
|
});
|
|
1201
|
-
return (_, z) => (
|
|
1202
|
-
(
|
|
1208
|
+
return (_, z) => (E(), j("div", Pt, [
|
|
1209
|
+
(E(!0), j(te, null, pe(w.value, (m, V) => (E(), j("div", {
|
|
1203
1210
|
class: "vuecal__time-cell",
|
|
1204
1211
|
key: V
|
|
1205
1212
|
}, [
|
|
@@ -1262,7 +1269,7 @@ const st = (c) => {
|
|
|
1262
1269
|
schedule: null
|
|
1263
1270
|
}), b = T(() => i.editableEvents.drag && o.draggable !== !1 && !o.background), N = T(() => i.time && i.editableEvents.resize && o.resizable !== !1 && !o.background);
|
|
1264
1271
|
T(() => i.editableEvents.delete && o.deletable !== !1 && !o.background);
|
|
1265
|
-
const
|
|
1272
|
+
const G = T(() => {
|
|
1266
1273
|
var l, n, k;
|
|
1267
1274
|
return {
|
|
1268
1275
|
[`vuecal__event--${o._.id}`]: !0,
|
|
@@ -1325,7 +1332,7 @@ const st = (c) => {
|
|
|
1325
1332
|
const n = ((t = l.touches) == null ? void 0 : t[0]) || l;
|
|
1326
1333
|
f.fromResizer = n.target.matches(".vuecal__event-resizer, .vuecal__event-resizer *");
|
|
1327
1334
|
const k = V.value.getBoundingClientRect();
|
|
1328
|
-
f.startX = (((O = l.touches) == null ? void 0 : O[0]) || l).clientX - k.left, f.startY = (((P = l.touches) == null ? void 0 : P[0]) || l).clientY - k.top, f.startPercentageX = f.startX * 100 / k.width, f.startPercentageY = f.startY * 100 / k.height, f.cellEl = V.value.closest(".vuecal__cell"), f.resizeStartDate = o.start, B(l.type === "touchstart" ? "touchmove" : "mousemove", v), B(l.type === "touchstart" ? "touchend" : "mouseup",
|
|
1335
|
+
f.startX = (((O = l.touches) == null ? void 0 : O[0]) || l).clientX - k.left, f.startY = (((P = l.touches) == null ? void 0 : P[0]) || l).clientY - k.top, f.startPercentageX = f.startX * 100 / k.width, f.startPercentageY = f.startY * 100 / k.height, f.cellEl = V.value.closest(".vuecal__cell"), f.resizeStartDate = o.start, B(l.type === "touchstart" ? "touchmove" : "mousemove", v), B(l.type === "touchstart" ? "touchend" : "mouseup", y, { once: !0 }), f.holdTimer = setTimeout(() => {
|
|
1329
1336
|
var I, K;
|
|
1330
1337
|
f.holding = !0, (K = (I = d.value).hold) == null || K.call(I, { e: l, event: o });
|
|
1331
1338
|
}, 1e3);
|
|
@@ -1337,7 +1344,7 @@ const st = (c) => {
|
|
|
1337
1344
|
f.moveX = n.clientX - K, f.moveY = n.clientY - I, f.movePercentageX = f.moveX * 100 / oe, f.movePercentageY = f.moveY * 100 / ae;
|
|
1338
1345
|
}
|
|
1339
1346
|
if (f.fromResizer) {
|
|
1340
|
-
const { newStart: I, newEnd: K } =
|
|
1347
|
+
const { newStart: I, newEnd: K } = Y(o);
|
|
1341
1348
|
let oe = !0;
|
|
1342
1349
|
const { resize: ae } = (P = i.eventListeners) == null ? void 0 : P.event;
|
|
1343
1350
|
ae && (oe = await ae({
|
|
@@ -1346,10 +1353,10 @@ const st = (c) => {
|
|
|
1346
1353
|
overlaps: o.getOverlappingEvents({ start: I, end: K })
|
|
1347
1354
|
})), oe !== !1 ? (o.start = I, o.end = K, f.resizingLastAcceptedEvent && (f.resizingLastAcceptedEvent = null)) : ae && (f.resizingLastAcceptedEvent = { ...o, _: { ...o._ } });
|
|
1348
1355
|
}
|
|
1349
|
-
},
|
|
1356
|
+
}, y = async (l) => {
|
|
1350
1357
|
var n, k;
|
|
1351
1358
|
if (f.holdTimer = clearTimeout(f.holdTimer), f.holding = !1, f.resizing) {
|
|
1352
|
-
const { newStart: t, newEnd: O } =
|
|
1359
|
+
const { newStart: t, newEnd: O } = Y(o);
|
|
1353
1360
|
let P = !0;
|
|
1354
1361
|
const I = d.value["resize-end"];
|
|
1355
1362
|
I && (P = await I({
|
|
@@ -1361,7 +1368,7 @@ const st = (c) => {
|
|
|
1361
1368
|
})), o.start = P === !1 ? (f.resizingLastAcceptedEvent || f.resizingOriginalEvent).start : ((n = f.resizingLastAcceptedEvent) == null ? void 0 : n.start) || t, o.end = P === !1 ? (f.resizingLastAcceptedEvent || f.resizingOriginalEvent).end : ((k = f.resizingLastAcceptedEvent) == null ? void 0 : k.end) || O, o._.duration < 1 && (o.start = f.resizingOriginalEvent.start, o.end = f.resizingOriginalEvent.end), _.isResizingEvent = !1;
|
|
1362
1369
|
}
|
|
1363
1370
|
document.removeEventListener(l.type === "touchend" ? "touchmove" : "mousemove", v), f.resizing = !1, f.fromResizer = !1, f.dragging = !1, f.startX = 0, f.startY = 0, f.moveX = 0, f.moveY = 0, f.startPercentageX = 0, f.startPercentageY = 0, f.movePercentageX = 0, f.movePercentageY = 0, f.cellEl = null, f.resizeStartDate = null, f.resizingOriginalEvent = null, f.resizingLastAcceptedEvent = null, f.schedule = null;
|
|
1364
|
-
},
|
|
1371
|
+
}, Y = (l) => {
|
|
1365
1372
|
const n = new Date(l.start.getFullYear(), l.start.getMonth(), l.start.getDate());
|
|
1366
1373
|
new Date(n).setDate(n.getDate() + 1);
|
|
1367
1374
|
let t = Pe(f.movePercentageY, i);
|
|
@@ -1380,10 +1387,10 @@ const st = (c) => {
|
|
|
1380
1387
|
o._.unregister(), L.forEach(({ event: l, handler: n, options: k }) => {
|
|
1381
1388
|
document.removeEventListener(l, n, k);
|
|
1382
1389
|
});
|
|
1383
|
-
}), (l, n) => (
|
|
1390
|
+
}), (l, n) => (E(), j("div", ye({ class: "vuecal__event" }, Ie(d.value, !0), {
|
|
1384
1391
|
ref_key: "eventEl",
|
|
1385
1392
|
ref: V,
|
|
1386
|
-
class:
|
|
1393
|
+
class: G.value,
|
|
1387
1394
|
style: u.value,
|
|
1388
1395
|
draggable: b.value ? "true" : void 0,
|
|
1389
1396
|
onDragstart: n[2] || (n[2] = (k) => b.value && C(w).eventDragStart(k, o)),
|
|
@@ -1392,7 +1399,7 @@ const st = (c) => {
|
|
|
1392
1399
|
ge("div", zt, [
|
|
1393
1400
|
F(l.$slots, "event", { event: o }, () => [
|
|
1394
1401
|
ge("div", Ft, le(o.title), 1),
|
|
1395
|
-
C(i).time ? (
|
|
1402
|
+
C(i).time ? (E(), j("div", Nt, le(o._[`startTimeFormatted${C(i).twelveHour ? 12 : 24}`]) + `
|
|
1396
1403
|
- ` + le(o._[`endTimeFormatted${C(i).twelveHour ? 12 : 24}`]), 1)) : U("", !0),
|
|
1397
1404
|
ge("div", {
|
|
1398
1405
|
class: "vuecal__event-content",
|
|
@@ -1400,7 +1407,7 @@ const st = (c) => {
|
|
|
1400
1407
|
}, null, 8, Wt)
|
|
1401
1408
|
])
|
|
1402
1409
|
]),
|
|
1403
|
-
N.value ? (
|
|
1410
|
+
N.value ? (E(), j("div", {
|
|
1404
1411
|
key: 0,
|
|
1405
1412
|
class: "vuecal__event-resizer",
|
|
1406
1413
|
onDragstart: n[0] || (n[0] = Qe(() => {
|
|
@@ -1408,7 +1415,7 @@ const st = (c) => {
|
|
|
1408
1415
|
}, null, 32)) : U("", !0),
|
|
1409
1416
|
Oe(Ge, { name: "vuecal-delete-btn" }, {
|
|
1410
1417
|
default: Z(() => [
|
|
1411
|
-
o._.deleting ? (
|
|
1418
|
+
o._.deleting ? (E(), j("div", {
|
|
1412
1419
|
key: 0,
|
|
1413
1420
|
class: "vuecal__event-delete",
|
|
1414
1421
|
onClick: n[1] || (n[1] = Qe((k) => o.delete(3), ["stop"]))
|
|
@@ -1449,7 +1456,7 @@ const st = (c) => {
|
|
|
1449
1456
|
index: { type: Number, required: !0 }
|
|
1450
1457
|
},
|
|
1451
1458
|
setup(c) {
|
|
1452
|
-
const s = c, i = Ne("vuecal"), { view: D, config: w, dateUtils: _, eventsManager: z, dnd: m, touch: V } = i, o = T(() => _.isToday(s.start)), f = ie(null), b = ie([]), N = ie(!1),
|
|
1459
|
+
const s = c, i = Ne("vuecal"), { view: D, config: w, dateUtils: _, eventsManager: z, dnd: m, touch: V } = i, o = T(() => _.isToday(s.start)), f = ie(null), b = ie([]), N = ie(!1), G = (r) => {
|
|
1453
1460
|
b.value.push(r.detail), N.value = !0;
|
|
1454
1461
|
}, u = () => setTimeout(() => N.value = !1, 300), d = $e({
|
|
1455
1462
|
dragging: !1,
|
|
@@ -1472,7 +1479,7 @@ const st = (c) => {
|
|
|
1472
1479
|
movePercentageX: 0,
|
|
1473
1480
|
movePercentageY: 0,
|
|
1474
1481
|
schedule: null
|
|
1475
|
-
}), e = ie(!1), v = ie({ cellOverlaps: {}, longestStreak: 0 }),
|
|
1482
|
+
}), e = ie(!1), v = ie({ cellOverlaps: {}, longestStreak: 0 }), y = T(() => {
|
|
1476
1483
|
let r = Math.min(d.startPercentageY, d.movePercentageY), $ = Math.max(d.startPercentageY, d.movePercentageY), S = Pe(r, w), M = Pe($, w);
|
|
1477
1484
|
return w.snapToInterval && (S = _.snapToInterval(S, w.snapToInterval), M = _.snapToInterval(M, w.snapToInterval), r = Ve(S, w), $ = Ve(M, w)), {
|
|
1478
1485
|
style: {
|
|
@@ -1485,7 +1492,7 @@ const st = (c) => {
|
|
|
1485
1492
|
end: _.formatMinutes(M),
|
|
1486
1493
|
...d.schedule ? { schedule: d.schedule } : {}
|
|
1487
1494
|
};
|
|
1488
|
-
}),
|
|
1495
|
+
}), Y = T(() => {
|
|
1489
1496
|
const r = w.editableEvents.create && (d.dragging || e.value), $ = w.eventCreateMinDrag && d.thresholdPassed || !w.eventCreateMinDrag;
|
|
1490
1497
|
return r && $;
|
|
1491
1498
|
}), L = T(() => {
|
|
@@ -1617,7 +1624,7 @@ const st = (c) => {
|
|
|
1617
1624
|
var S, M;
|
|
1618
1625
|
d.schedule = ~~r.target.dataset.schedule;
|
|
1619
1626
|
const $ = f.value.getBoundingClientRect();
|
|
1620
|
-
d.startX = (((S = r.touches) == null ? void 0 : S[0]) || r).clientX - $.left, d.startY = (((M = r.touches) == null ? void 0 : M[0]) || r).clientY - $.top, d.startPercentageX = d.startX * 100 / $.width, d.startPercentageY = d.startY * 100 / $.height, d.thresholdPassed = !1, document.addEventListener(r.type === "touchstart" ? "touchmove" : "mousemove", p), document.addEventListener(r.type === "touchstart" ? "touchend" : "mouseup",
|
|
1627
|
+
d.startX = (((S = r.touches) == null ? void 0 : S[0]) || r).clientX - $.left, d.startY = (((M = r.touches) == null ? void 0 : M[0]) || r).clientY - $.top, d.startPercentageX = d.startX * 100 / $.width, d.startPercentageY = d.startY * 100 / $.height, d.thresholdPassed = !1, document.addEventListener(r.type === "touchstart" ? "touchmove" : "mousemove", p), document.addEventListener(r.type === "touchstart" ? "touchend" : "mouseup", h, { once: !0 }), d.holdTimer = setTimeout(() => {
|
|
1621
1628
|
var W, A;
|
|
1622
1629
|
d.holding = !0, (A = (W = De.value).hold) == null || A.call(W, { e: r, cell: x.value, cursor: Q.value });
|
|
1623
1630
|
}, 1e3);
|
|
@@ -1626,14 +1633,14 @@ const st = (c) => {
|
|
|
1626
1633
|
d.dragging || (V.isDraggingCell = !0, (M = (S = De.value).dragStart) == null || M.call(S, { e: r, cell: x.value, cursor: Q.value })), d.dragging = !0, d.holdTimer = clearTimeout(d.holdTimer), d.holding = !1;
|
|
1627
1634
|
const $ = f.value.getBoundingClientRect();
|
|
1628
1635
|
d.moveX = (((W = r.touches) == null ? void 0 : W[0]) || r).clientX - $.left, d.moveY = (((A = r.touches) == null ? void 0 : A[0]) || r).clientY - $.top, d.movePercentageX = d.moveX * 100 / $.width, d.movePercentageY = d.moveY * 100 / $.height, w.eventCreateMinDrag && Math.abs(d.startY - d.moveY) > w.eventCreateMinDrag && (d.thresholdPassed = !0), (de = (ee = De.value).drag) == null || de.call(ee, { e: r, cell: x.value, cursor: Q.value });
|
|
1629
|
-
},
|
|
1636
|
+
}, h = async (r) => {
|
|
1630
1637
|
var $, S;
|
|
1631
|
-
document.removeEventListener(r.type === "touchend" ? "touchmove" : "mousemove", p, { passive: !1 }), d.dragging && ((S = ($ = De.value).dragEnd) == null || S.call($, { e: r, cell: x.value, cursor: Q.value }), V.isDraggingCell = !1, w.editableEvents.create && (e.value = !0, await
|
|
1632
|
-
},
|
|
1633
|
-
if (!
|
|
1634
|
-
let { start: $, end: S, startMinutes: M, endMinutes: W } =
|
|
1638
|
+
document.removeEventListener(r.type === "touchend" ? "touchmove" : "mousemove", p, { passive: !1 }), d.dragging && ((S = ($ = De.value).dragEnd) == null || S.call($, { e: r, cell: x.value, cursor: Q.value }), V.isDraggingCell = !1, w.editableEvents.create && (e.value = !0, await q(r), e.value = !1)), d.holdTimer = clearTimeout(d.holdTimer), d.holding = !1, d.dragging = !1, d.startX = 0, d.startY = 0, d.moveX = 0, d.moveY = 0, d.startPercentageX = 0, d.startPercentageY = 0, d.movePercentageX = 0, d.movePercentageY = 0, d.thresholdPassed = !1, d.schedule = null;
|
|
1639
|
+
}, q = async (r) => {
|
|
1640
|
+
if (!Y.value) return;
|
|
1641
|
+
let { start: $, end: S, startMinutes: M, endMinutes: W } = y.value;
|
|
1635
1642
|
$ = new Date(s.start), $.setMinutes(M), S = new Date(s.start), S.setMinutes(W);
|
|
1636
|
-
let A = { ...
|
|
1643
|
+
let A = { ...y.value, start: $, end: S };
|
|
1637
1644
|
const { create: ee } = w.eventListeners.event;
|
|
1638
1645
|
if (typeof ee == "function") {
|
|
1639
1646
|
const de = A;
|
|
@@ -1657,7 +1664,7 @@ const st = (c) => {
|
|
|
1657
1664
|
// Use flush: 'post' to prevent infinite updates.
|
|
1658
1665
|
), Xe(async () => {
|
|
1659
1666
|
b.value.forEach((r) => z.deleteEvent(r, 3)), J(), await Ue();
|
|
1660
|
-
}), (r, $) => (
|
|
1667
|
+
}), (r, $) => (E(), j("div", ye({
|
|
1661
1668
|
class: ["vuecal__cell", L.value],
|
|
1662
1669
|
ref_key: "cellEl",
|
|
1663
1670
|
ref: f
|
|
@@ -1669,12 +1676,12 @@ const st = (c) => {
|
|
|
1669
1676
|
index: c.index,
|
|
1670
1677
|
events: n.value
|
|
1671
1678
|
}) : U("", !0),
|
|
1672
|
-
I.value ? (
|
|
1679
|
+
I.value ? (E(!0), j(te, { key: 1 }, pe(I.value, (S, M) => (E(), j("div", {
|
|
1673
1680
|
class: ke(["vuecal__special-hours", S.class]),
|
|
1674
1681
|
style: Te(S.style),
|
|
1675
1682
|
innerHTML: S.label || ""
|
|
1676
1683
|
}, null, 14, Bt))), 256)) : U("", !0),
|
|
1677
|
-
!r.$slots.cell && C(w).schedules ? (
|
|
1684
|
+
!r.$slots.cell && C(w).schedules ? (E(!0), j(te, { key: 2 }, pe(C(w).schedules, (S) => (E(), j("div", {
|
|
1678
1685
|
class: ke(["vuecal__schedule vuecal__schedule--cell", S.class]),
|
|
1679
1686
|
key: S.id,
|
|
1680
1687
|
style: Te(S.style || null),
|
|
@@ -1686,7 +1693,7 @@ const st = (c) => {
|
|
|
1686
1693
|
end: c.end,
|
|
1687
1694
|
events: n.value
|
|
1688
1695
|
}) : U("", !0),
|
|
1689
|
-
l.value || r.$slots["cell-date"] ? (
|
|
1696
|
+
l.value || r.$slots["cell-date"] ? (E(), j("div", It, [
|
|
1690
1697
|
F(r.$slots, "cell-date", {
|
|
1691
1698
|
start: c.start,
|
|
1692
1699
|
end: c.end,
|
|
@@ -1695,20 +1702,20 @@ const st = (c) => {
|
|
|
1695
1702
|
xe(le(l.value), 1)
|
|
1696
1703
|
])
|
|
1697
1704
|
])) : U("", !0),
|
|
1698
|
-
r.$slots["cell-content"] ? (
|
|
1705
|
+
r.$slots["cell-content"] ? (E(), j("div", Rt, [
|
|
1699
1706
|
F(r.$slots, "cell-content", {
|
|
1700
1707
|
start: c.start,
|
|
1701
1708
|
end: c.end,
|
|
1702
1709
|
events: n.value
|
|
1703
1710
|
})
|
|
1704
1711
|
])) : U("", !0),
|
|
1705
|
-
r.$slots["cell-events"] && n.value.length ? (
|
|
1712
|
+
r.$slots["cell-events"] && n.value.length ? (E(), j("div", Xt, [
|
|
1706
1713
|
F(r.$slots, "cell-events", {
|
|
1707
1714
|
start: c.start,
|
|
1708
1715
|
end: c.end,
|
|
1709
1716
|
events: n.value
|
|
1710
1717
|
})
|
|
1711
|
-
])) : n.value.length || N.value ? (
|
|
1718
|
+
])) : n.value.length || N.value ? (E(), Se(et, {
|
|
1712
1719
|
key: 4,
|
|
1713
1720
|
class: "vuecal__cell-events",
|
|
1714
1721
|
name: "vuecal-event-delete",
|
|
@@ -1717,10 +1724,10 @@ const st = (c) => {
|
|
|
1717
1724
|
tag: "div"
|
|
1718
1725
|
}, {
|
|
1719
1726
|
default: Z(() => [
|
|
1720
|
-
(
|
|
1727
|
+
(E(!0), j(te, null, pe(t.value[S.id], (M) => (E(), Se(at, {
|
|
1721
1728
|
key: M._.id,
|
|
1722
1729
|
event: M,
|
|
1723
|
-
onEventDeleted:
|
|
1730
|
+
onEventDeleted: G,
|
|
1724
1731
|
style: Te(O.value[M._.id])
|
|
1725
1732
|
}, je({ _: 2 }, [
|
|
1726
1733
|
r.$slots.event ? {
|
|
@@ -1734,15 +1741,15 @@ const st = (c) => {
|
|
|
1734
1741
|
]),
|
|
1735
1742
|
_: 2
|
|
1736
1743
|
}, 1024)) : U("", !0),
|
|
1737
|
-
|
|
1744
|
+
Y.value && d.schedule === S.id ? (E(), j("div", {
|
|
1738
1745
|
key: 5,
|
|
1739
1746
|
class: "vuecal__event-placeholder",
|
|
1740
|
-
style: Te(
|
|
1741
|
-
}, le(
|
|
1747
|
+
style: Te(y.value.style)
|
|
1748
|
+
}, le(y.value.start) + " - " + le(y.value.end), 5)) : U("", !0)
|
|
1742
1749
|
], 14, At))), 128)) : U("", !0),
|
|
1743
|
-
!r.$slots.cell && !C(w).schedules ? (
|
|
1750
|
+
!r.$slots.cell && !C(w).schedules ? (E(), j(te, { key: 3 }, [
|
|
1744
1751
|
r.$slots["cell-events"] ? F(r.$slots, "cell-events", { key: 0 }) : U("", !0),
|
|
1745
|
-
l.value || r.$slots["cell-date"] ? (
|
|
1752
|
+
l.value || r.$slots["cell-date"] ? (E(), j("div", Gt, [
|
|
1746
1753
|
F(r.$slots, "cell-date", {
|
|
1747
1754
|
start: c.start,
|
|
1748
1755
|
end: c.end,
|
|
@@ -1751,20 +1758,20 @@ const st = (c) => {
|
|
|
1751
1758
|
xe(le(l.value), 1)
|
|
1752
1759
|
])
|
|
1753
1760
|
])) : U("", !0),
|
|
1754
|
-
r.$slots["cell-content"] ? (
|
|
1761
|
+
r.$slots["cell-content"] ? (E(), j("div", qt, [
|
|
1755
1762
|
F(r.$slots, "cell-content", {
|
|
1756
1763
|
start: c.start,
|
|
1757
1764
|
end: c.end,
|
|
1758
1765
|
events: n.value
|
|
1759
1766
|
})
|
|
1760
1767
|
])) : U("", !0),
|
|
1761
|
-
r.$slots["cell-events"] && n.value.length ? (
|
|
1768
|
+
r.$slots["cell-events"] && n.value.length ? (E(), j("div", Ut, [
|
|
1762
1769
|
F(r.$slots, "cell-events", {
|
|
1763
1770
|
start: c.start,
|
|
1764
1771
|
end: c.end,
|
|
1765
1772
|
events: n.value
|
|
1766
1773
|
})
|
|
1767
|
-
])) : (n.value.length || N.value) && !(C(D).isMonth && !C(w).eventsOnMonthView) ? (
|
|
1774
|
+
])) : (n.value.length || N.value) && !(C(D).isMonth && !C(w).eventsOnMonthView) ? (E(), Se(et, {
|
|
1768
1775
|
key: 4,
|
|
1769
1776
|
class: "vuecal__cell-events",
|
|
1770
1777
|
name: "vuecal-event-delete",
|
|
@@ -1773,10 +1780,10 @@ const st = (c) => {
|
|
|
1773
1780
|
tag: "div"
|
|
1774
1781
|
}, {
|
|
1775
1782
|
default: Z(() => [
|
|
1776
|
-
(
|
|
1783
|
+
(E(!0), j(te, null, pe(n.value, (S) => (E(), Se(at, {
|
|
1777
1784
|
key: S._.id,
|
|
1778
1785
|
event: S,
|
|
1779
|
-
onEventDeleted:
|
|
1786
|
+
onEventDeleted: G,
|
|
1780
1787
|
style: Te(O.value[S._.id])
|
|
1781
1788
|
}, je({ _: 2 }, [
|
|
1782
1789
|
r.$slots.event ? {
|
|
@@ -1790,17 +1797,17 @@ const st = (c) => {
|
|
|
1790
1797
|
]),
|
|
1791
1798
|
_: 3
|
|
1792
1799
|
})) : U("", !0),
|
|
1793
|
-
|
|
1800
|
+
Y.value ? (E(), j("div", {
|
|
1794
1801
|
key: 5,
|
|
1795
1802
|
class: "vuecal__event-placeholder",
|
|
1796
|
-
style: Te(
|
|
1797
|
-
}, le(
|
|
1803
|
+
style: Te(y.value.style)
|
|
1804
|
+
}, le(y.value.start) + " - " + le(y.value.end), 5)) : U("", !0)
|
|
1798
1805
|
], 64)) : U("", !0),
|
|
1799
1806
|
r.$slots["event-count"] ? F(r.$slots, "event-count", {
|
|
1800
1807
|
key: 4,
|
|
1801
1808
|
events: k.value
|
|
1802
|
-
}) : P.value ? (
|
|
1803
|
-
re.show ? (
|
|
1809
|
+
}) : P.value ? (E(), j("div", Zt, le(k.value.length), 1)) : U("", !0),
|
|
1810
|
+
re.show ? (E(), j("div", {
|
|
1804
1811
|
key: 6,
|
|
1805
1812
|
class: "vuecal__now-line",
|
|
1806
1813
|
style: Te(re.style),
|
|
@@ -1827,8 +1834,8 @@ const st = (c) => {
|
|
|
1827
1834
|
}), o = (b) => {
|
|
1828
1835
|
var u;
|
|
1829
1836
|
if (i.isMonth || i.isYear || i.isYears) return;
|
|
1830
|
-
const N = (((u = b.touches) == null ? void 0 : u[0]) || b).clientY, { top:
|
|
1831
|
-
z.value = Je(N -
|
|
1837
|
+
const N = (((u = b.touches) == null ? void 0 : u[0]) || b).clientY, { top: G } = _.value.getBoundingClientRect();
|
|
1838
|
+
z.value = Je(N - G, _.value);
|
|
1832
1839
|
}, f = () => {
|
|
1833
1840
|
z.value = null;
|
|
1834
1841
|
};
|
|
@@ -1836,7 +1843,7 @@ const st = (c) => {
|
|
|
1836
1843
|
_.value.addEventListener("mousemove", o), _.value.addEventListener("touchmove", o), _.value.addEventListener("mouseleave", f), _.value.addEventListener("touchend", f);
|
|
1837
1844
|
}), Xe(() => {
|
|
1838
1845
|
_.value && (_.value.removeEventListener("mousemove", o), _.value.removeEventListener("touchmove", o), _.value.removeEventListener("mouseleave", f), _.value.removeEventListener("touchend", f));
|
|
1839
|
-
}), (b, N) => (
|
|
1846
|
+
}), (b, N) => (E(), j("div", {
|
|
1840
1847
|
class: "vuecal__body",
|
|
1841
1848
|
ref_key: "bodyEl",
|
|
1842
1849
|
ref: _,
|
|
@@ -1844,7 +1851,7 @@ const st = (c) => {
|
|
|
1844
1851
|
}, [
|
|
1845
1852
|
Oe(Ge, { name: "vuecal-shrink" }, {
|
|
1846
1853
|
default: Z(() => [
|
|
1847
|
-
C(D).timeAtCursor && z.value !== null ? (
|
|
1854
|
+
C(D).timeAtCursor && z.value !== null ? (E(), j("div", {
|
|
1848
1855
|
key: 0,
|
|
1849
1856
|
class: "vuecal__time-at-cursor",
|
|
1850
1857
|
style: Te(V.value.style)
|
|
@@ -1854,10 +1861,10 @@ const st = (c) => {
|
|
|
1854
1861
|
]),
|
|
1855
1862
|
_: 1
|
|
1856
1863
|
}),
|
|
1857
|
-
(
|
|
1864
|
+
(E(!0), j(te, null, pe(C(i).cellDates, (G, u) => (E(), Se(Kt, {
|
|
1858
1865
|
key: u,
|
|
1859
|
-
start:
|
|
1860
|
-
end:
|
|
1866
|
+
start: G.start,
|
|
1867
|
+
end: G.end,
|
|
1861
1868
|
index: u
|
|
1862
1869
|
}, je({ _: 2 }, [
|
|
1863
1870
|
b.$slots.cell ? {
|
|
@@ -1918,11 +1925,10 @@ const st = (c) => {
|
|
|
1918
1925
|
"update:events",
|
|
1919
1926
|
"event-delete",
|
|
1920
1927
|
"event-created",
|
|
1921
|
-
"event-dropped"
|
|
1922
|
-
"event-change"
|
|
1928
|
+
"event-dropped"
|
|
1923
1929
|
],
|
|
1924
1930
|
setup(c, { expose: s, emit: i }) {
|
|
1925
|
-
const D = c, w = i, _ = rt("vuecal-el"), z = ht({ props: D, emit: w, attrs: ot(), vuecalEl: _, uid: it() }), { config: m, view: V, dateUtils: o, touch: f } = z, b = T(() => m.time && (V.isDay || V.isDays || V.isWeek)), N = T(() => Array(V.rows).fill().map((e, v) => o.getWeek(o.addDays(V.firstCellDate, 7 * v)))),
|
|
1931
|
+
const D = c, w = i, _ = rt("vuecal-el"), z = ht({ props: D, emit: w, attrs: ot(), vuecalEl: _, uid: it() }), { config: m, view: V, dateUtils: o, touch: f } = z, b = T(() => m.time && (V.isDay || V.isDays || V.isWeek)), N = T(() => Array(V.rows).fill().map((e, v) => o.getWeek(o.addDays(V.firstCellDate, 7 * v)))), G = T(() => {
|
|
1926
1932
|
var e;
|
|
1927
1933
|
return {
|
|
1928
1934
|
"vuecal--ready": m.ready,
|
|
@@ -1952,9 +1958,9 @@ const st = (c) => {
|
|
|
1952
1958
|
};
|
|
1953
1959
|
});
|
|
1954
1960
|
return Ze(async () => {
|
|
1955
|
-
await Ue(), w("ready", { config: m, view: V });
|
|
1956
|
-
}), me(() => m.locale, (e) => m.loadTexts(e)), ut("vuecal", z), s({ view: z.view }), (e, v) => (
|
|
1957
|
-
class: ke(["vuecal",
|
|
1961
|
+
await Ue(), m.ready = !0, w("ready", { config: m, view: V });
|
|
1962
|
+
}), me(() => m.locale, (e) => m.loadTexts(e)), ut("vuecal", z), s({ view: z.view }), (e, v) => (E(), j("div", {
|
|
1963
|
+
class: ke(["vuecal", G.value]),
|
|
1958
1964
|
ref: "vuecal-el",
|
|
1959
1965
|
"data-locale": e.locale,
|
|
1960
1966
|
style: Te(u.value)
|
|
@@ -1964,47 +1970,47 @@ const st = (c) => {
|
|
|
1964
1970
|
vuecal: C(z),
|
|
1965
1971
|
view: C(V),
|
|
1966
1972
|
availableViews: C(m).availableViews
|
|
1967
|
-
}) : (
|
|
1973
|
+
}) : (E(), j(te, { key: 1 }, [
|
|
1968
1974
|
Oe($t, null, je({ _: 2 }, [
|
|
1969
1975
|
e.$slots.header ? {
|
|
1970
1976
|
name: "header",
|
|
1971
|
-
fn: Z((
|
|
1972
|
-
F(e.$slots, "header", se(ne(
|
|
1977
|
+
fn: Z((y) => [
|
|
1978
|
+
F(e.$slots, "header", se(ne(y)))
|
|
1973
1979
|
]),
|
|
1974
1980
|
key: "0"
|
|
1975
1981
|
} : void 0,
|
|
1976
1982
|
!e.$slots.header && e.$slots["previous-button"] ? {
|
|
1977
1983
|
name: "previous-button",
|
|
1978
|
-
fn: Z((
|
|
1979
|
-
F(e.$slots, "previous-button", se(ne(
|
|
1984
|
+
fn: Z((y) => [
|
|
1985
|
+
F(e.$slots, "previous-button", se(ne(y)))
|
|
1980
1986
|
]),
|
|
1981
1987
|
key: "1"
|
|
1982
1988
|
} : void 0,
|
|
1983
1989
|
!e.$slots.header && e.$slots["next-button"] ? {
|
|
1984
1990
|
name: "next-button",
|
|
1985
|
-
fn: Z((
|
|
1986
|
-
F(e.$slots, "next-button", se(ne(
|
|
1991
|
+
fn: Z((y) => [
|
|
1992
|
+
F(e.$slots, "next-button", se(ne(y)))
|
|
1987
1993
|
]),
|
|
1988
1994
|
key: "2"
|
|
1989
1995
|
} : void 0,
|
|
1990
1996
|
!e.$slots.header && e.$slots["today-button"] ? {
|
|
1991
1997
|
name: "today-button",
|
|
1992
|
-
fn: Z((
|
|
1993
|
-
F(e.$slots, "today-button", se(ne(
|
|
1998
|
+
fn: Z((y) => [
|
|
1999
|
+
F(e.$slots, "today-button", se(ne(y)))
|
|
1994
2000
|
]),
|
|
1995
2001
|
key: "3"
|
|
1996
2002
|
} : void 0,
|
|
1997
2003
|
!e.$slots.header && e.$slots.title ? {
|
|
1998
2004
|
name: "title",
|
|
1999
|
-
fn: Z((
|
|
2000
|
-
F(e.$slots, "title", se(ne(
|
|
2005
|
+
fn: Z((y) => [
|
|
2006
|
+
F(e.$slots, "title", se(ne(y)))
|
|
2001
2007
|
]),
|
|
2002
2008
|
key: "4"
|
|
2003
2009
|
} : void 0,
|
|
2004
2010
|
!e.$slots.header && e.$slots["schedule-heading"] ? {
|
|
2005
2011
|
name: "schedule-heading",
|
|
2006
|
-
fn: Z((
|
|
2007
|
-
F(e.$slots, "schedule-heading", se(ne(
|
|
2012
|
+
fn: Z((y) => [
|
|
2013
|
+
F(e.$slots, "schedule-heading", se(ne(y)))
|
|
2008
2014
|
]),
|
|
2009
2015
|
key: "5"
|
|
2010
2016
|
} : void 0
|
|
@@ -2014,23 +2020,23 @@ const st = (c) => {
|
|
|
2014
2020
|
name: `vuecal-slide-fade--${C(V).transitionDirection}`
|
|
2015
2021
|
}, {
|
|
2016
2022
|
default: Z(() => [
|
|
2017
|
-
(
|
|
2023
|
+
(E(), j("div", {
|
|
2018
2024
|
class: ke(["vuecal__scrollable", d.value]),
|
|
2019
2025
|
key: C(V).id + C(V).start.getTime()
|
|
2020
2026
|
}, [
|
|
2021
|
-
b.value ? (
|
|
2027
|
+
b.value ? (E(), Se(Ht, { key: 0 }, je({ _: 2 }, [
|
|
2022
2028
|
e.$slots["time-cell"] ? {
|
|
2023
2029
|
name: "time-cell",
|
|
2024
|
-
fn: Z((
|
|
2025
|
-
F(e.$slots, "time-cell", se(ne(
|
|
2030
|
+
fn: Z((y) => [
|
|
2031
|
+
F(e.$slots, "time-cell", se(ne(y)))
|
|
2026
2032
|
]),
|
|
2027
2033
|
key: "0"
|
|
2028
2034
|
} : void 0
|
|
2029
2035
|
]), 1024)) : U("", !0),
|
|
2030
|
-
C(m).weekNumbers && C(V).isMonth ? (
|
|
2031
|
-
(
|
|
2036
|
+
C(m).weekNumbers && C(V).isMonth ? (E(), j("div", ta, [
|
|
2037
|
+
(E(!0), j(te, null, pe(N.value, (y) => (E(), j("div", aa, [
|
|
2032
2038
|
F(e.$slots, "week-number", {}, () => [
|
|
2033
|
-
ge("small", null, le(
|
|
2039
|
+
ge("small", null, le(y), 1)
|
|
2034
2040
|
])
|
|
2035
2041
|
]))), 256))
|
|
2036
2042
|
])) : U("", !0),
|
|
@@ -2038,15 +2044,15 @@ const st = (c) => {
|
|
|
2038
2044
|
Oe(jt, null, je({ _: 2 }, [
|
|
2039
2045
|
e.$slots["weekday-heading"] ? {
|
|
2040
2046
|
name: "weekday-heading",
|
|
2041
|
-
fn: Z((
|
|
2042
|
-
F(e.$slots, "weekday-heading", se(ne(
|
|
2047
|
+
fn: Z((y) => [
|
|
2048
|
+
F(e.$slots, "weekday-heading", se(ne(y)))
|
|
2043
2049
|
]),
|
|
2044
2050
|
key: "0"
|
|
2045
2051
|
} : void 0,
|
|
2046
2052
|
e.$slots["schedule-heading"] ? {
|
|
2047
2053
|
name: "schedule-heading",
|
|
2048
|
-
fn: Z((
|
|
2049
|
-
F(e.$slots, "schedule-heading", se(ne(
|
|
2054
|
+
fn: Z((y) => [
|
|
2055
|
+
F(e.$slots, "schedule-heading", se(ne(y)))
|
|
2050
2056
|
]),
|
|
2051
2057
|
key: "1"
|
|
2052
2058
|
} : void 0
|
|
@@ -2054,43 +2060,43 @@ const st = (c) => {
|
|
|
2054
2060
|
Oe(Qt, null, je({ _: 2 }, [
|
|
2055
2061
|
e.$slots.cell ? {
|
|
2056
2062
|
name: "cell",
|
|
2057
|
-
fn: Z((
|
|
2058
|
-
F(e.$slots, "cell", se(ne(
|
|
2063
|
+
fn: Z((y) => [
|
|
2064
|
+
F(e.$slots, "cell", se(ne(y)))
|
|
2059
2065
|
]),
|
|
2060
2066
|
key: "0"
|
|
2061
2067
|
} : void 0,
|
|
2062
2068
|
!e.$slots.cell && e.$slots["cell-date"] ? {
|
|
2063
2069
|
name: "cell-date",
|
|
2064
|
-
fn: Z((
|
|
2065
|
-
F(e.$slots, "cell-date", se(ne(
|
|
2070
|
+
fn: Z((y) => [
|
|
2071
|
+
F(e.$slots, "cell-date", se(ne(y)))
|
|
2066
2072
|
]),
|
|
2067
2073
|
key: "1"
|
|
2068
2074
|
} : void 0,
|
|
2069
2075
|
!e.$slots.cell && e.$slots["cell-content"] ? {
|
|
2070
2076
|
name: "cell-content",
|
|
2071
|
-
fn: Z((
|
|
2072
|
-
F(e.$slots, "cell-content", se(ne(
|
|
2077
|
+
fn: Z((y) => [
|
|
2078
|
+
F(e.$slots, "cell-content", se(ne(y)))
|
|
2073
2079
|
]),
|
|
2074
2080
|
key: "2"
|
|
2075
2081
|
} : void 0,
|
|
2076
2082
|
!e.$slots.cell && e.$slots["cell-events"] ? {
|
|
2077
2083
|
name: "cell-events",
|
|
2078
|
-
fn: Z((
|
|
2079
|
-
F(e.$slots, "cell-events", se(ne(
|
|
2084
|
+
fn: Z((y) => [
|
|
2085
|
+
F(e.$slots, "cell-events", se(ne(y)))
|
|
2080
2086
|
]),
|
|
2081
2087
|
key: "3"
|
|
2082
2088
|
} : void 0,
|
|
2083
2089
|
!e.$slots.cell && e.$slots.event ? {
|
|
2084
2090
|
name: "event",
|
|
2085
|
-
fn: Z((
|
|
2086
|
-
F(e.$slots, "event", se(ne(
|
|
2091
|
+
fn: Z((y) => [
|
|
2092
|
+
F(e.$slots, "event", se(ne(y)))
|
|
2087
2093
|
]),
|
|
2088
2094
|
key: "4"
|
|
2089
2095
|
} : void 0,
|
|
2090
2096
|
!e.$slots.cell && e.$slots["event-count"] ? {
|
|
2091
2097
|
name: "event-count",
|
|
2092
|
-
fn: Z((
|
|
2093
|
-
F(e.$slots, "event-count", se(ne(
|
|
2098
|
+
fn: Z((y) => [
|
|
2099
|
+
F(e.$slots, "event-count", se(ne(y)))
|
|
2094
2100
|
]),
|
|
2095
2101
|
key: "5"
|
|
2096
2102
|
} : void 0
|
|
@@ -2127,8 +2133,8 @@ const st = (c) => {
|
|
|
2127
2133
|
countDays: Ta,
|
|
2128
2134
|
datesInSameTimeStep: $a,
|
|
2129
2135
|
isValid: Ma,
|
|
2130
|
-
formatDate:
|
|
2131
|
-
formatDateLite:
|
|
2136
|
+
formatDate: Ya,
|
|
2137
|
+
formatDateLite: Ea,
|
|
2132
2138
|
formatTime: Sa,
|
|
2133
2139
|
formatTimeLite: Ca,
|
|
2134
2140
|
formatMinutes: Va
|
|
@@ -2142,8 +2148,8 @@ export {
|
|
|
2142
2148
|
Ta as countDays,
|
|
2143
2149
|
ba as dateToMinutes,
|
|
2144
2150
|
$a as datesInSameTimeStep,
|
|
2145
|
-
|
|
2146
|
-
|
|
2151
|
+
Ya as formatDate,
|
|
2152
|
+
Ea as formatDateLite,
|
|
2147
2153
|
Va as formatMinutes,
|
|
2148
2154
|
Sa as formatTime,
|
|
2149
2155
|
Ca as formatTimeLite,
|