vue-cal 5.0.1-rc.31 → 5.0.1-rc.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/i18n/ar.js +1 -1
- package/dist/i18n/bg.js +1 -1
- package/dist/i18n/bn.js +1 -1
- package/dist/i18n/bs.js +1 -1
- package/dist/i18n/ca.js +1 -1
- package/dist/i18n/cs.js +1 -1
- package/dist/i18n/da.js +1 -1
- package/dist/i18n/de.js +1 -1
- package/dist/i18n/el.js +1 -1
- package/dist/i18n/en-gb.js +1 -1
- package/dist/i18n/es.js +1 -1
- package/dist/i18n/et.js +1 -1
- package/dist/i18n/fa.js +1 -1
- package/dist/i18n/fi.js +1 -1
- package/dist/i18n/fr.js +1 -1
- package/dist/i18n/he.js +1 -1
- package/dist/i18n/hr.js +1 -1
- package/dist/i18n/hu.js +1 -1
- package/dist/i18n/id.js +1 -1
- package/dist/i18n/is.js +1 -1
- package/dist/i18n/it.js +1 -1
- package/dist/i18n/ja.js +1 -1
- package/dist/i18n/ka.js +1 -1
- package/dist/i18n/kaa.js +1 -1
- package/dist/i18n/kk.js +1 -1
- package/dist/i18n/ko.js +1 -1
- package/dist/i18n/ky.js +1 -1
- package/dist/i18n/lt.js +1 -1
- package/dist/i18n/mn.js +1 -1
- package/dist/i18n/nl.js +1 -1
- package/dist/i18n/no.js +1 -1
- package/dist/i18n/pl.js +1 -1
- package/dist/i18n/pt-br.js +1 -1
- package/dist/i18n/pt-pt.js +1 -1
- package/dist/i18n/ro.js +1 -1
- package/dist/i18n/ru.js +1 -1
- package/dist/i18n/sk.js +1 -1
- package/dist/i18n/sl.js +1 -1
- package/dist/i18n/sq.js +1 -1
- package/dist/i18n/sr.js +1 -1
- package/dist/i18n/sv.js +1 -1
- package/dist/i18n/tr.js +1 -1
- package/dist/i18n/uk.js +1 -1
- package/dist/i18n/uz-cryl.js +1 -1
- package/dist/i18n/uz.js +1 -1
- package/dist/i18n/vi.js +1 -1
- package/dist/i18n/zh-cn.js +1 -1
- package/dist/i18n/zh-hk.js +1 -1
- package/dist/vue-cal.d.ts +290 -0
- package/dist/vue-cal.es.js +512 -493
- package/dist/vue-cal.umd.js +2 -2
- package/package.json +3 -2
package/dist/vue-cal.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { computed as b, reactive as be, watch as De, toRefs as bt, ref as ue, onBeforeUnmount as Re, nextTick as Xe, inject as He, createElementBlock as P, openBlock as V, renderSlot as
|
|
1
|
+
import { computed as b, reactive as be, watch as De, toRefs as bt, ref as ue, onBeforeUnmount as Re, nextTick as Xe, inject as He, createElementBlock as P, openBlock as V, renderSlot as O, createCommentVNode as x, unref as $, Fragment as de, renderList as we, normalizeClass as pe, createElementVNode as he, createVNode as Oe, Transition as Ue, withCtx as N, createBlock as Se, resolveDynamicComponent as xe, mergeProps as ie, toHandlers as Ie, normalizeProps as ne, onMounted as Ze, toDisplayString as ce, createTextVNode as qe, withModifiers as et, normalizeStyle as $e, TransitionGroup as tt, createSlots as Ce, useTemplateRef as Tt, useId as Mt, useAttrs as Et, provide as nt, guardReactiveProps as le } from "vue";
|
|
2
2
|
/**
|
|
3
|
-
* vue-cal v5.0.1-rc.
|
|
3
|
+
* vue-cal v5.0.1-rc.33
|
|
4
4
|
* (c) 2024-2025 Antoni Andre <antoniandre.web@gmail.com>
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
@@ -47,9 +47,9 @@ const fe = {
|
|
|
47
47
|
event: {}
|
|
48
48
|
// All possible event listeners to attach to calendar events.
|
|
49
49
|
}, u = (p) => p.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
|
50
|
-
for (const [p,
|
|
51
|
-
const [
|
|
52
|
-
|
|
50
|
+
for (const [p, n] of Object.entries(d)) {
|
|
51
|
+
const [j, X, U] = p.match(/^on(Cell|Event)(.+)$/) || [];
|
|
52
|
+
j && (c[X.toLowerCase()][u(U).replace(/^-+|-+$/g, "")] = n);
|
|
53
53
|
}
|
|
54
54
|
return c;
|
|
55
55
|
}), L = b(() => {
|
|
@@ -59,17 +59,17 @@ const fe = {
|
|
|
59
59
|
}), l = b(() => t.hideWeekends || L.value[6] && L.value[7]), E = b(() => {
|
|
60
60
|
const c = t.datePicker;
|
|
61
61
|
let u = 0, p = {};
|
|
62
|
-
const
|
|
63
|
-
return c && !
|
|
62
|
+
const n = t.views;
|
|
63
|
+
return c && !n ? {
|
|
64
64
|
month: { ...fe.availableViews.month },
|
|
65
65
|
year: { ...fe.availableViews.year },
|
|
66
66
|
years: { ...fe.availableViews.years }
|
|
67
|
-
} : t.horizontal && !
|
|
67
|
+
} : t.horizontal && !n ? {
|
|
68
68
|
days: { cols: fe.availableViews.days.rows, rows: fe.availableViews.days.cols },
|
|
69
69
|
week: { cols: fe.availableViews.week.rows, rows: fe.availableViews.week.cols }
|
|
70
|
-
} : (
|
|
71
|
-
const { cols:
|
|
72
|
-
return
|
|
70
|
+
} : (n ? (Array.isArray(n) ? p = n.reduce((j, X) => (typeof X == "string" && fe.availableViews[X] ? j[X] = fe.availableViews[X] : u++, j), {}) : typeof n == "object" && (p = Object.entries(n).reduce((j, [X, U]) => {
|
|
71
|
+
const { cols: K, rows: te } = fe.availableViews[X];
|
|
72
|
+
return j[X] = { cols: U.cols || K, rows: U.rows || te }, j;
|
|
73
73
|
}, {})), u && console.warn("Vue Cal: the provided `views` prop contains invalid views that will be ignored."), Object.keys(p).length || (console.warn("Vue Cal: No valid view in the provided `views` prop. Falling back to default views."), p = { ...fe.availableViews })) : p = { ...fe.availableViews }, p);
|
|
74
74
|
}), F = b(() => t.datePicker ? "month" : E.value.week ? "week" : Object.keys(E.value)[0]), m = b(() => {
|
|
75
75
|
if (typeof t.selectedDate == "string") return r.stringToDate(t.selectedDate);
|
|
@@ -88,13 +88,13 @@ const fe = {
|
|
|
88
88
|
}), S = b(() => {
|
|
89
89
|
let c = null;
|
|
90
90
|
return t.minDate && typeof t.minDate == "string" ? c = r.stringToDate(t.minDate) : t.minDate && t.minDate instanceof Date && (c = t.minDate), (c == null ? void 0 : c.getTime()) || null;
|
|
91
|
-
}),
|
|
91
|
+
}), a = b(() => {
|
|
92
92
|
let c = null;
|
|
93
93
|
return t.maxDate && typeof t.maxDate == "string" ? c = r.stringToDate(t.maxDate) : t.maxDate && t.maxDate instanceof Date && (c = t.maxDate), (c == null ? void 0 : c.getTime()) || null;
|
|
94
94
|
}), I = b(() => {
|
|
95
95
|
var p;
|
|
96
96
|
const { view: c } = y;
|
|
97
|
-
return t.schedules.length && (c.isDay || c.isDays || c.isWeek) && ((p = t.schedules) == null ? void 0 : p.map((
|
|
97
|
+
return t.schedules.length && (c.isDay || c.isDays || c.isWeek) && ((p = t.schedules) == null ? void 0 : p.map((n, j) => ({ ...n, id: n.id ?? j + 1 }))) || void 0;
|
|
98
98
|
}), e = b(() => {
|
|
99
99
|
const c = {
|
|
100
100
|
drag: !0,
|
|
@@ -108,7 +108,7 @@ const fe = {
|
|
|
108
108
|
return (Array.isArray(u) ? u.includes(c.id) : u) && (c.isMonth && !t.eventsOnMonthView || c.isYear);
|
|
109
109
|
}), H = b(() => t.allDayEvents && t.time !== !1 && !C.isMonth), Y = b(() => t.timeAtCursor && t.time !== !1), _ = async (c) => {
|
|
110
110
|
var p;
|
|
111
|
-
let u = /* @__PURE__ */ Object.assign({ "../i18n/ar.json": () => import("./i18n/ar.js").then((
|
|
111
|
+
let u = /* @__PURE__ */ Object.assign({ "../i18n/ar.json": () => import("./i18n/ar.js").then((n) => n.default), "../i18n/bg.json": () => import("./i18n/bg.js").then((n) => n.default), "../i18n/bn.json": () => import("./i18n/bn.js").then((n) => n.default), "../i18n/bs.json": () => import("./i18n/bs.js").then((n) => n.default), "../i18n/ca.json": () => import("./i18n/ca.js").then((n) => n.default), "../i18n/cs.json": () => import("./i18n/cs.js").then((n) => n.default), "../i18n/da.json": () => import("./i18n/da.js").then((n) => n.default), "../i18n/de.json": () => import("./i18n/de.js").then((n) => n.default), "../i18n/el.json": () => import("./i18n/el.js").then((n) => n.default), "../i18n/en-gb.json": () => import("./i18n/en-gb.js").then((n) => n.default), "../i18n/en-us.json": () => Promise.resolve().then(() => jt).then((n) => n.default), "../i18n/es.json": () => import("./i18n/es.js").then((n) => n.default), "../i18n/et.json": () => import("./i18n/et.js").then((n) => n.default), "../i18n/fa.json": () => import("./i18n/fa.js").then((n) => n.default), "../i18n/fi.json": () => import("./i18n/fi.js").then((n) => n.default), "../i18n/fr.json": () => import("./i18n/fr.js").then((n) => n.default), "../i18n/he.json": () => import("./i18n/he.js").then((n) => n.default), "../i18n/hr.json": () => import("./i18n/hr.js").then((n) => n.default), "../i18n/hu.json": () => import("./i18n/hu.js").then((n) => n.default), "../i18n/id.json": () => import("./i18n/id.js").then((n) => n.default), "../i18n/is.json": () => import("./i18n/is.js").then((n) => n.default), "../i18n/it.json": () => import("./i18n/it.js").then((n) => n.default), "../i18n/ja.json": () => import("./i18n/ja.js").then((n) => n.default), "../i18n/ka.json": () => import("./i18n/ka.js").then((n) => n.default), "../i18n/kaa.json": () => import("./i18n/kaa.js").then((n) => n.default), "../i18n/kk.json": () => import("./i18n/kk.js").then((n) => n.default), "../i18n/ko.json": () => import("./i18n/ko.js").then((n) => n.default), "../i18n/ky.json": () => import("./i18n/ky.js").then((n) => n.default), "../i18n/lt.json": () => import("./i18n/lt.js").then((n) => n.default), "../i18n/mn.json": () => import("./i18n/mn.js").then((n) => n.default), "../i18n/nl.json": () => import("./i18n/nl.js").then((n) => n.default), "../i18n/no.json": () => import("./i18n/no.js").then((n) => n.default), "../i18n/pl.json": () => import("./i18n/pl.js").then((n) => n.default), "../i18n/pt-br.json": () => import("./i18n/pt-br.js").then((n) => n.default), "../i18n/pt-pt.json": () => import("./i18n/pt-pt.js").then((n) => n.default), "../i18n/ro.json": () => import("./i18n/ro.js").then((n) => n.default), "../i18n/ru.json": () => import("./i18n/ru.js").then((n) => n.default), "../i18n/sk.json": () => import("./i18n/sk.js").then((n) => n.default), "../i18n/sl.json": () => import("./i18n/sl.js").then((n) => n.default), "../i18n/sq.json": () => import("./i18n/sq.js").then((n) => n.default), "../i18n/sr.json": () => import("./i18n/sr.js").then((n) => n.default), "../i18n/sv.json": () => import("./i18n/sv.js").then((n) => n.default), "../i18n/tr.json": () => import("./i18n/tr.js").then((n) => n.default), "../i18n/uk.json": () => import("./i18n/uk.js").then((n) => n.default), "../i18n/uz-cryl.json": () => import("./i18n/uz-cryl.js").then((n) => n.default), "../i18n/uz.json": () => import("./i18n/uz.js").then((n) => n.default), "../i18n/vi.json": () => import("./i18n/vi.js").then((n) => n.default), "../i18n/zh-cn.json": () => import("./i18n/zh-cn.js").then((n) => n.default), "../i18n/zh-hk.json": () => import("./i18n/zh-hk.js").then((n) => n.default) });
|
|
112
112
|
{
|
|
113
113
|
if (!u[`../i18n/${c}.json`]) {
|
|
114
114
|
console.warn(`Vue Cal: the locale \`${c}\` does not exist. Falling back to \`en-us\`.`), c = "en-us";
|
|
@@ -133,7 +133,7 @@ const fe = {
|
|
|
133
133
|
hideWeekdays: L,
|
|
134
134
|
hideWeekends: l,
|
|
135
135
|
minTimestamp: S,
|
|
136
|
-
maxTimestamp:
|
|
136
|
+
maxTimestamp: a,
|
|
137
137
|
schedules: I,
|
|
138
138
|
selectedDate: m,
|
|
139
139
|
editableEvents: e,
|
|
@@ -160,7 +160,7 @@ const fe = {
|
|
|
160
160
|
const d = t.clientHeight;
|
|
161
161
|
return y * 100 / d;
|
|
162
162
|
}, We = be({ id: null, date: null });
|
|
163
|
-
let
|
|
163
|
+
let at = !1, Je = !0;
|
|
164
164
|
const _e = be({ el: null, cell: null, timeout: null }), ke = be({
|
|
165
165
|
eventId: null,
|
|
166
166
|
fromVueCal: null,
|
|
@@ -169,10 +169,10 @@ const _e = be({ el: null, cell: null, timeout: null }), ke = be({
|
|
|
169
169
|
function zt(y) {
|
|
170
170
|
const { config: t, view: d, eventsManager: r, emit: h, uid: C, dateUtils: W } = y, v = (S) => {
|
|
171
171
|
var _;
|
|
172
|
-
const { timeStep:
|
|
172
|
+
const { timeStep: a, timeCellHeight: I, timeFrom: e } = t, z = (((_ = S.touches) == null ? void 0 : _[0]) || S).clientY, { top: H } = S.currentTarget.getBoundingClientRect(), Y = z - H - ~~S.dataTransfer.getData("cursor-grab-at");
|
|
173
173
|
return je(Ke(Y, S.currentTarget), t);
|
|
174
|
-
}, A = (S,
|
|
175
|
-
const e =
|
|
174
|
+
}, A = (S, a, I) => {
|
|
175
|
+
const e = a.duration || Z(a.start, a.end) || t.timeStep;
|
|
176
176
|
let z = Math.max(v(S), 0);
|
|
177
177
|
if (t.snapToInterval) {
|
|
178
178
|
const f = z + t.snapToInterval / 2;
|
|
@@ -180,88 +180,88 @@ function zt(y) {
|
|
|
180
180
|
}
|
|
181
181
|
const H = new Date(new Date(I).setMinutes(z)), Y = Math.min(z + e, 1440), _ = new Date(new Date(I).setMinutes(Y));
|
|
182
182
|
return { start: H, end: _ };
|
|
183
|
-
}, Z = (S,
|
|
183
|
+
}, Z = (S, a) => Math.round((a - S) / 6e4);
|
|
184
184
|
return {
|
|
185
|
-
eventDragStart: (S,
|
|
185
|
+
eventDragStart: (S, a) => {
|
|
186
186
|
if (S.target.nodeType === 3 || y.touch.isResizingEvent) return S.preventDefault();
|
|
187
187
|
S.dataTransfer.effectAllowed = "move", S.dataTransfer.dropEffect = "move";
|
|
188
|
-
const I = { ...
|
|
188
|
+
const I = { ...a, _: { id: a._.id, duration: Z(a.start, a.end) } };
|
|
189
189
|
try {
|
|
190
190
|
S.dataTransfer.setData("text/plain", ""), S.dataTransfer.setData("event", JSON.stringify(I)), S.dataTransfer.setData("cursor-grab-at", S.offsetY);
|
|
191
191
|
} catch (z) {
|
|
192
192
|
return console.warn("Vue Cal: Failed to set drag data:", z), S.preventDefault();
|
|
193
193
|
}
|
|
194
|
-
ke.eventId =
|
|
194
|
+
ke.eventId = a._.id, ke.fromVueCal = C, h("event-drag-start", {
|
|
195
195
|
e: S,
|
|
196
|
-
event:
|
|
196
|
+
event: a
|
|
197
197
|
});
|
|
198
198
|
const e = S.target.closest(".vuecal__event");
|
|
199
199
|
e.classList.add("vuecal__event--dragging-ghost"), setTimeout(() => {
|
|
200
200
|
e.classList.add("vuecal__event--dragging-original"), e.classList.remove("vuecal__event--dragging-ghost");
|
|
201
|
-
}, 0),
|
|
201
|
+
}, 0), at = !1, Object.assign(We, { id: d.id, date: d.firstCellDate }), Je = !0, y.touch.isDraggingEvent = !0;
|
|
202
202
|
},
|
|
203
|
-
eventDragEnd: (S,
|
|
203
|
+
eventDragEnd: (S, a) => {
|
|
204
204
|
ke.eventId = null, S.target.closest(".vuecal__event").classList.remove("vuecal__event--dragging-original");
|
|
205
205
|
const { fromVueCal: I, toVueCal: e } = ke;
|
|
206
|
-
e && I !== e && r.deleteEvent(
|
|
206
|
+
e && I !== e && r.deleteEvent(a._.id, 3), at && Je && We.id && d.switchView(We.id, We.date, !0), h("event-drag-end", {
|
|
207
207
|
e: S,
|
|
208
|
-
event:
|
|
208
|
+
event: a,
|
|
209
209
|
external: ke.fromVueCal !== C
|
|
210
210
|
}), ke.fromVueCal = null, ke.toVueCal = null, y.touch.isDraggingEvent = !1;
|
|
211
211
|
},
|
|
212
|
-
cellDragEnter: (S,
|
|
213
|
-
const { start: I } =
|
|
212
|
+
cellDragEnter: (S, a) => {
|
|
213
|
+
const { start: I } = a, e = S.currentTarget;
|
|
214
214
|
if (!S.currentTarget.contains(S.relatedTarget)) {
|
|
215
215
|
if (e === _e.el || !e.className.includes("vuecal__cell-content")) return !1;
|
|
216
|
-
_e.el && (_e.cell.highlighted = !1), Object.assign(_e, { el: e, cell:
|
|
216
|
+
_e.el && (_e.cell.highlighted = !1), Object.assign(_e, { el: e, cell: a, timeout: clearTimeout(_e.timeout) }), a.highlighted = !0, ["years", "year", "month"].includes(d.id) && (_e.timeout = setTimeout(() => y.switchToNarrowerView(I), 2e3));
|
|
217
217
|
}
|
|
218
218
|
},
|
|
219
|
-
cellDragOver: (S,
|
|
220
|
-
const { start: I, schedule: e } =
|
|
221
|
-
S.preventDefault(),
|
|
219
|
+
cellDragOver: (S, a) => {
|
|
220
|
+
const { start: I, schedule: e } = a;
|
|
221
|
+
S.preventDefault(), a.highlighted = !0, (e || e === 0) && (a.highlightedSchedule = e);
|
|
222
222
|
},
|
|
223
|
-
cellDragLeave: (S,
|
|
224
|
-
S.preventDefault(), !S.currentTarget.contains(S.relatedTarget) && (
|
|
223
|
+
cellDragLeave: (S, a) => {
|
|
224
|
+
S.preventDefault(), !S.currentTarget.contains(S.relatedTarget) && (a.highlightedSchedule = !1, _e.cell === a && (clearTimeout(_e.timeout), Object.assign(_e, { el: null, cell: null, timeout: null }), a.highlighted = !1));
|
|
225
225
|
},
|
|
226
|
-
cellDragDrop: async (S,
|
|
227
|
-
var p,
|
|
226
|
+
cellDragDrop: async (S, a, I = !1) => {
|
|
227
|
+
var p, n, j;
|
|
228
228
|
S.preventDefault(), clearTimeout(_e.timeout), Object.assign(_e, { el: null, cell: null, timeout: null });
|
|
229
229
|
const e = JSON.parse(S.dataTransfer.getData("event") || "{}");
|
|
230
230
|
e.start && (e.start = new Date(e.start)), e.end && (e.end = new Date(e.end));
|
|
231
231
|
let z, H, Y;
|
|
232
|
-
I ? (H = new Date(
|
|
232
|
+
I ? (H = new Date(a.start), Y = new Date(a.end)) : { start: H, end: Y } = A(S, e, a.start);
|
|
233
233
|
const { schedule: _ } = ((p = S.target.closest("[data-schedule]")) == null ? void 0 : p.dataset) || {};
|
|
234
234
|
let f = () => {
|
|
235
235
|
};
|
|
236
236
|
ke.fromVueCal === C ? (z = r.getEvent(e._.id), z && (z._.dragging = !1, f = (X) => {
|
|
237
237
|
if (z.start = H, z.end = Y, z.allDay = I, _ !== void 0 && (z.schedule = ~~_), X && typeof X == "object") {
|
|
238
|
-
const { _: U, ...
|
|
239
|
-
Object.assign(z,
|
|
238
|
+
const { _: U, ...K } = X;
|
|
239
|
+
Object.assign(z, K);
|
|
240
240
|
}
|
|
241
241
|
})) : (z = {
|
|
242
242
|
...e,
|
|
243
243
|
start: H,
|
|
244
244
|
end: Y,
|
|
245
245
|
..._ !== void 0 && { schedule: ~~_ },
|
|
246
|
-
_: { id: ((
|
|
246
|
+
_: { id: ((n = e._) == null ? void 0 : n.id) || e.id, duration: Z(H, Y) },
|
|
247
247
|
getOverlappingEvents: () => r.getEventsInRange(H, Y, { schedule: ~~_ })
|
|
248
248
|
}, f = (X) => {
|
|
249
249
|
if (z = r.createEvent(z), X && typeof X == "object") {
|
|
250
|
-
const { _: U, ...
|
|
251
|
-
Object.assign(z,
|
|
250
|
+
const { _: U, ...K } = X;
|
|
251
|
+
Object.assign(z, K);
|
|
252
252
|
}
|
|
253
253
|
});
|
|
254
254
|
let c = !0;
|
|
255
|
-
const { drop: u } = (
|
|
255
|
+
const { drop: u } = (j = t.eventListeners) == null ? void 0 : j.event;
|
|
256
256
|
u && (c = await u({
|
|
257
257
|
e: S,
|
|
258
258
|
event: { ...z, start: H, end: Y, schedule: ~~_ },
|
|
259
259
|
overlaps: z.getOverlappingEvents({ start: H, end: Y, schedule: ~~_ }),
|
|
260
|
-
cell:
|
|
260
|
+
cell: a,
|
|
261
261
|
external: ke.fromVueCal !== C
|
|
262
|
-
})), c !== !1 && f(c),
|
|
262
|
+
})), c !== !1 && f(c), a.highlighted = !1, a.highlightedSchedule = null, Je = !1, ke.toVueCal = C, h("event-dropped", {
|
|
263
263
|
e: S,
|
|
264
|
-
cell:
|
|
264
|
+
cell: a,
|
|
265
265
|
event: z,
|
|
266
266
|
originalEvent: e,
|
|
267
267
|
external: ke.fromVueCal !== C
|
|
@@ -283,7 +283,7 @@ const lt = (y, t) => {
|
|
|
283
283
|
}, Date.prototype.addMinutes = function(s) {
|
|
284
284
|
return S(this, s || 0);
|
|
285
285
|
}, Date.prototype.subtractMinutes = function(s) {
|
|
286
|
-
return
|
|
286
|
+
return a(this, s || 0);
|
|
287
287
|
}, Date.prototype.getWeek = function() {
|
|
288
288
|
return e(this);
|
|
289
289
|
}, Date.prototype.isToday = function() {
|
|
@@ -293,7 +293,7 @@ const lt = (y, t) => {
|
|
|
293
293
|
}, Date.prototype.format = function(s = "YYYY-MM-DD") {
|
|
294
294
|
return X(this, s);
|
|
295
295
|
}, Date.prototype.formatTime = function(s = "HH:mm") {
|
|
296
|
-
return
|
|
296
|
+
return K(this, s);
|
|
297
297
|
};
|
|
298
298
|
}, Z = () => {
|
|
299
299
|
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;
|
|
@@ -314,13 +314,13 @@ const lt = (y, t) => {
|
|
|
314
314
|
}, S = (s, k) => {
|
|
315
315
|
const D = new Date(s.valueOf());
|
|
316
316
|
return D.setMinutes(D.getMinutes() + k), D;
|
|
317
|
-
},
|
|
317
|
+
}, a = (s, k) => {
|
|
318
318
|
const D = new Date(s.valueOf());
|
|
319
319
|
return D.setMinutes(D.getMinutes() - k), D;
|
|
320
320
|
}, I = (s, k) => {
|
|
321
321
|
const D = (J) => {
|
|
322
|
-
const
|
|
323
|
-
return
|
|
322
|
+
const se = J % k;
|
|
323
|
+
return se !== 0 && (J += se >= k / 2 ? k - se : -se), J;
|
|
324
324
|
};
|
|
325
325
|
if (typeof s == "number") return D(s);
|
|
326
326
|
if (s instanceof Date) {
|
|
@@ -330,15 +330,15 @@ const lt = (y, t) => {
|
|
|
330
330
|
}, e = (s, k = !1) => {
|
|
331
331
|
const D = new Date(Date.UTC(s.getFullYear(), s.getMonth(), s.getDate())), J = D.getUTCDay() || 7;
|
|
332
332
|
D.setUTCDate(D.getUTCDate() + 4 - J);
|
|
333
|
-
const
|
|
334
|
-
return Math.ceil(((D -
|
|
333
|
+
const se = new Date(Date.UTC(D.getUTCFullYear(), 0, 1));
|
|
334
|
+
return Math.ceil(((D - se) / 864e5 + 1) / 7) + (k ? 1 : 0);
|
|
335
335
|
}, z = (s) => `${s.getFullYear()}-${s.getMonth()}-${s.getDate()}` === l(), H = (s, k) => {
|
|
336
336
|
if (!s || !k) return console.warn(`Vue Cal: missing date${s ? "2" : "1"} parameter for comparison with \`isSameDate(date1, date2)\`.`);
|
|
337
|
-
if (
|
|
338
|
-
if (!
|
|
337
|
+
if (j(s)) {
|
|
338
|
+
if (!j(k)) return console.warn(`Vue Cal: invalid date2 provided for comparison with \`isSameDate(date1, date2)\`: \`${k}\`.`);
|
|
339
339
|
} else return console.warn(`Vue Cal: invalid date1 provided for comparison with \`isSameDate(date1, date2)\`: \`${s}\`.`);
|
|
340
340
|
return s.getFullYear() === k.getFullYear() && s.getMonth() === k.getMonth() && s.getDate() === k.getDate();
|
|
341
|
-
}, Y = (s, k, D) =>
|
|
341
|
+
}, Y = (s, k, D) => j(s) ? s.getTime() >= k && s.getTime() <= D : console.warn(`Vue Cal: invalid date provided to \`isInRange(date, rangeStart, rangeEnd)\`: \`${s}\`.`), _ = (s) => {
|
|
342
342
|
const k = s.getFullYear();
|
|
343
343
|
return !(k % 400) || k % 100 && !(k % 4);
|
|
344
344
|
}, f = (s = null, k) => {
|
|
@@ -348,7 +348,7 @@ const lt = (y, t) => {
|
|
|
348
348
|
typeof s == "string" && (s = s.replace(/-/g, "/")), typeof k == "string" && (k = k.replace(/-/g, "/")), s = new Date(s).setHours(0, 0, 0, 0), k = new Date(k).setHours(0, 0, 1, 0);
|
|
349
349
|
const D = (new Date(k).getTimezoneOffset() - new Date(s).getTimezoneOffset()) * 60 * 1e3;
|
|
350
350
|
return Math.ceil((k - s - D) / (24 * 3600 * 1e3));
|
|
351
|
-
},
|
|
351
|
+
}, n = (s, k, D) => Math.abs(s.getTime() - k.getTime()) <= D * 60 * 1e3, j = (s) => s && s instanceof Date && !isNaN(s), X = (s, k = "YYYY-MM-DD", D = null) => {
|
|
352
352
|
if (D || (D = v.value), k || (k = "YYYY-MM-DD"), k === "YYYY-MM-DD") return U(s);
|
|
353
353
|
C = {}, W = {};
|
|
354
354
|
const J = {
|
|
@@ -376,33 +376,33 @@ const lt = (y, t) => {
|
|
|
376
376
|
m: () => ve(s, D).m,
|
|
377
377
|
s: () => ve(s, D).s
|
|
378
378
|
};
|
|
379
|
-
return k.replace(/(\{[a-zA-Z]+\}|[a-zA-Z]+)/g, (
|
|
379
|
+
return k.replace(/(\{[a-zA-Z]+\}|[a-zA-Z]+)/g, (se, me) => {
|
|
380
380
|
const o = J[me.replace(/\{|\}/g, "")];
|
|
381
381
|
return o !== void 0 ? o() : me;
|
|
382
382
|
});
|
|
383
383
|
}, U = (s) => {
|
|
384
384
|
const k = s.getMonth() + 1, D = s.getDate();
|
|
385
385
|
return `${s.getFullYear()}-${k < 10 ? "0" : ""}${k}-${D < 10 ? "0" : ""}${D}`;
|
|
386
|
-
},
|
|
387
|
-
let
|
|
386
|
+
}, K = (s, k = "HH:mm", D = null, J = !1) => {
|
|
387
|
+
let se = !1;
|
|
388
388
|
if (J) {
|
|
389
389
|
const [T, M, w] = [s.getHours(), s.getMinutes(), s.getSeconds()];
|
|
390
|
-
T + M + w === 141 && (
|
|
390
|
+
T + M + w === 141 && (se = !0);
|
|
391
391
|
}
|
|
392
|
-
if (s instanceof Date && k === "HH:mm") return
|
|
392
|
+
if (s instanceof Date && k === "HH:mm") return se ? "24:00" : te(s);
|
|
393
393
|
W = {}, D || (D = v.value);
|
|
394
394
|
const me = ve(s, D), o = k.replace(/(\{[a-zA-Z]+\}|[a-zA-Z]+)/g, (T, M) => {
|
|
395
395
|
const w = me[M.replace(/\{|\}/g, "")];
|
|
396
396
|
return w !== void 0 ? w : M;
|
|
397
397
|
});
|
|
398
|
-
return
|
|
398
|
+
return se ? o.replace("23:59", "24:00") : o;
|
|
399
399
|
}, te = (s) => {
|
|
400
400
|
const k = s.getHours(), D = s.getMinutes();
|
|
401
401
|
return `${(k < 10 ? "0" : "") + k}:${(D < 10 ? "0" : "") + D}`;
|
|
402
402
|
}, q = (s) => {
|
|
403
403
|
const k = Math.floor(s / 60).toString().padStart(2, 0), D = (s % 60).toString().padStart(2, 0);
|
|
404
404
|
return `${k}:${D}`;
|
|
405
|
-
},
|
|
405
|
+
}, re = (s) => {
|
|
406
406
|
if (s > 3 && s < 21) return "th";
|
|
407
407
|
switch (s % 10) {
|
|
408
408
|
case 1:
|
|
@@ -416,7 +416,7 @@ const lt = (y, t) => {
|
|
|
416
416
|
}
|
|
417
417
|
}, ae = (s, k) => {
|
|
418
418
|
if (C.D) return C;
|
|
419
|
-
const D = s.getFullYear(), J = s.getMonth() + 1,
|
|
419
|
+
const D = s.getFullYear(), J = s.getMonth() + 1, se = s.getDate(), o = (s.getDay() - 1 + 7) % 7;
|
|
420
420
|
return C = {
|
|
421
421
|
// Year.
|
|
422
422
|
YYYY: D,
|
|
@@ -435,11 +435,11 @@ const lt = (y, t) => {
|
|
|
435
435
|
MMMMG: () => (k.monthsGenitive || k.months)[J - 1],
|
|
436
436
|
// January to December in genitive form (Greek...)
|
|
437
437
|
// Day.
|
|
438
|
-
D:
|
|
438
|
+
D: se,
|
|
439
439
|
// 1 to 31.
|
|
440
|
-
DD: () =>
|
|
440
|
+
DD: () => se.toString().padStart(2, 0),
|
|
441
441
|
// 01 to 31.
|
|
442
|
-
S: () =>
|
|
442
|
+
S: () => re(se),
|
|
443
443
|
// st, nd, rd, th.
|
|
444
444
|
// Day of the week.
|
|
445
445
|
d: o + 1,
|
|
@@ -454,8 +454,8 @@ const lt = (y, t) => {
|
|
|
454
454
|
}, C;
|
|
455
455
|
}, ve = (s, k) => {
|
|
456
456
|
if (W.am) return W;
|
|
457
|
-
let D, J,
|
|
458
|
-
s instanceof Date ? (D = s.getHours(), J = s.getMinutes(),
|
|
457
|
+
let D, J, se;
|
|
458
|
+
s instanceof Date ? (D = s.getHours(), J = s.getMinutes(), se = s.getSeconds()) : (D = Math.floor(s / 60), J = Math.floor(s % 60));
|
|
459
459
|
const me = D % 12 ? D % 12 : 12, o = (k || { am: "am", pm: "pm" })[D === 24 || D < 12 ? "am" : "pm"];
|
|
460
460
|
return W = {
|
|
461
461
|
H: D,
|
|
@@ -466,7 +466,7 @@ const lt = (y, t) => {
|
|
|
466
466
|
AM: o.toUpperCase(),
|
|
467
467
|
m: J,
|
|
468
468
|
mm: J.toString().padStart(2, 0),
|
|
469
|
-
s:
|
|
469
|
+
s: se
|
|
470
470
|
}, W;
|
|
471
471
|
};
|
|
472
472
|
return {
|
|
@@ -478,7 +478,7 @@ const lt = (y, t) => {
|
|
|
478
478
|
addHours: m,
|
|
479
479
|
subtractHours: i,
|
|
480
480
|
addMinutes: S,
|
|
481
|
-
subtractMinutes:
|
|
481
|
+
subtractMinutes: a,
|
|
482
482
|
snapToInterval: I,
|
|
483
483
|
getWeek: e,
|
|
484
484
|
isToday: z,
|
|
@@ -489,11 +489,11 @@ const lt = (y, t) => {
|
|
|
489
489
|
stringToDate: c,
|
|
490
490
|
dateToMinutes: u,
|
|
491
491
|
countDays: p,
|
|
492
|
-
datesInSameTimeStep:
|
|
493
|
-
isValid:
|
|
492
|
+
datesInSameTimeStep: n,
|
|
493
|
+
isValid: j,
|
|
494
494
|
formatDate: X,
|
|
495
495
|
formatDateLite: U,
|
|
496
|
-
formatTime:
|
|
496
|
+
formatTime: K,
|
|
497
497
|
formatTimeLite: te,
|
|
498
498
|
formatMinutes: q
|
|
499
499
|
};
|
|
@@ -516,9 +516,9 @@ const lt = (y, t) => {
|
|
|
516
516
|
// A map of all the events indexed by ID for fast lookup. Each event is the original full event object.
|
|
517
517
|
}, z = d.events.slice().sort((u, p) => u.start - p.start < 0 ? -1 : 1);
|
|
518
518
|
for (let u of z) {
|
|
519
|
-
const p = typeof u.start == "string" || typeof u.end == "string",
|
|
520
|
-
let
|
|
521
|
-
if (!p && ((Y = u._) != null && Y.cachedStart) && ((_ = u._) != null && _.cachedEnd) && (
|
|
519
|
+
const p = typeof u.start == "string" || typeof u.end == "string", n = !((H = u._) != null && H.register) || !u.isOverlapping || !u.delete;
|
|
520
|
+
let j = !1;
|
|
521
|
+
if (!p && ((Y = u._) != null && Y.cachedStart) && ((_ = u._) != null && _.cachedEnd) && (j = u.start.getTime() !== ((f = u._) == null ? void 0 : f.cachedStart) || u.end.getTime() !== ((c = u._) == null ? void 0 : c.cachedEnd)), p || n || j) {
|
|
522
522
|
if (!C(u)) continue;
|
|
523
523
|
W(u), u._.cachedStart = u.start.getTime(), u._.cachedEnd = u.end.getTime();
|
|
524
524
|
}
|
|
@@ -528,8 +528,8 @@ const lt = (y, t) => {
|
|
|
528
528
|
u._.multiday = d.multidayEvents, d.multidayEvents ? e.multiday.push(u._.id) : (console.info("Vue Cal: Multi-day events provided without being enabled. Truncating event end to next midnight."), u.end = new Date(new Date(u.start).setHours(23, 59, 59, 999)), W(u)), e.byDate[u._.startFormatted] || (e.byDate[u._.startFormatted] = []), e.byDate[u._.startFormatted].push(u._.id);
|
|
529
529
|
else {
|
|
530
530
|
e.byDate[u._.startFormatted] || (e.byDate[u._.startFormatted] = []), e.byDate[u._.startFormatted].push(u._.id);
|
|
531
|
-
const X = u._.startFormatted.substring(0, 4), U = u._.startFormatted.substring(5, 7),
|
|
532
|
-
e.byYear[X] || (e.byYear[X] = {}), e.byYear[X][U] || (e.byYear[X][U] = {}), e.byYear[X][U][
|
|
531
|
+
const X = u._.startFormatted.substring(0, 4), U = u._.startFormatted.substring(5, 7), K = u._.startFormatted.substring(8, 10);
|
|
532
|
+
e.byYear[X] || (e.byYear[X] = {}), e.byYear[X][U] || (e.byYear[X][U] = {}), e.byYear[X][U][K] || (e.byYear[X][U][K] = []), e.byYear[X][U][K].push(u._.id);
|
|
533
533
|
}
|
|
534
534
|
}
|
|
535
535
|
return e;
|
|
@@ -541,8 +541,8 @@ const lt = (y, t) => {
|
|
|
541
541
|
}), e._.deleting === void 0 && (e._.deleting = !1), e._.deleted === void 0 && (e._.deleted = !1), e.isOverlapping || (e.isOverlapping = function(f = null) {
|
|
542
542
|
return this.getOverlappingEvents(f).length;
|
|
543
543
|
}), e.getOverlappingEvents || (e.getOverlappingEvents = function(f = null) {
|
|
544
|
-
var
|
|
545
|
-
const c = (f == null ? void 0 : f.start) || this.start, u = (f == null ? void 0 : f.end) || this.end, p = (
|
|
544
|
+
var n;
|
|
545
|
+
const c = (f == null ? void 0 : f.start) || this.start, u = (f == null ? void 0 : f.end) || this.end, p = (n = d.schedules) != null && n.length ? ~~((f == null ? void 0 : f.schedule) || this.schedule) : null;
|
|
546
546
|
return E(c, u, { excludeIds: [this._.id], schedule: p });
|
|
547
547
|
}), e._.register || (e._.register = (f) => {
|
|
548
548
|
e._.$el = f, e._.fireCreated && (y.emit("event-created", e), delete e._.fireCreated);
|
|
@@ -568,8 +568,8 @@ const lt = (y, t) => {
|
|
|
568
568
|
let H = typeof e == "string" || !isNaN(e) ? e : null;
|
|
569
569
|
const Y = typeof e == "object" ? Object.entries(e) : null;
|
|
570
570
|
if (Y) {
|
|
571
|
-
const [p,
|
|
572
|
-
H = (c = d.events.find((
|
|
571
|
+
const [p, n] = Y[0];
|
|
572
|
+
H = (c = d.events.find((j) => j[p] === n)) == null ? void 0 : c._.id;
|
|
573
573
|
}
|
|
574
574
|
if (!d.editableEvents.delete)
|
|
575
575
|
return console.info("Vue Cal: Event deletion is disabled. Enable it with the `editable-events` props.");
|
|
@@ -603,56 +603,56 @@ const lt = (y, t) => {
|
|
|
603
603
|
if (!_.length) return { cellOverlaps: {}, longestStreak: 0 };
|
|
604
604
|
const f = {};
|
|
605
605
|
let c = [], u = 0;
|
|
606
|
-
_.sort((p,
|
|
606
|
+
_.sort((p, n) => p.start - n.start || p.end - p.start - (n.end - n.start));
|
|
607
607
|
for (const p of _) {
|
|
608
|
-
const
|
|
609
|
-
f[
|
|
610
|
-
const
|
|
611
|
-
var
|
|
612
|
-
return (!((
|
|
613
|
-
}), X = new Set(
|
|
608
|
+
const n = p._.id;
|
|
609
|
+
f[n] || (f[n] = { overlaps: /* @__PURE__ */ new Set(), maxConcurrent: 1, position: 0 }), c = c.filter((te) => te.end > p.start);
|
|
610
|
+
const j = c.filter((te) => {
|
|
611
|
+
var re;
|
|
612
|
+
return (!((re = d.schedules) != null && re.length) || p.schedule === te.schedule) && te.start < p.end;
|
|
613
|
+
}), X = new Set(j.map((te) => {
|
|
614
614
|
var q;
|
|
615
615
|
return ((q = f[te._.id]) == null ? void 0 : q.position) ?? 0;
|
|
616
616
|
}));
|
|
617
617
|
let U = 0;
|
|
618
618
|
for (; X.has(U); ) U++;
|
|
619
|
-
f[
|
|
620
|
-
const
|
|
619
|
+
f[n].position = U, c.push(p);
|
|
620
|
+
const K = Math.max(1, ...j.map((te) => {
|
|
621
621
|
var q;
|
|
622
622
|
return ((q = f[te._.id]) == null ? void 0 : q.maxConcurrent) ?? 1;
|
|
623
623
|
}));
|
|
624
|
-
f[
|
|
625
|
-
for (const te of
|
|
626
|
-
f[te._.id].overlaps.add(
|
|
627
|
-
u = Math.max(u, f[
|
|
624
|
+
f[n].maxConcurrent = Math.max(j.length + 1, K);
|
|
625
|
+
for (const te of j)
|
|
626
|
+
f[te._.id].overlaps.add(n), f[n].overlaps.add(te._.id), f[te._.id].maxConcurrent = f[n].maxConcurrent;
|
|
627
|
+
u = Math.max(u, f[n].maxConcurrent);
|
|
628
628
|
}
|
|
629
629
|
for (const p in f) f[p].overlaps = [...f[p].overlaps];
|
|
630
630
|
return { cellOverlaps: f, longestStreak: u };
|
|
631
631
|
}, E = (e, z, { excludeIds: H = [], schedule: Y = null, background: _ = !0, allDay: f = !1 } = {}) => {
|
|
632
632
|
if (!Object.keys(h.value.byId).length) return [];
|
|
633
|
-
const c = e.getFullYear(), u = z.getFullYear(), p = e.getMonth() + 1,
|
|
633
|
+
const c = e.getFullYear(), u = z.getFullYear(), p = e.getMonth() + 1, n = z.getMonth() + 1, j = e.getDate(), X = z.getDate();
|
|
634
634
|
e.getTime(), z.getTime();
|
|
635
|
-
const U = new Date(e).setHours(0, 0, 0, 0),
|
|
635
|
+
const U = new Date(e).setHours(0, 0, 0, 0), K = new Date(z).setHours(23, 59, 59, 999), te = new Set(H), q = [];
|
|
636
636
|
if (Object.keys(h.value.byId).length <= 100) {
|
|
637
|
-
for (const
|
|
638
|
-
!
|
|
637
|
+
for (const re of Object.values(h.value.byId))
|
|
638
|
+
!re || te.has(re._.id) || Y !== null && Y !== re.schedule || _ === !1 && re.background || d.allDayEvents && (f && !re.allDay || !f && re.allDay) || re.start.getTime() < K && re.end.getTime() > U && q.push(re);
|
|
639
639
|
return q;
|
|
640
640
|
}
|
|
641
|
-
for (let
|
|
642
|
-
const ae = `${
|
|
641
|
+
for (let re = c; re <= u; re++) {
|
|
642
|
+
const ae = `${re}`, ve = h.value.byYear[ae];
|
|
643
643
|
if (!ve) continue;
|
|
644
|
-
const s =
|
|
644
|
+
const s = re === c ? p : 1, k = re === u ? n : 12;
|
|
645
645
|
for (let D = s; D <= k; D++) {
|
|
646
|
-
const J = String(D).padStart(2, "0"),
|
|
647
|
-
if (
|
|
648
|
-
for (const me in
|
|
646
|
+
const J = String(D).padStart(2, "0"), se = ve[J];
|
|
647
|
+
if (se)
|
|
648
|
+
for (const me in se) {
|
|
649
649
|
const o = +me;
|
|
650
|
-
if (o > X || o <
|
|
651
|
-
const T =
|
|
650
|
+
if (o > X || o < j) continue;
|
|
651
|
+
const T = se[me];
|
|
652
652
|
if (T != null && T.length)
|
|
653
653
|
for (let M = 0; M < T.length; M++) {
|
|
654
654
|
const w = h.value.byId[T[M]];
|
|
655
|
-
!w || te.has(w._.id) || Y !== null && Y !== w.schedule || _ === !1 && w.background || d.allDayEvents && (f && !w.allDay || !f && w.allDay) || w.start.getTime() <
|
|
655
|
+
!w || te.has(w._.id) || Y !== null && Y !== w.schedule || _ === !1 && w.background || d.allDayEvents && (f && !w.allDay || !f && w.allDay) || w.start.getTime() < K && w.end.getTime() > U && q.push(w);
|
|
656
656
|
}
|
|
657
657
|
}
|
|
658
658
|
}
|
|
@@ -698,26 +698,26 @@ const lt = (y, t) => {
|
|
|
698
698
|
(c = p["resize-start"]) == null || c.call(p, { e, event: m.resizingEvent });
|
|
699
699
|
}
|
|
700
700
|
if (m.cellEl) {
|
|
701
|
-
const { top: p, left:
|
|
702
|
-
m.moveX = z -
|
|
701
|
+
const { top: p, left: n, width: j, height: X } = m.cellEl.getBoundingClientRect();
|
|
702
|
+
m.moveX = z - n, m.moveY = H - p, m.movePercentageX = m.moveX * 100 / j, m.movePercentageY = m.moveY * 100 / X;
|
|
703
703
|
}
|
|
704
704
|
if (m.documentMouseX = z, m.documentMouseY = H, m.fromResizer && m.resizingEvent) {
|
|
705
|
-
const p = m.cellEl.__vueParentComponent.props.start, { newStart:
|
|
705
|
+
const p = m.cellEl.__vueParentComponent.props.start, { newStart: n, newEnd: j } = i(m.resizingEvent, p);
|
|
706
706
|
let X = !0;
|
|
707
707
|
const { resize: U } = ((u = d.eventListeners) == null ? void 0 : u.event) || {};
|
|
708
708
|
U && (X = await U({
|
|
709
709
|
e,
|
|
710
|
-
event: { ...m.resizingEvent, start:
|
|
711
|
-
overlaps: m.resizingEvent.getOverlappingEvents({ start:
|
|
712
|
-
})), X !== !1 ? (m.resizingEvent.start =
|
|
710
|
+
event: { ...m.resizingEvent, start: n, end: j },
|
|
711
|
+
overlaps: m.resizingEvent.getOverlappingEvents({ start: n, end: j })
|
|
712
|
+
})), X !== !1 ? (m.resizingEvent.start = n, m.resizingEvent.end = j, m.resizingLastAcceptedEvent && (m.resizingLastAcceptedEvent = null), e.preventDefault()) : U && (m.resizingLastAcceptedEvent = { ...m.resizingEvent, _: { ...m.resizingEvent._ } });
|
|
713
713
|
}
|
|
714
|
-
},
|
|
714
|
+
}, a = async (e) => {
|
|
715
715
|
var z, H, Y, _;
|
|
716
716
|
if ((z = y.touch) != null && z.isResizingEvent && m.resizingEvent) {
|
|
717
717
|
const f = m.cellEl.__vueParentComponent.props.start, { newStart: c, newEnd: u } = i(m.resizingEvent, f);
|
|
718
718
|
let p = !0;
|
|
719
|
-
const
|
|
720
|
-
|
|
719
|
+
const j = (((H = d.eventListeners) == null ? void 0 : H.event) || {})["resize-end"];
|
|
720
|
+
j && (p = await j({
|
|
721
721
|
e,
|
|
722
722
|
event: m.resizingEvent,
|
|
723
723
|
original: m.resizingOriginalEvent,
|
|
@@ -742,7 +742,7 @@ const lt = (y, t) => {
|
|
|
742
742
|
const Y = ((_ = e.touches) == null ? void 0 : _[0]) || e;
|
|
743
743
|
if (m.fromResizer = !!Y.target.closest(".vuecal__event-resizer"), m.fromResizer) {
|
|
744
744
|
const f = H.getBoundingClientRect();
|
|
745
|
-
m.startX = Y.clientX - f.left, m.startY = Y.clientY - f.top, m.startPercentageX = m.startX * 100 / f.width, m.startPercentageY = m.startY * 100 / f.height, m.cellEl = H.closest(".vuecal__cell"), m.resizeStartDate = z.start, m.resizingEvent = z, document.addEventListener(e.type === "touchstart" ? "touchmove" : "mousemove", S, { passive: !m.fromResizer }), document.addEventListener(e.type === "touchstart" ? "touchend" : "mouseup",
|
|
745
|
+
m.startX = Y.clientX - f.left, m.startY = Y.clientY - f.top, m.startPercentageX = m.startX * 100 / f.width, m.startPercentageY = m.startY * 100 / f.height, m.cellEl = H.closest(".vuecal__cell"), m.resizeStartDate = z.start, m.resizingEvent = z, document.addEventListener(e.type === "touchstart" ? "touchmove" : "mousemove", S, { passive: !m.fromResizer }), document.addEventListener(e.type === "touchstart" ? "touchend" : "mouseup", a, { once: !0 });
|
|
746
746
|
}
|
|
747
747
|
}
|
|
748
748
|
};
|
|
@@ -757,7 +757,7 @@ const lt = (y, t) => {
|
|
|
757
757
|
return g.setMilliseconds(-1), g;
|
|
758
758
|
}
|
|
759
759
|
return v.value === "month" ? c.value : m.value;
|
|
760
|
-
}),
|
|
760
|
+
}), a = b(() => {
|
|
761
761
|
const g = Z.value.getTime();
|
|
762
762
|
if (v.value === "week")
|
|
763
763
|
return i.value.getTime() <= g && g <= S.value.getTime();
|
|
@@ -791,13 +791,13 @@ const lt = (y, t) => {
|
|
|
791
791
|
}), f = b(() => {
|
|
792
792
|
const g = [], R = ["days", "week", "month"].includes(v.value);
|
|
793
793
|
let ee = 0;
|
|
794
|
-
for (let
|
|
794
|
+
for (let Q = 0; Q < Y.value + ee; Q++)
|
|
795
795
|
switch (v.value) {
|
|
796
796
|
case "day":
|
|
797
797
|
case "days":
|
|
798
798
|
case "week":
|
|
799
799
|
case "month": {
|
|
800
|
-
const ye = t.addDays(_.value,
|
|
800
|
+
const ye = t.addDays(_.value, Q), Ne = ye.getDay() || 7;
|
|
801
801
|
if (R && y.hasHiddenDays && y.hideWeekdays[Ne]) {
|
|
802
802
|
ee++;
|
|
803
803
|
continue;
|
|
@@ -808,14 +808,14 @@ const lt = (y, t) => {
|
|
|
808
808
|
}
|
|
809
809
|
case "year":
|
|
810
810
|
g.push({
|
|
811
|
-
start: new Date(_.value.getFullYear(),
|
|
812
|
-
end: new Date(_.value.getFullYear(),
|
|
811
|
+
start: new Date(_.value.getFullYear(), Q, 1, 0, 0, 0, 0),
|
|
812
|
+
end: new Date(_.value.getFullYear(), Q + 1, 0, 23, 59, 59, 999)
|
|
813
813
|
});
|
|
814
814
|
break;
|
|
815
815
|
case "years":
|
|
816
816
|
g.push({
|
|
817
|
-
start: new Date(_.value.getFullYear() +
|
|
818
|
-
end: new Date(_.value.getFullYear() +
|
|
817
|
+
start: new Date(_.value.getFullYear() + Q, 0, 1, 0, 0, 0, 0),
|
|
818
|
+
end: new Date(_.value.getFullYear() + Q + 1, 0, 0, 23, 59, 59, 999)
|
|
819
819
|
});
|
|
820
820
|
break;
|
|
821
821
|
}
|
|
@@ -823,21 +823,21 @@ const lt = (y, t) => {
|
|
|
823
823
|
}), c = b(() => f.value[f.value.length - 1].end), u = ue("right"), p = b(() => {
|
|
824
824
|
const g = Object.keys(y.availableViews);
|
|
825
825
|
return g[g.indexOf(v.value) + 1];
|
|
826
|
-
}),
|
|
826
|
+
}), n = b(() => {
|
|
827
827
|
const g = Object.keys(y.availableViews);
|
|
828
828
|
return g[g.indexOf(v.value) - 1];
|
|
829
829
|
});
|
|
830
|
-
function
|
|
830
|
+
function j(g, R, ee = !1) {
|
|
831
831
|
if (!R || !R[g]) return g + 1;
|
|
832
|
-
const
|
|
833
|
-
return ee && typeof
|
|
832
|
+
const Q = R[g];
|
|
833
|
+
return ee && typeof Q == "string" ? Q.substring(0, 3) : Q;
|
|
834
834
|
}
|
|
835
835
|
function X(g, R, ee) {
|
|
836
|
-
const { monthsArray:
|
|
837
|
-
return $t ? ye ? `${
|
|
836
|
+
const { monthsArray: Q, monthBeforeDay: ye, canTruncate: Ne, xs: ze } = ee, Me = g.getMonth(), Ee = g.getFullYear(), Ye = R.getMonth(), Pe = R.getFullYear(), Be = Me !== Ye, $t = Ee !== Pe, Te = Ne && (ze || Be), Le = g.getDate(), Ae = R.getDate();
|
|
837
|
+
return $t ? ye ? `${j(Me, Q, Te)} ${Le}, ${Ee} - ${j(Ye, Q, Te)} ${Ae}, ${Pe}` : `${Le} ${j(Me, Q, Te)} ${Ee} - ${Ae} ${j(Ye, Q, Te)} ${Pe}` : Be ? ye ? `${j(Me, Q, Te)} ${Le} - ${j(Ye, Q, Te)} ${Ae}, ${Ee}` : `${Le} ${j(Me, Q, Te)} - ${Ae} ${j(Ye, Q, Te)} ${Ee}` : ye ? `${j(Me, Q, Te)} ${Le}-${Ae}, ${Ee}` : `${Le}-${Ae} ${j(Me, Q, Te)} ${Ee}`;
|
|
838
838
|
}
|
|
839
839
|
const U = b(() => {
|
|
840
|
-
const { dateFormat: g, months: R, monthsGenitive: ee, week:
|
|
840
|
+
const { dateFormat: g, months: R, monthsGenitive: ee, week: Q, truncations: ye } = r, Ne = y.locale, ze = ye !== !1, Me = g.indexOf("M") < g.indexOf("D"), Ee = ee && Ne === "el" ? ee : R;
|
|
841
841
|
switch (v.value) {
|
|
842
842
|
case "day":
|
|
843
843
|
return t.formatDate(_.value, g);
|
|
@@ -855,7 +855,7 @@ const lt = (y, t) => {
|
|
|
855
855
|
_.value,
|
|
856
856
|
y.startWeekOnSunday && !y.hideWeekdays[7]
|
|
857
857
|
);
|
|
858
|
-
Pe += ` <small>${
|
|
858
|
+
Pe += ` <small>${Q} ${Be}</small>`;
|
|
859
859
|
}
|
|
860
860
|
return Pe;
|
|
861
861
|
}
|
|
@@ -869,7 +869,7 @@ const lt = (y, t) => {
|
|
|
869
869
|
return `${_.value.getFullYear()} - ${m.value.getFullYear()}`;
|
|
870
870
|
}
|
|
871
871
|
});
|
|
872
|
-
async function
|
|
872
|
+
async function K() {
|
|
873
873
|
switch (l.value = new Date(L.value || Z.value), l.value.setHours(0, 0, 0, 0), v.value) {
|
|
874
874
|
case "day":
|
|
875
875
|
break;
|
|
@@ -896,23 +896,23 @@ const lt = (y, t) => {
|
|
|
896
896
|
extendedStart: i.value,
|
|
897
897
|
extendedEnd: S.value,
|
|
898
898
|
cellDates: f.value,
|
|
899
|
-
containsToday:
|
|
899
|
+
containsToday: a.value,
|
|
900
900
|
events: G.value
|
|
901
901
|
}));
|
|
902
902
|
}
|
|
903
903
|
function te(g) {
|
|
904
904
|
const R = v.value, ee = y.availableViews[R];
|
|
905
|
-
g[R] && JSON.stringify(g[R]) === JSON.stringify(ee) ||
|
|
905
|
+
g[R] && JSON.stringify(g[R]) === JSON.stringify(ee) || K();
|
|
906
906
|
}
|
|
907
907
|
function q(g, R = !0, ee = null) {
|
|
908
|
-
const
|
|
909
|
-
v.value === g && !ee || (
|
|
908
|
+
const Q = Object.keys(y.availableViews);
|
|
909
|
+
v.value === g && !ee || (Q.includes(g) ? (u.value = Q.indexOf(g) < Q.indexOf(v.value) ? "left" : "right", R && v.value !== g && d("update:view", g), v.value = g, ee ? J(ee) : K()) : console.warn(`Vue Cal: the \`${g}\` view is not available.`));
|
|
910
910
|
}
|
|
911
|
-
function
|
|
911
|
+
function re() {
|
|
912
912
|
p.value ? q(p.value) : console.warn("Vue Cal: no broader view is available.");
|
|
913
913
|
}
|
|
914
914
|
function ae() {
|
|
915
|
-
|
|
915
|
+
n.value ? q(n.value) : console.warn("Vue Cal: no narrower view is available.");
|
|
916
916
|
}
|
|
917
917
|
function ve() {
|
|
918
918
|
k(!1);
|
|
@@ -955,45 +955,45 @@ const lt = (y, t) => {
|
|
|
955
955
|
}
|
|
956
956
|
function J(g, R = !0, ee = !1) {
|
|
957
957
|
if (!t.isValid(g)) return console.warn("Vue Cal: can't navigate to the given date: invalid date provided to `updateViewDate(date)`.");
|
|
958
|
-
let [
|
|
959
|
-
v.value === "month" && ([
|
|
958
|
+
let [Q, ye] = [_.value, c.value];
|
|
959
|
+
v.value === "month" && ([Q, ye] = [F.value, m.value]), (!t.isInRange(g, Q, ye) || ee) && (g.setHours(0, 0, 0, 0), u.value = g.getTime() < Q.getTime() ? "left" : "right", L.value = g, R && d("update:viewDate", g), K());
|
|
960
960
|
}
|
|
961
|
-
function
|
|
961
|
+
function se(g, R = !0) {
|
|
962
962
|
if (!t.isValid(g)) return console.warn("Vue Cal: can't update the selected date: invalid date provided to `updateSelectedDate(date)`.");
|
|
963
|
-
const { isValid: ee, isSameDate:
|
|
964
|
-
(!A.value || !ee(A.value) || !
|
|
963
|
+
const { isValid: ee, isSameDate: Q } = t;
|
|
964
|
+
(!A.value || !ee(A.value) || !Q(g, A.value)) && (g.setHours(0, 0, 0, 0), A.value = g, R && d("update:selectedDate", g));
|
|
965
965
|
}
|
|
966
966
|
function me(g) {
|
|
967
|
-
!g && !l.value.getDay() ? J(t.addDays(l.value, 1), !0, !0) : (u.value = "left",
|
|
967
|
+
!g && !l.value.getDay() ? J(t.addDays(l.value, 1), !0, !0) : (u.value = "left", K());
|
|
968
968
|
}
|
|
969
969
|
function o(g) {
|
|
970
970
|
g && y.startWeekOnSunday && !l.value.getDay() ? J(t.addDays(l.value, 1), !0, !0) : !g && y.startWeekOnSunday && l.value.getDay() === 1 && J(t.subtractDays(l.value, 1), !0, !0);
|
|
971
971
|
}
|
|
972
972
|
function T() {
|
|
973
|
-
|
|
973
|
+
K();
|
|
974
974
|
}
|
|
975
975
|
function M(g) {
|
|
976
|
-
var
|
|
977
|
-
const R = (
|
|
976
|
+
var Q;
|
|
977
|
+
const R = (Q = C.value) == null ? void 0 : Q.querySelector(".vuecal__scrollable"), ee = g ? g * y.timeCellHeight / y.timeStep : 0;
|
|
978
978
|
R == null || R.scrollTo({ top: ee, behavior: "smooth" });
|
|
979
979
|
}
|
|
980
980
|
function w() {
|
|
981
981
|
const g = /* @__PURE__ */ new Date();
|
|
982
982
|
M(g.getHours() * 60 + g.getMinutes());
|
|
983
983
|
}
|
|
984
|
-
function
|
|
984
|
+
function B() {
|
|
985
985
|
M(0);
|
|
986
986
|
}
|
|
987
987
|
const G = b(() => h.getViewEvents(f.value)), oe = h.createEvent, ge = h.deleteEvent;
|
|
988
|
-
return De(() => y.view, (g) => q(g, !1)), De(() => y.availableViews, te), De(() => y.datePicker, () => q("month")), De(() => y.viewDate, (g) => J(g, !1)), De(() => y.selectedDate, (g) =>
|
|
988
|
+
return De(() => y.view, (g) => q(g, !1)), De(() => y.availableViews, te), De(() => y.datePicker, () => q("month")), De(() => y.viewDate, (g) => J(g, !1)), De(() => y.selectedDate, (g) => se(g, !1)), De(() => y.startWeekOnSunday, (g) => me(g)), De(() => y.hideWeekends, (g) => o(g)), De(() => y.hideWeekdays, T), De(() => Y.value, () => {
|
|
989
989
|
Y.value > 90 && console.warn("Vue Cal: high cell count detected. Performance may degrade when interactions are enabled.");
|
|
990
990
|
}), De(() => y.watchRealTime, (g) => {
|
|
991
991
|
g && y.time ? e() : E = clearTimeout(E);
|
|
992
|
-
}),
|
|
992
|
+
}), K(), y.time && y.watchRealTime && e(), Re(() => E = clearTimeout(E)), {
|
|
993
993
|
now: Z,
|
|
994
994
|
id: v,
|
|
995
995
|
broaderView: p,
|
|
996
|
-
narrowerView:
|
|
996
|
+
narrowerView: n,
|
|
997
997
|
title: U,
|
|
998
998
|
viewDate: L,
|
|
999
999
|
start: F,
|
|
@@ -1004,7 +1004,7 @@ const lt = (y, t) => {
|
|
|
1004
1004
|
// Full range, including out of scope month days, and hidden leading/trailing days.
|
|
1005
1005
|
firstCellDate: _,
|
|
1006
1006
|
lastCellDate: c,
|
|
1007
|
-
containsToday:
|
|
1007
|
+
containsToday: a,
|
|
1008
1008
|
selectedDate: A,
|
|
1009
1009
|
cellDates: f,
|
|
1010
1010
|
cols: z,
|
|
@@ -1015,17 +1015,17 @@ const lt = (y, t) => {
|
|
|
1015
1015
|
events: G,
|
|
1016
1016
|
transitionDirection: u,
|
|
1017
1017
|
switch: (g, R) => q(g, !0, R),
|
|
1018
|
-
broader:
|
|
1018
|
+
broader: re,
|
|
1019
1019
|
narrower: ae,
|
|
1020
1020
|
previous: ve,
|
|
1021
1021
|
next: s,
|
|
1022
1022
|
navigate: k,
|
|
1023
1023
|
goToToday: D,
|
|
1024
1024
|
updateViewDate: J,
|
|
1025
|
-
updateSelectedDate:
|
|
1025
|
+
updateSelectedDate: se,
|
|
1026
1026
|
scrollToCurrentTime: w,
|
|
1027
1027
|
scrollToTime: M,
|
|
1028
|
-
scrollTop:
|
|
1028
|
+
scrollTop: B,
|
|
1029
1029
|
createEvent: oe,
|
|
1030
1030
|
deleteEvent: ge,
|
|
1031
1031
|
// Getters.
|
|
@@ -1230,7 +1230,7 @@ const lt = (y, t) => {
|
|
|
1230
1230
|
r.clickToNavigate && d.broader();
|
|
1231
1231
|
}, C = b(() => r.clickToNavigate ? { click: h } : {});
|
|
1232
1232
|
return (W, v) => (V(), P("div", At, [
|
|
1233
|
-
|
|
1233
|
+
O(W.$slots, "header", {
|
|
1234
1234
|
view: $(d),
|
|
1235
1235
|
availableViews: $(r).availableViews,
|
|
1236
1236
|
vuecal: $(t)
|
|
@@ -1250,13 +1250,13 @@ const lt = (y, t) => {
|
|
|
1250
1250
|
onClick: v[0] || (v[0] = (...A) => $(d).previous && $(d).previous(...A)),
|
|
1251
1251
|
type: "button"
|
|
1252
1252
|
}, [
|
|
1253
|
-
|
|
1253
|
+
O(W.$slots, "previous-button")
|
|
1254
1254
|
], 2),
|
|
1255
1255
|
he("div", Bt, [
|
|
1256
1256
|
Oe(Ue, {
|
|
1257
1257
|
name: `vuecal-slide-fade--${$(d).transitionDirection}`
|
|
1258
1258
|
}, {
|
|
1259
|
-
default:
|
|
1259
|
+
default: N(() => [
|
|
1260
1260
|
(V(), P("div", {
|
|
1261
1261
|
key: $(d).id + $(d).start.getTime()
|
|
1262
1262
|
}, [
|
|
@@ -1264,8 +1264,8 @@ const lt = (y, t) => {
|
|
|
1264
1264
|
key: 0,
|
|
1265
1265
|
class: "vuecal__title"
|
|
1266
1266
|
}, Ie(C.value)), {
|
|
1267
|
-
default:
|
|
1268
|
-
W.$slots[`title.${$(d).id}`] ?
|
|
1267
|
+
default: N(() => [
|
|
1268
|
+
W.$slots[`title.${$(d).id}`] ? O(W.$slots, `title.${$(d).id}`, ne(ie({ key: 0 }, $(d)))) : O(W.$slots, "title", ne(ie({ key: 1 }, $(d))))
|
|
1269
1269
|
]),
|
|
1270
1270
|
_: 3
|
|
1271
1271
|
}, 16)) : (V(), Se(xe($(r).clickToNavigate && $(d).broaderView ? "button" : "div"), ie({
|
|
@@ -1280,7 +1280,7 @@ const lt = (y, t) => {
|
|
|
1280
1280
|
}, 8, ["name"])
|
|
1281
1281
|
]),
|
|
1282
1282
|
$(r).todayButton ? (V(), P(de, { key: 0 }, [
|
|
1283
|
-
W.$slots["today-button"] ?
|
|
1283
|
+
W.$slots["today-button"] ? O(W.$slots, "today-button", {
|
|
1284
1284
|
key: 0,
|
|
1285
1285
|
navigate: () => !$(d).containsToday && $(d).goToToday(),
|
|
1286
1286
|
active: $(d).containsToday
|
|
@@ -1298,7 +1298,7 @@ const lt = (y, t) => {
|
|
|
1298
1298
|
onClick: v[2] || (v[2] = (...A) => $(d).next && $(d).next(...A)),
|
|
1299
1299
|
type: "button"
|
|
1300
1300
|
}, [
|
|
1301
|
-
|
|
1301
|
+
O(W.$slots, "next-button")
|
|
1302
1302
|
], 2)
|
|
1303
1303
|
])) : x("", !0)
|
|
1304
1304
|
], 64))
|
|
@@ -1313,7 +1313,7 @@ const lt = (y, t) => {
|
|
|
1313
1313
|
}, Zt = { class: "vuecal__event-start" }, Kt = {
|
|
1314
1314
|
key: 1,
|
|
1315
1315
|
class: "vuecal__event-end"
|
|
1316
|
-
}, Qt = { key: 0 }, xt = ["innerHTML"],
|
|
1316
|
+
}, Qt = { key: 0 }, xt = ["innerHTML"], en = 16, st = {
|
|
1317
1317
|
__name: "event",
|
|
1318
1318
|
props: {
|
|
1319
1319
|
event: { type: Object, required: !0 },
|
|
@@ -1364,10 +1364,10 @@ const lt = (y, t) => {
|
|
|
1364
1364
|
cellEl: null,
|
|
1365
1365
|
// Store the cell DOM node for a more efficient resizing calc in mousemove/touchmove.
|
|
1366
1366
|
schedule: null
|
|
1367
|
-
}), F = b(() => r.editableEvents.drag && l.draggable !== !1 && !l.background && E.canTouchAndDrag !== !1), m = b(() => h.isMonth || h.isYear || h.isYears || d.inAllDayBar || l._.multiday && !
|
|
1367
|
+
}), F = b(() => r.editableEvents.drag && l.draggable !== !1 && !l.background && E.canTouchAndDrag !== !1), m = b(() => h.isMonth || h.isYear || h.isYears || d.inAllDayBar || l._.multiday && !a.value ? !1 : r.time && r.editableEvents.resize && l.resizable !== !1 && !l.background);
|
|
1368
1368
|
b(() => r.editableEvents.delete && l.deletable !== !1 && !l.background);
|
|
1369
1369
|
const i = b(() => {
|
|
1370
|
-
var c, u, p,
|
|
1370
|
+
var c, u, p, n, j;
|
|
1371
1371
|
const f = !!((c = l._) != null && c.multiday);
|
|
1372
1372
|
return {
|
|
1373
1373
|
[`vuecal__event--${l._.id}`]: !0,
|
|
@@ -1376,8 +1376,8 @@ const lt = (y, t) => {
|
|
|
1376
1376
|
"vuecal__event--background": !!l.background,
|
|
1377
1377
|
"vuecal__event--all-day": l.allDay || ((u = l._) == null ? void 0 : u.startMinutes) === 0 && ((p = l._) == null ? void 0 : p.duration) === 1440,
|
|
1378
1378
|
"vuecal__event--multiday": f,
|
|
1379
|
-
"vuecal__event--cut-top": !d.inAllDayBar && (((
|
|
1380
|
-
"vuecal__event--cut-bottom": !d.inAllDayBar && (((
|
|
1379
|
+
"vuecal__event--cut-top": !d.inAllDayBar && (((n = l._) == null ? void 0 : n.startMinutes) < r.timeFrom || f && !S.value),
|
|
1380
|
+
"vuecal__event--cut-bottom": !d.inAllDayBar && (((j = l._) == null ? void 0 : j.endMinutes) > r.timeTo || f && !a.value),
|
|
1381
1381
|
// Only apply the dragging class on the event copy that is being dragged.
|
|
1382
1382
|
"vuecal__event--dragging": !l._.draggingGhost && l._.dragging,
|
|
1383
1383
|
// Only apply the dragging-ghost class on the event original that remains fixed while a copy is being
|
|
@@ -1389,7 +1389,7 @@ const lt = (y, t) => {
|
|
|
1389
1389
|
"vuecal__event--dragging-ghost": l._.draggingGhost,
|
|
1390
1390
|
"vuecal__event--resizing": W.isResizingEvent
|
|
1391
1391
|
};
|
|
1392
|
-
}), S = b(() => l._.multiday ? new Date(l.start).setHours(0, 0, 0, 0) === d.cellStart.getTime() : !0),
|
|
1392
|
+
}), S = b(() => l._.multiday ? new Date(l.start).setHours(0, 0, 0, 0) === d.cellStart.getTime() : !0), a = b(() => l._.multiday ? v.isSameDate(new Date(new Date(l.end).setMilliseconds(-1)), d.cellEnd) : !0), I = b(() => {
|
|
1393
1393
|
const f = new Date(l.start).setHours(0, 0, 0, 0), c = new Date(l.end).setHours(0, 0, 0, 0);
|
|
1394
1394
|
return Math.ceil((c - f) / (1e3 * 60 * 60 * 24));
|
|
1395
1395
|
}), e = b(() => {
|
|
@@ -1400,34 +1400,34 @@ const lt = (y, t) => {
|
|
|
1400
1400
|
color: l.color || null
|
|
1401
1401
|
};
|
|
1402
1402
|
if (f) {
|
|
1403
|
-
let p = l._.startMinutes,
|
|
1404
|
-
l._.multiday && (S.value || (p = 0),
|
|
1405
|
-
const
|
|
1406
|
-
u[c ? "left" : "top"] = `${U}%`, u[c ? "width" : "height"] = `${
|
|
1403
|
+
let p = l._.startMinutes, n = l._.endMinutes;
|
|
1404
|
+
l._.multiday && (S.value || (p = 0), a.value || (n = 1440));
|
|
1405
|
+
const j = Math.max(r.timeFrom, p), X = Math.min(r.timeTo, n) + (l._.duration && !n ? 1440 : 0), U = Ve(j, r), K = Ve(X, r) - U;
|
|
1406
|
+
u[c ? "left" : "top"] = `${U}%`, u[c ? "width" : "height"] = `${K}%`;
|
|
1407
1407
|
}
|
|
1408
1408
|
return u;
|
|
1409
1409
|
}), z = b(() => {
|
|
1410
1410
|
const f = { ...r.eventListeners.event };
|
|
1411
|
-
for (const [p,
|
|
1412
|
-
["resize-end"].includes(p) || (f[p] = (
|
|
1413
|
-
|
|
1411
|
+
for (const [p, n] of Object.entries(f))
|
|
1412
|
+
["resize-end"].includes(p) || (f[p] = (j) => {
|
|
1413
|
+
j.type !== "drop" && n(j.type ? { e: j, event: l } : j);
|
|
1414
1414
|
});
|
|
1415
1415
|
const c = { ...f };
|
|
1416
1416
|
f.touchstart = (p) => {
|
|
1417
|
-
var
|
|
1417
|
+
var n;
|
|
1418
1418
|
p.stopPropagation(), E.touchAndDragTimer = setTimeout(() => {
|
|
1419
1419
|
E.canTouchAndDrag = !0;
|
|
1420
|
-
}, 500), _(p), (
|
|
1420
|
+
}, 500), _(p), (n = c.touchstart) == null || n.call(c, { e: p, event: l });
|
|
1421
1421
|
}, f.mousedown = (p) => {
|
|
1422
|
-
var
|
|
1423
|
-
p.stopPropagation(), _(p), (
|
|
1422
|
+
var n;
|
|
1423
|
+
p.stopPropagation(), _(p), (n = c.mousedown) == null || n.call(c, { e: p, event: l });
|
|
1424
1424
|
};
|
|
1425
1425
|
let u = null;
|
|
1426
1426
|
return f.click = (p) => {
|
|
1427
|
-
var
|
|
1428
|
-
(
|
|
1429
|
-
var
|
|
1430
|
-
u = null, (
|
|
1427
|
+
var n;
|
|
1428
|
+
(n = c.click) == null || n.call(c, { e: p, event: l }), u ? u = clearTimeout(u) : u = setTimeout(() => {
|
|
1429
|
+
var j;
|
|
1430
|
+
u = null, (j = c["delayed-click"]) == null || j.call(c, { e: p, event: l });
|
|
1431
1431
|
}, 400);
|
|
1432
1432
|
}, f.dblclick = (p) => {
|
|
1433
1433
|
c.dblclick ? c.dblclick({ e: p, event: l }) : l.delete(1);
|
|
@@ -1435,15 +1435,15 @@ const lt = (y, t) => {
|
|
|
1435
1435
|
});
|
|
1436
1436
|
let H = null, Y = 0;
|
|
1437
1437
|
const _ = (f) => {
|
|
1438
|
-
var
|
|
1439
|
-
const c = ((
|
|
1438
|
+
var n, j, X;
|
|
1439
|
+
const c = ((n = f.touches) == null ? void 0 : n[0]) || f;
|
|
1440
1440
|
E.fromResizer = c.target.closest(".vuecal__event-resizer");
|
|
1441
1441
|
const u = Date.now();
|
|
1442
|
-
(!H || u - Y >
|
|
1442
|
+
(!H || u - Y > en) && (H = L.value.getBoundingClientRect(), Y = u);
|
|
1443
1443
|
const p = H;
|
|
1444
|
-
E.startX = (((
|
|
1445
|
-
var U,
|
|
1446
|
-
E.holding = !0, (
|
|
1444
|
+
E.startX = (((j = f.touches) == null ? void 0 : j[0]) || f).clientX - p.left, E.startY = (((X = f.touches) == null ? void 0 : X[0]) || f).clientY - p.top, E.startPercentageX = E.startX * 100 / p.width, E.startPercentageY = E.startY * 100 / p.height, E.cellEl = L.value.closest(".vuecal__cell"), E.resizeStartDate = l.start, E.fromResizer && Z(f, l, L.value), E.holdTimer = setTimeout(() => {
|
|
1445
|
+
var U, K;
|
|
1446
|
+
E.holding = !0, (K = (U = z.value).hold) == null || K.call(U, { e: f, event: l });
|
|
1447
1447
|
}, 1e3);
|
|
1448
1448
|
};
|
|
1449
1449
|
return Ze(() => l._.register(L.value)), Re(() => {
|
|
@@ -1458,13 +1458,13 @@ const lt = (y, t) => {
|
|
|
1458
1458
|
onDragend: c[3] || (c[3] = (u) => F.value && $(C).eventDragEnd(u, l))
|
|
1459
1459
|
}), [
|
|
1460
1460
|
he("div", qt, [
|
|
1461
|
-
f.$slots["event.all-day"] ?
|
|
1461
|
+
f.$slots["event.all-day"] ? O(f.$slots, "event.all-day", {
|
|
1462
1462
|
key: 0,
|
|
1463
1463
|
event: l
|
|
1464
|
-
}) : f.$slots[`event.${$(h).id}`] ?
|
|
1464
|
+
}) : f.$slots[`event.${$(h).id}`] ? O(f.$slots, `event.${$(h).id}`, {
|
|
1465
1465
|
key: 1,
|
|
1466
1466
|
event: l
|
|
1467
|
-
}) :
|
|
1467
|
+
}) : O(f.$slots, "event", {
|
|
1468
1468
|
key: 2,
|
|
1469
1469
|
event: l
|
|
1470
1470
|
}, () => [
|
|
@@ -1491,7 +1491,7 @@ const lt = (y, t) => {
|
|
|
1491
1491
|
}, ["prevent", "stop"]))
|
|
1492
1492
|
}, null, 32)) : x("", !0),
|
|
1493
1493
|
Oe(Ue, { name: "vuecal-delete-btn" }, {
|
|
1494
|
-
default:
|
|
1494
|
+
default: N(() => [
|
|
1495
1495
|
l._.deleting ? (V(), P("div", {
|
|
1496
1496
|
key: 0,
|
|
1497
1497
|
class: "vuecal__event-delete",
|
|
@@ -1502,28 +1502,28 @@ const lt = (y, t) => {
|
|
|
1502
1502
|
})
|
|
1503
1503
|
], 16, It));
|
|
1504
1504
|
}
|
|
1505
|
-
},
|
|
1505
|
+
}, tn = ["innerHTML"], nn = ["data-schedule"], an = {
|
|
1506
1506
|
key: 1,
|
|
1507
1507
|
class: "vuecal__cell-date"
|
|
1508
|
-
},
|
|
1508
|
+
}, sn = {
|
|
1509
1509
|
key: 2,
|
|
1510
1510
|
class: "vuecal__cell-content"
|
|
1511
|
-
},
|
|
1511
|
+
}, ln = {
|
|
1512
1512
|
key: 3,
|
|
1513
1513
|
class: "vuecal__cell-events"
|
|
1514
|
-
},
|
|
1514
|
+
}, rn = {
|
|
1515
1515
|
key: 1,
|
|
1516
1516
|
class: "vuecal__cell-date"
|
|
1517
|
-
},
|
|
1517
|
+
}, on = {
|
|
1518
1518
|
key: 2,
|
|
1519
1519
|
class: "vuecal__cell-content"
|
|
1520
|
-
},
|
|
1520
|
+
}, un = {
|
|
1521
1521
|
key: 3,
|
|
1522
1522
|
class: "vuecal__cell-events"
|
|
1523
|
-
},
|
|
1523
|
+
}, cn = {
|
|
1524
1524
|
key: 5,
|
|
1525
1525
|
class: "vuecal__cell-events-count"
|
|
1526
|
-
},
|
|
1526
|
+
}, dn = ["title"], kt = {
|
|
1527
1527
|
__name: "cell",
|
|
1528
1528
|
props: {
|
|
1529
1529
|
// Even with time=false, the date of the cell will still be provided in order to attach
|
|
@@ -1562,7 +1562,7 @@ const lt = (y, t) => {
|
|
|
1562
1562
|
movePercentageX: 0,
|
|
1563
1563
|
movePercentageY: 0,
|
|
1564
1564
|
schedule: null
|
|
1565
|
-
}), S = ue(!1),
|
|
1565
|
+
}), S = ue(!1), a = ue({ cellOverlaps: {}, longestStreak: 0 }), I = b(() => {
|
|
1566
1566
|
let o = Math.min(i.startPercentageY, i.movePercentageY), T = Math.max(i.startPercentageY, i.movePercentageY), M = je(o, h), w = je(T, h);
|
|
1567
1567
|
return h.snapToInterval && (M = C.snapToInterval(M, h.snapToInterval), w = C.snapToInterval(w, h.snapToInterval), o = Ve(M, h), T = Ve(w, h)), {
|
|
1568
1568
|
style: {
|
|
@@ -1580,16 +1580,16 @@ const lt = (y, t) => {
|
|
|
1580
1580
|
return o && T && M;
|
|
1581
1581
|
}), z = b(() => {
|
|
1582
1582
|
var oe;
|
|
1583
|
-
const o = /* @__PURE__ */ new Date(), T = r.start.getFullYear(), M = r.start.getMonth(), w = t.start.getFullYear(),
|
|
1583
|
+
const o = /* @__PURE__ */ new Date(), T = r.start.getFullYear(), M = r.start.getMonth(), w = t.start.getFullYear(), B = t.start.getMonth();
|
|
1584
1584
|
return {
|
|
1585
1585
|
[`vuecal__cell--${Ge[t.start.getDay()]}`]: r.isDay || r.isDays || r.isWeek || r.isMonth,
|
|
1586
|
-
[`vuecal__cell--${Yt[
|
|
1586
|
+
[`vuecal__cell--${Yt[B]}`]: r.isYear,
|
|
1587
1587
|
[`vuecal__cell--${w}`]: r.isYears,
|
|
1588
1588
|
"vuecal__cell--today": Z.value,
|
|
1589
|
-
"vuecal__cell--current-month": r.isYear && w === o.getFullYear() &&
|
|
1589
|
+
"vuecal__cell--current-month": r.isYear && w === o.getFullYear() && B === o.getMonth(),
|
|
1590
1590
|
"vuecal__cell--current-year": r.isYears && w === o.getFullYear(),
|
|
1591
|
-
"vuecal__cell--out-of-range": r.isMonth && (w !== T ||
|
|
1592
|
-
"vuecal__cell--before-min": U.value &&
|
|
1591
|
+
"vuecal__cell--out-of-range": r.isMonth && (w !== T || B !== M),
|
|
1592
|
+
"vuecal__cell--before-min": U.value && j.value,
|
|
1593
1593
|
"vuecal__cell--after-max": U.value && X.value,
|
|
1594
1594
|
"vuecal__cell--disabled": U.value,
|
|
1595
1595
|
"vuecal__cell--selected": r.selectedDate && r.selectedDate.getTime() >= t.start.getTime() && r.selectedDate.getTime() <= t.end.getTime(),
|
|
@@ -1625,73 +1625,73 @@ const lt = (y, t) => {
|
|
|
1625
1625
|
if (r.isMonth || r.isYear || r.isYears || t.allDay) return {};
|
|
1626
1626
|
const o = typeof document < "u" && document.documentElement.getAttribute("dir") === "rtl", T = h.horizontal, M = {};
|
|
1627
1627
|
for (const w of Y.value) {
|
|
1628
|
-
const
|
|
1629
|
-
M[
|
|
1628
|
+
const B = w._.id, { maxConcurrent: G = 1, position: oe = 0 } = a.value.cellOverlaps[B] || {}, ge = o ? "right" : "left", g = T ? "height" : "width";
|
|
1629
|
+
M[B] = { [T ? "top" : ge]: `${100 / G * oe}%` }, h.stackEvents ? M[B][g] = `${100 / G + (oe === G - 1 ? 0 : 15)}%` : M[B][g] = `${100 / G}%`;
|
|
1630
1630
|
}
|
|
1631
1631
|
return M;
|
|
1632
1632
|
}), u = b(() => {
|
|
1633
1633
|
const o = {};
|
|
1634
1634
|
for (const T of Y.value) {
|
|
1635
|
-
const M = T._.id, { maxConcurrent: w = 1, position:
|
|
1636
|
-
o[M] = `vuecal__event--stack-${
|
|
1635
|
+
const M = T._.id, { maxConcurrent: w = 1, position: B = 0 } = a.value.cellOverlaps[M] || {};
|
|
1636
|
+
o[M] = `vuecal__event--stack-${B + 1}-${w}`;
|
|
1637
1637
|
}
|
|
1638
1638
|
return o;
|
|
1639
|
-
}), p = b(() => h.showCellEventCount && _.value.length),
|
|
1639
|
+
}), p = b(() => h.showCellEventCount && _.value.length), n = b(() => {
|
|
1640
1640
|
var M;
|
|
1641
1641
|
if (!h.specialHours || r.isMonth || r.isYear || r.isYears || t.allDay) return;
|
|
1642
1642
|
const o = Ge[t.start.getDay()];
|
|
1643
1643
|
let T = (M = h.specialHours) == null ? void 0 : M[o];
|
|
1644
1644
|
if (T)
|
|
1645
1645
|
return Array.isArray(T) || (T = [T]), T.map((w) => {
|
|
1646
|
-
let { from:
|
|
1647
|
-
if (isNaN(
|
|
1648
|
-
|
|
1649
|
-
const g = Ve(
|
|
1646
|
+
let { from: B, to: G, class: oe, label: ge } = w;
|
|
1647
|
+
if (isNaN(B) || isNaN(G) || h.timeFrom >= G || h.timeTo <= B) return;
|
|
1648
|
+
B = Math.max(h.timeFrom, B), G = Math.min(h.timeTo, G);
|
|
1649
|
+
const g = Ve(B, h), R = Ve(G, h) - g;
|
|
1650
1650
|
return {
|
|
1651
1651
|
style: { top: `${g}%`, height: `${R}%` },
|
|
1652
1652
|
label: ge,
|
|
1653
1653
|
class: oe
|
|
1654
1654
|
};
|
|
1655
1655
|
}).filter((w) => !!w);
|
|
1656
|
-
}),
|
|
1656
|
+
}), j = b(() => h.minTimestamp !== null && h.minTimestamp > t.end.getTime()), X = b(() => h.maxTimestamp && h.maxTimestamp < t.start.getTime()), U = b(() => {
|
|
1657
1657
|
const { disableDays: o } = h, T = r.isYear || r.isYears;
|
|
1658
|
-
return o.length && o.includes(C.formatDate(t.start)) && !T ? !0 :
|
|
1659
|
-
}),
|
|
1658
|
+
return o.length && o.includes(C.formatDate(t.start)) && !T ? !0 : j.value || X.value;
|
|
1659
|
+
}), K = be({
|
|
1660
1660
|
show: b(() => {
|
|
1661
1661
|
if (!(!r.isDay && !r.isDays && !r.isWeek) && !(!Z.value || !h.time || t.allDay) && !(h.timeFrom > C.dateToMinutes(r.now)) && !(C.dateToMinutes(r.now) > h.timeTo))
|
|
1662
1662
|
return !0;
|
|
1663
1663
|
}),
|
|
1664
1664
|
nowInMinutes: b(() => C.dateToMinutes(r.now)),
|
|
1665
|
-
todaysTimePosition: b(() => Ve(
|
|
1666
|
-
style: b(() => `${h.horizontal ? "left" : "top"}: ${
|
|
1667
|
-
currentTime: b(() => C.formatTime(r.now))
|
|
1665
|
+
todaysTimePosition: b(() => Ve(K.nowInMinutes, h)),
|
|
1666
|
+
style: b(() => `${h.horizontal ? "left" : "top"}: ${K.todaysTimePosition}%`),
|
|
1667
|
+
currentTime: b(() => C.formatTime(r.now, h.twelveHour ? "h:mm {am}" : "HH:mm"))
|
|
1668
1668
|
}), te = b(() => {
|
|
1669
1669
|
if (U.value) return {};
|
|
1670
1670
|
const o = { ...h.eventListeners.cell };
|
|
1671
|
-
for (const [w,
|
|
1671
|
+
for (const [w, B] of Object.entries(o))
|
|
1672
1672
|
o[w] = (G) => {
|
|
1673
1673
|
var oe, ge, g;
|
|
1674
|
-
(g = (ge = G.target || ((oe = G.e) == null ? void 0 : oe.target)).closest) != null && g.call(ge, ".vuecal__event") ||
|
|
1674
|
+
(g = (ge = G.target || ((oe = G.e) == null ? void 0 : oe.target)).closest) != null && g.call(ge, ".vuecal__event") || B(G.type ? { e: G, cell: q.value, cursor: ae.value } : G);
|
|
1675
1675
|
};
|
|
1676
1676
|
const T = { ...o };
|
|
1677
1677
|
let M = null;
|
|
1678
1678
|
return o.click = (w) => {
|
|
1679
1679
|
var G;
|
|
1680
1680
|
ve();
|
|
1681
|
-
const
|
|
1682
|
-
(G = T.click) == null || G.call(T, { e: w, cell: q.value, cursor:
|
|
1681
|
+
const B = re(w);
|
|
1682
|
+
(G = T.click) == null || G.call(T, { e: w, cell: q.value, cursor: B }), M ? M = clearTimeout(M) : M = setTimeout(() => {
|
|
1683
1683
|
var oe;
|
|
1684
|
-
M = null, (oe = T["delayed-click"]) == null || oe.call(T, { e: w, cell: q.value, cursor:
|
|
1684
|
+
M = null, (oe = T["delayed-click"]) == null || oe.call(T, { e: w, cell: q.value, cursor: B });
|
|
1685
1685
|
}, 400);
|
|
1686
1686
|
}, (h.time && r.isDay || r.isDays || r.isWeek) && (o.touchstart = (w) => {
|
|
1687
|
-
var
|
|
1688
|
-
s(w.e || w), (
|
|
1687
|
+
var B;
|
|
1688
|
+
s(w.e || w), (B = T.touchstart) == null || B.call(T, { e: w, cell: q.value, cursor: ae.value });
|
|
1689
1689
|
}, o.mousedown = (w) => {
|
|
1690
|
-
var
|
|
1691
|
-
s(w.e || w), (
|
|
1690
|
+
var B;
|
|
1691
|
+
s(w.e || w), (B = T.mousedown) == null || B.call(T, { e: w, cell: q.value, cursor: ae.value });
|
|
1692
1692
|
}), T.dblclick && (o.dblclick = (w) => {
|
|
1693
|
-
var
|
|
1694
|
-
(
|
|
1693
|
+
var B;
|
|
1694
|
+
(B = T.dblclick) == null || B.call(T, { e: w, cell: q.value, cursor: re(w) });
|
|
1695
1695
|
}), h.editableEvents.drag && (o.dragenter = (w) => v.cellDragEnter(w, q.value), o.dragover = (w) => {
|
|
1696
1696
|
w.preventDefault(), v.cellDragOver(w, q.value);
|
|
1697
1697
|
}, o.dragleave = (w) => v.cellDragLeave(w, q.value), o.drop = (w) => v.cellDragDrop(w, q.value, t.allDay)), o;
|
|
@@ -1704,10 +1704,10 @@ const lt = (y, t) => {
|
|
|
1704
1704
|
goBroader: () => r.broader(),
|
|
1705
1705
|
broader: r.broaderView,
|
|
1706
1706
|
narrower: r.narrowerView
|
|
1707
|
-
})),
|
|
1707
|
+
})), re = (o) => {
|
|
1708
1708
|
var G;
|
|
1709
|
-
const T = (((G = o.touches) == null ? void 0 : G[0]) || o).clientY, { top: M } = L.value.getBoundingClientRect(), w = Ke(T - M, L.value),
|
|
1710
|
-
return
|
|
1709
|
+
const T = (((G = o.touches) == null ? void 0 : G[0]) || o).clientY, { top: M } = L.value.getBoundingClientRect(), w = Ke(T - M, L.value), B = new Date(t.start);
|
|
1710
|
+
return B.setMinutes(je(w, h)), { y: w, date: B };
|
|
1711
1711
|
}, ae = b(() => {
|
|
1712
1712
|
const o = je(i.movePercentageY || i.startPercentageY, h), T = new Date(t.start);
|
|
1713
1713
|
return T.setMinutes(o), {
|
|
@@ -1718,24 +1718,24 @@ const lt = (y, t) => {
|
|
|
1718
1718
|
}), ve = () => {
|
|
1719
1719
|
r.updateSelectedDate(t.start), h.clickToNavigate && ((r.isMonth || r.isDays || r.isWeek) && h.availableViews.day ? r.switch("day") : r.isYear && h.availableViews.month ? r.switch("month") : r.isYears && h.availableViews.year && r.switch("year")), r.updateViewDate(t.start);
|
|
1720
1720
|
}, s = (o) => {
|
|
1721
|
-
var w,
|
|
1721
|
+
var w, B;
|
|
1722
1722
|
const T = o.type === "touchstart";
|
|
1723
1723
|
T ? (i.canTouchAndDrag = !1, i.touchAndDragTimer = setTimeout(() => {
|
|
1724
1724
|
i.canTouchAndDrag = !0, (i.holding || i.dragging) && o.preventDefault();
|
|
1725
1725
|
}, 500)) : i.canTouchAndDrag = !0, i.schedule = ~~o.target.dataset.schedule;
|
|
1726
1726
|
const M = L.value.getBoundingClientRect();
|
|
1727
|
-
i.startX = (((w = o.touches) == null ? void 0 : w[0]) || o).clientX - M.left, i.startY = (((
|
|
1727
|
+
i.startX = (((w = o.touches) == null ? void 0 : w[0]) || o).clientX - M.left, i.startY = (((B = o.touches) == null ? void 0 : B[0]) || o).clientY - M.top, i.startPercentageX = i.startX * 100 / M.width, i.startPercentageY = i.startY * 100 / M.height, i.thresholdPassed = !1, document.addEventListener(T ? "touchmove" : "mousemove", k, { passive: !T }), document.addEventListener(T ? "touchend" : "mouseup", D, { once: !0 }), i.holdTimer = setTimeout(() => {
|
|
1728
1728
|
var G, oe;
|
|
1729
1729
|
i.holding = !0, (oe = (G = te.value).hold) == null || oe.call(G, { e: o, cell: q.value, cursor: ae.value });
|
|
1730
1730
|
}, 1e3);
|
|
1731
1731
|
}, k = (o) => {
|
|
1732
|
-
var w,
|
|
1732
|
+
var w, B, G, oe, ge, g;
|
|
1733
1733
|
const T = o.type === "touchmove";
|
|
1734
1734
|
if (T && !i.canTouchAndDrag) {
|
|
1735
1735
|
i.touchAndDragTimer && (clearTimeout(i.touchAndDragTimer), i.touchAndDragTimer = null), D(o);
|
|
1736
1736
|
return;
|
|
1737
1737
|
}
|
|
1738
|
-
T && o.preventDefault(), i.dragging || (A.isDraggingCell = !0, (
|
|
1738
|
+
T && o.preventDefault(), i.dragging || (A.isDraggingCell = !0, (B = (w = te.value)["drag-start"]) == null || B.call(w, { e: o, cell: q.value, cursor: ae.value })), i.dragging = !0, i.holdTimer = clearTimeout(i.holdTimer), i.holding = !1;
|
|
1739
1739
|
const M = L.value.getBoundingClientRect();
|
|
1740
1740
|
i.moveX = (((G = o.touches) == null ? void 0 : G[0]) || o).clientX - M.left, i.moveY = (((oe = o.touches) == null ? void 0 : oe[0]) || o).clientY - M.top, i.movePercentageX = i.moveX * 100 / M.width, i.movePercentageY = i.moveY * 100 / M.height, h.eventCreateMinDrag && Math.abs(i.startY - i.moveY) > h.eventCreateMinDrag && (i.thresholdPassed = !0), (g = (ge = te.value).drag) == null || g.call(ge, { e: o, cell: q.value, cursor: ae.value });
|
|
1741
1741
|
}, D = async (o) => {
|
|
@@ -1745,8 +1745,8 @@ const lt = (y, t) => {
|
|
|
1745
1745
|
}, J = async (o) => {
|
|
1746
1746
|
var ge;
|
|
1747
1747
|
if (!e.value) return;
|
|
1748
|
-
let { start: T, end: M, startMinutes: w, endMinutes:
|
|
1749
|
-
T = new Date(t.start), T.setMinutes(w), M = new Date(t.start), M.setMinutes(
|
|
1748
|
+
let { start: T, end: M, startMinutes: w, endMinutes: B } = I.value;
|
|
1749
|
+
T = new Date(t.start), T.setMinutes(w), M = new Date(t.start), M.setMinutes(B);
|
|
1750
1750
|
let G = { ...I.value, start: T, end: M };
|
|
1751
1751
|
const { create: oe } = h.eventListeners.event;
|
|
1752
1752
|
if (typeof oe == "function") {
|
|
@@ -1754,12 +1754,12 @@ const lt = (y, t) => {
|
|
|
1754
1754
|
G = await new Promise((R) => oe({ e: o, event: G, cell: q.value, resolve: R, cursor: ae.value })), G && typeof G == "object" && r.createEvent(G), G && typeof G == "boolean" && r.createEvent(g);
|
|
1755
1755
|
} else r.createEvent(G);
|
|
1756
1756
|
(ge = navigator.vibrate) == null || ge.call(navigator, 200);
|
|
1757
|
-
},
|
|
1757
|
+
}, se = () => {
|
|
1758
1758
|
var o;
|
|
1759
1759
|
for (const T of Object.keys(te.value))
|
|
1760
1760
|
(o = L.value) == null || o.removeEventListener(T, te.value[T]);
|
|
1761
1761
|
}, me = () => {
|
|
1762
|
-
|
|
1762
|
+
a.value = W.getCellOverlappingEvents(t.start, t.end, t.allDay);
|
|
1763
1763
|
};
|
|
1764
1764
|
return De(
|
|
1765
1765
|
// Watch event IDs and start/end dates (only) to detect event resizing/dnd.
|
|
@@ -1771,41 +1771,41 @@ const lt = (y, t) => {
|
|
|
1771
1771
|
// Use flush: 'post' to prevent infinite updates.
|
|
1772
1772
|
), Re(async () => {
|
|
1773
1773
|
for (const o of l.value) W.deleteEvent(o, 3);
|
|
1774
|
-
|
|
1774
|
+
se(), await Xe();
|
|
1775
1775
|
}), (o, T) => (V(), P("div", ie({
|
|
1776
1776
|
class: ["vuecal__cell", z.value],
|
|
1777
1777
|
ref_key: "cellEl",
|
|
1778
1778
|
ref: L
|
|
1779
1779
|
}, Ie(te.value, !0)), [
|
|
1780
|
-
o.$slots.cell ?
|
|
1780
|
+
o.$slots.cell ? O(o.$slots, "cell", {
|
|
1781
1781
|
key: 0,
|
|
1782
1782
|
cell: q.value
|
|
1783
1783
|
}) : x("", !0),
|
|
1784
|
-
|
|
1784
|
+
n.value ? (V(!0), P(de, { key: 1 }, we(n.value, (M, w) => (V(), P("div", {
|
|
1785
1785
|
class: pe(["vuecal__special-hours", M.class]),
|
|
1786
1786
|
style: $e(M.style),
|
|
1787
1787
|
innerHTML: M.label || ""
|
|
1788
|
-
}, null, 14,
|
|
1788
|
+
}, null, 14, tn))), 256)) : x("", !0),
|
|
1789
1789
|
!o.$slots.cell && $(h).schedules ? (V(!0), P(de, { key: 2 }, we($(h).schedules, (M) => (V(), P("div", {
|
|
1790
1790
|
class: pe(["vuecal__schedule vuecal__schedule--cell", M.class]),
|
|
1791
1791
|
key: M.id,
|
|
1792
1792
|
style: $e(M.style || null),
|
|
1793
1793
|
"data-schedule": M.id
|
|
1794
1794
|
}, [
|
|
1795
|
-
o.$slots["cell-events"] ?
|
|
1795
|
+
o.$slots["cell-events"] ? O(o.$slots, "cell-events", {
|
|
1796
1796
|
key: 0,
|
|
1797
1797
|
cell: q.value
|
|
1798
1798
|
}) : x("", !0),
|
|
1799
|
-
H.value || o.$slots["cell-date"] ? (V(), P("div",
|
|
1800
|
-
|
|
1799
|
+
H.value || o.$slots["cell-date"] ? (V(), P("div", an, [
|
|
1800
|
+
O(o.$slots, "cell-date", { cell: q.value }, () => [
|
|
1801
1801
|
qe(ce(H.value), 1)
|
|
1802
1802
|
])
|
|
1803
1803
|
])) : x("", !0),
|
|
1804
|
-
o.$slots["cell-content"] ? (V(), P("div",
|
|
1805
|
-
|
|
1804
|
+
o.$slots["cell-content"] ? (V(), P("div", sn, [
|
|
1805
|
+
O(o.$slots, "cell-content", { cell: q.value })
|
|
1806
1806
|
])) : x("", !0),
|
|
1807
|
-
o.$slots["cell-events"] && Y.value.length ? (V(), P("div",
|
|
1808
|
-
|
|
1807
|
+
o.$slots["cell-events"] && Y.value.length ? (V(), P("div", ln, [
|
|
1808
|
+
O(o.$slots, "cell-events", { cell: q.value })
|
|
1809
1809
|
])) : Y.value.length || E.value ? (V(), Se(tt, {
|
|
1810
1810
|
key: 4,
|
|
1811
1811
|
class: "vuecal__cell-events",
|
|
@@ -1814,7 +1814,7 @@ const lt = (y, t) => {
|
|
|
1814
1814
|
onAfterLeave: m,
|
|
1815
1815
|
tag: "div"
|
|
1816
1816
|
}, {
|
|
1817
|
-
default:
|
|
1817
|
+
default: N(() => [
|
|
1818
1818
|
(V(!0), P(de, null, we(f.value[M.id], (w) => (V(), Se(st, {
|
|
1819
1819
|
key: w._.id,
|
|
1820
1820
|
event: w,
|
|
@@ -1826,22 +1826,22 @@ const lt = (y, t) => {
|
|
|
1826
1826
|
}, Ce({ _: 2 }, [
|
|
1827
1827
|
o.$slots["event.all-day"] && t.allDay ? {
|
|
1828
1828
|
name: "event.all-day",
|
|
1829
|
-
fn:
|
|
1830
|
-
|
|
1829
|
+
fn: N((B) => [
|
|
1830
|
+
O(o.$slots, "event.all-day", ie({ ref_for: !0 }, B))
|
|
1831
1831
|
]),
|
|
1832
1832
|
key: "0"
|
|
1833
1833
|
} : void 0,
|
|
1834
1834
|
o.$slots[`event.${$(r).id}`] ? {
|
|
1835
1835
|
name: `event.${$(r).id}`,
|
|
1836
|
-
fn:
|
|
1837
|
-
|
|
1836
|
+
fn: N((B) => [
|
|
1837
|
+
O(o.$slots, `event.${$(r).id}`, ie({ ref_for: !0 }, B))
|
|
1838
1838
|
]),
|
|
1839
1839
|
key: "1"
|
|
1840
1840
|
} : void 0,
|
|
1841
1841
|
o.$slots.event ? {
|
|
1842
1842
|
name: "event",
|
|
1843
|
-
fn:
|
|
1844
|
-
|
|
1843
|
+
fn: N((B) => [
|
|
1844
|
+
O(o.$slots, "event", ie({ ref_for: !0 }, B))
|
|
1845
1845
|
]),
|
|
1846
1846
|
key: "2"
|
|
1847
1847
|
} : void 0
|
|
@@ -1854,22 +1854,22 @@ const lt = (y, t) => {
|
|
|
1854
1854
|
class: "vuecal__event-placeholder",
|
|
1855
1855
|
style: $e(I.value.style)
|
|
1856
1856
|
}, ce(I.value.start) + " - " + ce(I.value.end), 5)) : x("", !0)
|
|
1857
|
-
], 14,
|
|
1857
|
+
], 14, nn))), 128)) : x("", !0),
|
|
1858
1858
|
!o.$slots.cell && !$(h).schedules ? (V(), P(de, { key: 3 }, [
|
|
1859
|
-
o.$slots["cell-events"] ?
|
|
1859
|
+
o.$slots["cell-events"] ? O(o.$slots, "cell-events", {
|
|
1860
1860
|
key: 0,
|
|
1861
1861
|
cell: q.value
|
|
1862
1862
|
}) : x("", !0),
|
|
1863
|
-
H.value || o.$slots["cell-date"] ? (V(), P("div",
|
|
1864
|
-
|
|
1863
|
+
H.value || o.$slots["cell-date"] ? (V(), P("div", rn, [
|
|
1864
|
+
O(o.$slots, "cell-date", { cell: q.value }, () => [
|
|
1865
1865
|
qe(ce(H.value), 1)
|
|
1866
1866
|
])
|
|
1867
1867
|
])) : x("", !0),
|
|
1868
|
-
o.$slots["cell-content"] ? (V(), P("div",
|
|
1869
|
-
|
|
1868
|
+
o.$slots["cell-content"] ? (V(), P("div", on, [
|
|
1869
|
+
O(o.$slots, "cell-content", { cell: q.value })
|
|
1870
1870
|
])) : x("", !0),
|
|
1871
|
-
o.$slots["cell-events"] && Y.value.length ? (V(), P("div",
|
|
1872
|
-
|
|
1871
|
+
o.$slots["cell-events"] && Y.value.length ? (V(), P("div", un, [
|
|
1872
|
+
O(o.$slots, "cell-events", { cell: q.value })
|
|
1873
1873
|
])) : !($(r).isMonth && !$(h).eventsOnMonthView) && !$(r).isYear && !$(r).isYears && (Y.value.length || E.value) ? (V(), Se(tt, {
|
|
1874
1874
|
key: 4,
|
|
1875
1875
|
class: "vuecal__cell-events",
|
|
@@ -1878,7 +1878,7 @@ const lt = (y, t) => {
|
|
|
1878
1878
|
onAfterLeave: m,
|
|
1879
1879
|
tag: "div"
|
|
1880
1880
|
}, {
|
|
1881
|
-
default:
|
|
1881
|
+
default: N(() => [
|
|
1882
1882
|
(V(!0), P(de, null, we(Y.value, (M) => (V(), Se(st, {
|
|
1883
1883
|
key: M._.id,
|
|
1884
1884
|
event: M,
|
|
@@ -1891,22 +1891,22 @@ const lt = (y, t) => {
|
|
|
1891
1891
|
}, Ce({ _: 2 }, [
|
|
1892
1892
|
o.$slots["event.all-day"] && t.allDay ? {
|
|
1893
1893
|
name: "event.all-day",
|
|
1894
|
-
fn:
|
|
1895
|
-
|
|
1894
|
+
fn: N((w) => [
|
|
1895
|
+
O(o.$slots, "event.all-day", ie({ ref_for: !0 }, w))
|
|
1896
1896
|
]),
|
|
1897
1897
|
key: "0"
|
|
1898
1898
|
} : void 0,
|
|
1899
1899
|
o.$slots[`event.${$(r).id}`] ? {
|
|
1900
1900
|
name: `event.${$(r).id}`,
|
|
1901
|
-
fn:
|
|
1902
|
-
|
|
1901
|
+
fn: N((w) => [
|
|
1902
|
+
O(o.$slots, `event.${$(r).id}`, ie({ ref_for: !0 }, w))
|
|
1903
1903
|
]),
|
|
1904
1904
|
key: "1"
|
|
1905
1905
|
} : void 0,
|
|
1906
1906
|
o.$slots.event ? {
|
|
1907
1907
|
name: "event",
|
|
1908
|
-
fn:
|
|
1909
|
-
|
|
1908
|
+
fn: N((w) => [
|
|
1909
|
+
O(o.$slots, "event", ie({ ref_for: !0 }, w))
|
|
1910
1910
|
]),
|
|
1911
1911
|
key: "2"
|
|
1912
1912
|
} : void 0
|
|
@@ -1920,36 +1920,41 @@ const lt = (y, t) => {
|
|
|
1920
1920
|
style: $e(I.value.style)
|
|
1921
1921
|
}, ce(I.value.start) + " - " + ce(I.value.end), 5)) : x("", !0)
|
|
1922
1922
|
], 64)) : x("", !0),
|
|
1923
|
-
o.$slots["event-count"] ?
|
|
1923
|
+
o.$slots["event-count"] ? O(o.$slots, "event-count", {
|
|
1924
1924
|
key: 4,
|
|
1925
1925
|
events: _.value
|
|
1926
|
-
}) : p.value ? (V(), P("div",
|
|
1927
|
-
|
|
1926
|
+
}) : p.value ? (V(), P("div", cn, ce(_.value.length), 1)) : x("", !0),
|
|
1927
|
+
K.show ? (V(), P("div", {
|
|
1928
1928
|
key: 6,
|
|
1929
1929
|
class: "vuecal__now-line",
|
|
1930
|
-
style: $e(
|
|
1931
|
-
title:
|
|
1930
|
+
style: $e(K.style),
|
|
1931
|
+
title: K.currentTime
|
|
1932
1932
|
}, [
|
|
1933
|
-
|
|
1934
|
-
|
|
1933
|
+
O(o.$slots, "now-line", {
|
|
1934
|
+
now: $(r).now,
|
|
1935
|
+
timeFormatted: K.currentTime
|
|
1936
|
+
}, () => [
|
|
1937
|
+
he("span", null, ce(K.currentTime), 1)
|
|
1938
|
+
])
|
|
1939
|
+
], 12, dn)) : x("", !0)
|
|
1935
1940
|
], 16));
|
|
1936
1941
|
}
|
|
1937
|
-
},
|
|
1942
|
+
}, vn = {
|
|
1938
1943
|
key: 0,
|
|
1939
1944
|
class: "vuecal__headings"
|
|
1940
|
-
},
|
|
1945
|
+
}, fn = {
|
|
1941
1946
|
key: 0,
|
|
1942
1947
|
class: "vuecal__weekdays-headings"
|
|
1943
|
-
},
|
|
1948
|
+
}, mn = ["onClick"], gn = { class: "vuecal__weekday-day" }, hn = {
|
|
1944
1949
|
key: 0,
|
|
1945
1950
|
class: "vuecal__weekday-date"
|
|
1946
|
-
},
|
|
1951
|
+
}, yn = {
|
|
1947
1952
|
key: 1,
|
|
1948
1953
|
class: "vuecal__schedules-headings w-flex grow"
|
|
1949
|
-
},
|
|
1954
|
+
}, Dn = ["innerHTML"], pn = {
|
|
1950
1955
|
key: 2,
|
|
1951
1956
|
class: "vuecal__all-day w-flex grow"
|
|
1952
|
-
},
|
|
1957
|
+
}, wn = {
|
|
1953
1958
|
__name: "headings-bar",
|
|
1954
1959
|
setup(y) {
|
|
1955
1960
|
const t = He("vuecal"), d = He("$vuecalEl"), { view: r, config: h, dateUtils: C } = t, W = b(() => h.xs ? "day-xs" : h.sm || r.isDays || r.isMonth ? "day-sm" : "day"), v = b(() => (r.isDay || r.isDays || r.isWeek || r.isMonth) && !(r.isDay && !h.schedules && !h.allDayEvents)), A = b(() => r.cellDates.slice(0, h.horizontal ? r.rows : r.cols).map(({ start: l }) => ({
|
|
@@ -2013,31 +2018,31 @@ const lt = (y, t) => {
|
|
|
2013
2018
|
};
|
|
2014
2019
|
return Re(() => {
|
|
2015
2020
|
L.cleanup();
|
|
2016
|
-
}), (l, E) => v.value ? (V(), P("div",
|
|
2017
|
-
$(r).isDay ? x("", !0) : (V(), P("div",
|
|
2021
|
+
}), (l, E) => v.value ? (V(), P("div", vn, [
|
|
2022
|
+
$(r).isDay ? x("", !0) : (V(), P("div", fn, [
|
|
2018
2023
|
(V(!0), P(de, null, we(A.value, (F, m) => (V(), P("div", {
|
|
2019
2024
|
class: pe(["vuecal__weekday", { "vuecal__weekday--today": F.isToday }]),
|
|
2020
2025
|
key: m,
|
|
2021
2026
|
onClick: (i) => Z.click(F.date)
|
|
2022
2027
|
}, [
|
|
2023
|
-
|
|
2028
|
+
O(l.$slots, "weekday-heading", {
|
|
2024
2029
|
label: F[W.value],
|
|
2025
2030
|
id: F.id,
|
|
2026
2031
|
date: F.date
|
|
2027
2032
|
}, () => [
|
|
2028
|
-
he("span",
|
|
2029
|
-
$(r).isMonth ? x("", !0) : (V(), P("strong",
|
|
2033
|
+
he("span", gn, ce(F[W.value]), 1),
|
|
2034
|
+
$(r).isMonth ? x("", !0) : (V(), P("strong", hn, ce(F.dateNumber), 1))
|
|
2030
2035
|
])
|
|
2031
|
-
], 10,
|
|
2036
|
+
], 10, mn))), 128))
|
|
2032
2037
|
])),
|
|
2033
|
-
$(h).schedules ? (V(), P("div",
|
|
2038
|
+
$(h).schedules ? (V(), P("div", yn, [
|
|
2034
2039
|
(V(!0), P(de, null, we(A.value, (F, m) => (V(), P(de, { key: m }, [
|
|
2035
2040
|
(V(!0), P(de, null, we($(h).schedules, (i, S) => (V(), P(de, { key: S }, [
|
|
2036
2041
|
l.$slots["schedule-heading"] ? (V(), P("div", {
|
|
2037
2042
|
key: 0,
|
|
2038
2043
|
class: pe(["vuecal__schedule vuecal__schedule--heading", i.class])
|
|
2039
2044
|
}, [
|
|
2040
|
-
|
|
2045
|
+
O(l.$slots, "schedule-heading", {
|
|
2041
2046
|
schedule: i,
|
|
2042
2047
|
view: $(r)
|
|
2043
2048
|
})
|
|
@@ -2045,11 +2050,11 @@ const lt = (y, t) => {
|
|
|
2045
2050
|
key: 1,
|
|
2046
2051
|
class: pe(["vuecal__schedule vuecal__schedule--heading", i.class]),
|
|
2047
2052
|
innerHTML: i.label
|
|
2048
|
-
}, null, 10,
|
|
2053
|
+
}, null, 10, Dn))
|
|
2049
2054
|
], 64))), 128))
|
|
2050
2055
|
], 64))), 128))
|
|
2051
2056
|
])) : x("", !0),
|
|
2052
|
-
$(h).allDayEvents ? (V(), P("div",
|
|
2057
|
+
$(h).allDayEvents ? (V(), P("div", pn, [
|
|
2053
2058
|
(V(!0), P(de, null, we(A.value, (F, m) => (V(), Se(kt, {
|
|
2054
2059
|
class: pe(["vuecal__all-day-cell", { "vuecal__weekday--today": F.isToday }]),
|
|
2055
2060
|
key: m,
|
|
@@ -2060,14 +2065,14 @@ const lt = (y, t) => {
|
|
|
2060
2065
|
}, Ce({ _: 2 }, [
|
|
2061
2066
|
l.$slots["event.all-day"] ? {
|
|
2062
2067
|
name: "event.all-day",
|
|
2063
|
-
fn:
|
|
2064
|
-
|
|
2068
|
+
fn: N((i) => [
|
|
2069
|
+
O(l.$slots, "event.all-day", ie({ ref_for: !0 }, i))
|
|
2065
2070
|
]),
|
|
2066
2071
|
key: "0"
|
|
2067
2072
|
} : {
|
|
2068
2073
|
name: "event",
|
|
2069
|
-
fn:
|
|
2070
|
-
|
|
2074
|
+
fn: N((i) => [
|
|
2075
|
+
O(l.$slots, "event", ie({ ref_for: !0 }, i))
|
|
2071
2076
|
]),
|
|
2072
2077
|
key: "1"
|
|
2073
2078
|
}
|
|
@@ -2080,10 +2085,10 @@ const lt = (y, t) => {
|
|
|
2080
2085
|
])) : x("", !0)
|
|
2081
2086
|
])) : x("", !0);
|
|
2082
2087
|
}
|
|
2083
|
-
},
|
|
2088
|
+
}, _n = { class: "vuecal__time-column" }, kn = {
|
|
2084
2089
|
key: 0,
|
|
2085
2090
|
class: "vuecal__all-day-label"
|
|
2086
|
-
},
|
|
2091
|
+
}, $n = {
|
|
2087
2092
|
__name: "time-column",
|
|
2088
2093
|
setup(y) {
|
|
2089
2094
|
const t = He("vuecal"), { config: d, texts: r } = t, h = b(() => {
|
|
@@ -2103,9 +2108,9 @@ const lt = (y, t) => {
|
|
|
2103
2108
|
}
|
|
2104
2109
|
return C;
|
|
2105
2110
|
});
|
|
2106
|
-
return (C, W) => (V(), P("div",
|
|
2107
|
-
$(d).allDayEvents ? (V(), P("div",
|
|
2108
|
-
|
|
2111
|
+
return (C, W) => (V(), P("div", _n, [
|
|
2112
|
+
$(d).allDayEvents ? (V(), P("div", kn, [
|
|
2113
|
+
O(C.$slots, "all-day-label", {}, () => [
|
|
2109
2114
|
qe(ce($(t).texts.allDay), 1)
|
|
2110
2115
|
])
|
|
2111
2116
|
])) : x("", !0),
|
|
@@ -2114,7 +2119,7 @@ const lt = (y, t) => {
|
|
|
2114
2119
|
key: A,
|
|
2115
2120
|
style: $e({ height: v.height || null })
|
|
2116
2121
|
}, [
|
|
2117
|
-
|
|
2122
|
+
O(C.$slots, "time-cell", {
|
|
2118
2123
|
index: A,
|
|
2119
2124
|
minutes: v.minutes,
|
|
2120
2125
|
hours: v.hours,
|
|
@@ -2127,7 +2132,7 @@ const lt = (y, t) => {
|
|
|
2127
2132
|
], 4))), 128))
|
|
2128
2133
|
]));
|
|
2129
2134
|
}
|
|
2130
|
-
},
|
|
2135
|
+
}, bn = {
|
|
2131
2136
|
__name: "body",
|
|
2132
2137
|
setup(y) {
|
|
2133
2138
|
const t = He("vuecal"), { view: d, config: r, dateUtils: h, touch: C, eventsManager: W } = t, v = ue(null), A = ue(null), { resizeState: Z } = W, L = b(() => ({
|
|
@@ -2143,13 +2148,13 @@ const lt = (y, t) => {
|
|
|
2143
2148
|
}), E = (i) => {
|
|
2144
2149
|
var z;
|
|
2145
2150
|
if (d.isMonth || d.isYear || d.isYears) return;
|
|
2146
|
-
const S = ((z = i.touches) == null ? void 0 : z[0]) || i, { clientX:
|
|
2147
|
-
A.value = Ke(I - e, v.value), C.isResizingEvent && r.editableEvents.resizeX && (Z.cellEl = m(
|
|
2151
|
+
const S = ((z = i.touches) == null ? void 0 : z[0]) || i, { clientX: a, clientY: I } = S, { top: e } = v.value.getBoundingClientRect();
|
|
2152
|
+
A.value = Ke(I - e, v.value), C.isResizingEvent && r.editableEvents.resizeX && (Z.cellEl = m(a, I));
|
|
2148
2153
|
}, F = () => {
|
|
2149
2154
|
A.value = null;
|
|
2150
2155
|
}, m = (i, S) => {
|
|
2151
|
-
const
|
|
2152
|
-
return console.log(
|
|
2156
|
+
const a = document.elementFromPoint(i, S);
|
|
2157
|
+
return console.log(a == null ? void 0 : a.closest(".vuecal__cell")), (a == null ? void 0 : a.closest(".vuecal__cell")) || null;
|
|
2153
2158
|
};
|
|
2154
2159
|
return Ze(() => {
|
|
2155
2160
|
v.value.addEventListener("mousemove", E), v.value.addEventListener("touchmove", E), v.value.addEventListener("mouseleave", F), v.value.addEventListener("touchend", F);
|
|
@@ -2162,7 +2167,7 @@ const lt = (y, t) => {
|
|
|
2162
2167
|
style: $e(L.value)
|
|
2163
2168
|
}, [
|
|
2164
2169
|
Oe(Ue, { name: "vuecal-shrink" }, {
|
|
2165
|
-
default:
|
|
2170
|
+
default: N(() => [
|
|
2166
2171
|
$(r).timeAtCursor && A.value !== null ? (V(), P("div", {
|
|
2167
2172
|
key: 0,
|
|
2168
2173
|
class: "vuecal__time-at-cursor",
|
|
@@ -2173,75 +2178,82 @@ const lt = (y, t) => {
|
|
|
2173
2178
|
]),
|
|
2174
2179
|
_: 1
|
|
2175
2180
|
}),
|
|
2176
|
-
(V(!0), P(de, null, we($(d).cellDates, (
|
|
2181
|
+
(V(!0), P(de, null, we($(d).cellDates, (a, I) => (V(), Se(kt, {
|
|
2177
2182
|
key: I,
|
|
2178
|
-
start:
|
|
2179
|
-
end:
|
|
2183
|
+
start: a.start,
|
|
2184
|
+
end: a.end,
|
|
2180
2185
|
index: I
|
|
2181
2186
|
}, Ce({ _: 2 }, [
|
|
2182
2187
|
i.$slots.cell ? {
|
|
2183
2188
|
name: "cell",
|
|
2184
|
-
fn:
|
|
2185
|
-
|
|
2189
|
+
fn: N((e) => [
|
|
2190
|
+
O(i.$slots, "cell", ie({ ref_for: !0 }, e))
|
|
2186
2191
|
]),
|
|
2187
2192
|
key: "0"
|
|
2188
2193
|
} : void 0,
|
|
2189
2194
|
i.$slots["cell-date"] ? {
|
|
2190
2195
|
name: "cell-date",
|
|
2191
|
-
fn:
|
|
2192
|
-
|
|
2196
|
+
fn: N((e) => [
|
|
2197
|
+
O(i.$slots, "cell-date", ie({ ref_for: !0 }, e))
|
|
2193
2198
|
]),
|
|
2194
2199
|
key: "1"
|
|
2195
2200
|
} : void 0,
|
|
2196
2201
|
i.$slots["cell-content"] ? {
|
|
2197
2202
|
name: "cell-content",
|
|
2198
|
-
fn:
|
|
2199
|
-
|
|
2203
|
+
fn: N((e) => [
|
|
2204
|
+
O(i.$slots, "cell-content", ie({ ref_for: !0 }, e))
|
|
2200
2205
|
]),
|
|
2201
2206
|
key: "2"
|
|
2202
2207
|
} : void 0,
|
|
2203
2208
|
i.$slots["cell-events"] ? {
|
|
2204
2209
|
name: "cell-events",
|
|
2205
|
-
fn:
|
|
2206
|
-
|
|
2210
|
+
fn: N((e) => [
|
|
2211
|
+
O(i.$slots, "cell-events", ie({ ref_for: !0 }, e))
|
|
2207
2212
|
]),
|
|
2208
2213
|
key: "3"
|
|
2209
2214
|
} : void 0,
|
|
2210
2215
|
i.$slots[`event.${$(d).id}`] ? {
|
|
2211
2216
|
name: `event.${$(d).id}`,
|
|
2212
|
-
fn:
|
|
2213
|
-
|
|
2217
|
+
fn: N((e) => [
|
|
2218
|
+
O(i.$slots, `event.${$(d).id}`, ie({ ref_for: !0 }, e))
|
|
2214
2219
|
]),
|
|
2215
2220
|
key: "4"
|
|
2216
2221
|
} : void 0,
|
|
2217
2222
|
i.$slots["event.all-day"] ? {
|
|
2218
2223
|
name: "event.all-day",
|
|
2219
|
-
fn:
|
|
2220
|
-
|
|
2224
|
+
fn: N((e) => [
|
|
2225
|
+
O(i.$slots, "event.all-day", ie({ ref_for: !0 }, e))
|
|
2221
2226
|
]),
|
|
2222
2227
|
key: "5"
|
|
2223
2228
|
} : void 0,
|
|
2224
2229
|
i.$slots.event ? {
|
|
2225
2230
|
name: "event",
|
|
2226
|
-
fn:
|
|
2227
|
-
|
|
2231
|
+
fn: N((e) => [
|
|
2232
|
+
O(i.$slots, "event", ie({ ref_for: !0 }, e))
|
|
2228
2233
|
]),
|
|
2229
2234
|
key: "6"
|
|
2230
2235
|
} : void 0,
|
|
2231
2236
|
i.$slots["event-count"] ? {
|
|
2232
2237
|
name: "event-count",
|
|
2233
|
-
fn:
|
|
2234
|
-
|
|
2238
|
+
fn: N((e) => [
|
|
2239
|
+
O(i.$slots, "event-count", ie({ ref_for: !0 }, e))
|
|
2235
2240
|
]),
|
|
2236
2241
|
key: "7"
|
|
2242
|
+
} : void 0,
|
|
2243
|
+
i.$slots["now-line"] ? {
|
|
2244
|
+
name: "now-line",
|
|
2245
|
+
fn: N((e) => [
|
|
2246
|
+
O(i.$slots, "now-line", ie({ ref_for: !0 }, e))
|
|
2247
|
+
]),
|
|
2248
|
+
key: "8"
|
|
2237
2249
|
} : void 0
|
|
2238
2250
|
]), 1032, ["start", "end", "index"]))), 128))
|
|
2239
2251
|
], 4));
|
|
2240
2252
|
}
|
|
2241
|
-
},
|
|
2253
|
+
}, Tn = ["data-locale"], Mn = { class: "vuecal__scrollable-wrap" }, En = {
|
|
2242
2254
|
key: 1,
|
|
2243
2255
|
class: "vuecal__week-numbers"
|
|
2244
|
-
},
|
|
2256
|
+
}, Yn = { class: "vuecal__week-number" }, Sn = { class: "vuecal__body-wrap" }, zn = {
|
|
2245
2257
|
__name: "index",
|
|
2246
2258
|
props: Lt,
|
|
2247
2259
|
emits: [
|
|
@@ -2258,8 +2270,8 @@ const lt = (y, t) => {
|
|
|
2258
2270
|
"event-drag-end"
|
|
2259
2271
|
],
|
|
2260
2272
|
setup(y, { expose: t, emit: d }) {
|
|
2261
|
-
const r = y, h = d, C = Tt("vuecal-el"), W = Ht({ props: r, emit: h, attrs: Et(), vuecalEl: C, uid: Mt() }), { config: v, view: A, dateUtils: Z, touch: L } = W, l = b(() => v.time && (A.isDay || A.isDays || A.isWeek)), E = b(() => Array(A.rows).fill().map((
|
|
2262
|
-
var
|
|
2273
|
+
const r = y, h = d, C = Tt("vuecal-el"), W = Ht({ props: r, emit: h, attrs: Et(), vuecalEl: C, uid: Mt() }), { config: v, view: A, dateUtils: Z, touch: L } = W, l = b(() => v.time && (A.isDay || A.isDays || A.isWeek)), E = b(() => Array(A.rows).fill().map((a, I) => Z.getWeek(Z.addDays(A.firstCellDate, 7 * I)))), F = b(() => {
|
|
2274
|
+
var a;
|
|
2263
2275
|
return {
|
|
2264
2276
|
"vuecal--ready": v.ready,
|
|
2265
2277
|
[`vuecal--${v.theme}-theme`]: v.theme,
|
|
@@ -2273,238 +2285,245 @@ const lt = (y, t) => {
|
|
|
2273
2285
|
"vuecal--dragging-cell": L.isDraggingCell,
|
|
2274
2286
|
"vuecal--dragging-event": L.isDraggingEvent,
|
|
2275
2287
|
"vuecal--resizing-event": L.isResizingEvent,
|
|
2276
|
-
"vuecal--has-schedules": (
|
|
2288
|
+
"vuecal--has-schedules": (a = v.schedules) == null ? void 0 : a.length,
|
|
2277
2289
|
"vuecal--horizontal": v.horizontal
|
|
2278
2290
|
};
|
|
2279
2291
|
}), m = b(() => ({
|
|
2280
2292
|
"--vuecal-time-cell-height": v.timeCellHeight && `${v.timeCellHeight}px`
|
|
2281
2293
|
})), i = b(() => {
|
|
2282
|
-
var
|
|
2294
|
+
var a, I;
|
|
2283
2295
|
return {
|
|
2284
2296
|
"vuecal__scrollable--row": l.value || v.weekNumbers && A.isMonth,
|
|
2285
2297
|
// Keep the states inside the Vue transition wrapper for smooth CSS transitions.
|
|
2286
2298
|
[`vuecal__scrollable--${A.id}-view`]: !0,
|
|
2287
|
-
"vuecal__scrollable--has-schedules": (
|
|
2299
|
+
"vuecal__scrollable--has-schedules": (a = v.schedules) == null ? void 0 : a.length,
|
|
2288
2300
|
"vuecal__scrollable--no-schedules": !((I = v.schedules) != null && I.length),
|
|
2289
2301
|
"vuecal__scrollable--no-all-day-bar": !v.allDayEvents,
|
|
2290
2302
|
"vuecal__scrollable--has-all-day-bar": v.allDayEvents
|
|
2291
2303
|
};
|
|
2292
|
-
}), S = (
|
|
2293
|
-
|
|
2304
|
+
}), S = (a) => {
|
|
2305
|
+
a.target.closest(".vuecal__cell") && a.preventDefault();
|
|
2294
2306
|
};
|
|
2295
2307
|
return Ze(async () => {
|
|
2296
2308
|
typeof window < "u" && window.hasOwnProperty("ontouchstart") && C.value.addEventListener("contextmenu", S), await Xe(), v.ready = !0, h("ready", { config: v, view: A });
|
|
2297
2309
|
}), Re(() => {
|
|
2298
|
-
var
|
|
2299
|
-
(
|
|
2300
|
-
}),
|
|
2310
|
+
var a;
|
|
2311
|
+
(a = C == null ? void 0 : C.value) == null || a.removeEventListener("contextmenu", S);
|
|
2312
|
+
}), nt("vuecal", W), nt("$vuecalEl", C), t({ view: W.view }), (a, I) => (V(), P("div", {
|
|
2301
2313
|
class: pe(["vuecal", F.value]),
|
|
2302
2314
|
ref: "vuecal-el",
|
|
2303
|
-
"data-locale":
|
|
2315
|
+
"data-locale": a.locale,
|
|
2304
2316
|
style: $e(m.value)
|
|
2305
2317
|
}, [
|
|
2306
|
-
|
|
2318
|
+
a.$slots.diy ? O(a.$slots, "diy", {
|
|
2307
2319
|
key: 0,
|
|
2308
2320
|
vuecal: $(W)
|
|
2309
2321
|
}) : (V(), P(de, { key: 1 }, [
|
|
2310
2322
|
Oe(Xt, null, Ce({ _: 2 }, [
|
|
2311
|
-
|
|
2323
|
+
a.$slots.header ? {
|
|
2312
2324
|
name: "header",
|
|
2313
|
-
fn:
|
|
2314
|
-
|
|
2325
|
+
fn: N((e) => [
|
|
2326
|
+
O(a.$slots, "header", ne(le(e)))
|
|
2315
2327
|
]),
|
|
2316
2328
|
key: "0"
|
|
2317
2329
|
} : void 0,
|
|
2318
|
-
!
|
|
2330
|
+
!a.$slots.header && a.$slots["previous-button"] ? {
|
|
2319
2331
|
name: "previous-button",
|
|
2320
|
-
fn:
|
|
2321
|
-
|
|
2332
|
+
fn: N((e) => [
|
|
2333
|
+
O(a.$slots, "previous-button", ne(le(e)))
|
|
2322
2334
|
]),
|
|
2323
2335
|
key: "1"
|
|
2324
2336
|
} : void 0,
|
|
2325
|
-
!
|
|
2337
|
+
!a.$slots.header && a.$slots["next-button"] ? {
|
|
2326
2338
|
name: "next-button",
|
|
2327
|
-
fn:
|
|
2328
|
-
|
|
2339
|
+
fn: N((e) => [
|
|
2340
|
+
O(a.$slots, "next-button", ne(le(e)))
|
|
2329
2341
|
]),
|
|
2330
2342
|
key: "2"
|
|
2331
2343
|
} : void 0,
|
|
2332
|
-
!
|
|
2344
|
+
!a.$slots.header && a.$slots["today-button"] ? {
|
|
2333
2345
|
name: "today-button",
|
|
2334
|
-
fn:
|
|
2335
|
-
|
|
2346
|
+
fn: N((e) => [
|
|
2347
|
+
O(a.$slots, "today-button", ne(le(e)))
|
|
2336
2348
|
]),
|
|
2337
2349
|
key: "3"
|
|
2338
2350
|
} : void 0,
|
|
2339
|
-
!
|
|
2351
|
+
!a.$slots.header && a.$slots.title ? {
|
|
2340
2352
|
name: "title",
|
|
2341
|
-
fn:
|
|
2342
|
-
|
|
2353
|
+
fn: N((e) => [
|
|
2354
|
+
O(a.$slots, "title", ne(le(e)))
|
|
2343
2355
|
]),
|
|
2344
2356
|
key: "4"
|
|
2345
2357
|
} : void 0,
|
|
2346
|
-
!
|
|
2358
|
+
!a.$slots.header && a.$slots["title.day"] ? {
|
|
2347
2359
|
name: "title.day",
|
|
2348
|
-
fn:
|
|
2349
|
-
|
|
2360
|
+
fn: N((e) => [
|
|
2361
|
+
O(a.$slots, "title.day", ne(le(e)))
|
|
2350
2362
|
]),
|
|
2351
2363
|
key: "5"
|
|
2352
2364
|
} : void 0,
|
|
2353
|
-
!
|
|
2365
|
+
!a.$slots.header && a.$slots["title.days"] ? {
|
|
2354
2366
|
name: "title.days",
|
|
2355
|
-
fn:
|
|
2356
|
-
|
|
2367
|
+
fn: N((e) => [
|
|
2368
|
+
O(a.$slots, "title.days", ne(le(e)))
|
|
2357
2369
|
]),
|
|
2358
2370
|
key: "6"
|
|
2359
2371
|
} : void 0,
|
|
2360
|
-
!
|
|
2372
|
+
!a.$slots.header && a.$slots["title.week"] ? {
|
|
2361
2373
|
name: "title.week",
|
|
2362
|
-
fn:
|
|
2363
|
-
|
|
2374
|
+
fn: N((e) => [
|
|
2375
|
+
O(a.$slots, "title.week", ne(le(e)))
|
|
2364
2376
|
]),
|
|
2365
2377
|
key: "7"
|
|
2366
2378
|
} : void 0,
|
|
2367
|
-
!
|
|
2379
|
+
!a.$slots.header && a.$slots["title.month"] ? {
|
|
2368
2380
|
name: "title.month",
|
|
2369
|
-
fn:
|
|
2370
|
-
|
|
2381
|
+
fn: N((e) => [
|
|
2382
|
+
O(a.$slots, "title.month", ne(le(e)))
|
|
2371
2383
|
]),
|
|
2372
2384
|
key: "8"
|
|
2373
2385
|
} : void 0,
|
|
2374
|
-
!
|
|
2386
|
+
!a.$slots.header && a.$slots["title.year"] ? {
|
|
2375
2387
|
name: "title.year",
|
|
2376
|
-
fn:
|
|
2377
|
-
|
|
2388
|
+
fn: N((e) => [
|
|
2389
|
+
O(a.$slots, "title.year", ne(le(e)))
|
|
2378
2390
|
]),
|
|
2379
2391
|
key: "9"
|
|
2380
2392
|
} : void 0,
|
|
2381
|
-
!
|
|
2393
|
+
!a.$slots.header && a.$slots["title.years"] ? {
|
|
2382
2394
|
name: "title.years",
|
|
2383
|
-
fn:
|
|
2384
|
-
|
|
2395
|
+
fn: N((e) => [
|
|
2396
|
+
O(a.$slots, "title.years", ne(le(e)))
|
|
2385
2397
|
]),
|
|
2386
2398
|
key: "10"
|
|
2387
2399
|
} : void 0,
|
|
2388
|
-
!
|
|
2400
|
+
!a.$slots.header && a.$slots["schedule-heading"] ? {
|
|
2389
2401
|
name: "schedule-heading",
|
|
2390
|
-
fn:
|
|
2391
|
-
|
|
2402
|
+
fn: N((e) => [
|
|
2403
|
+
O(a.$slots, "schedule-heading", ne(le(e)))
|
|
2392
2404
|
]),
|
|
2393
2405
|
key: "11"
|
|
2394
2406
|
} : void 0
|
|
2395
2407
|
]), 1024),
|
|
2396
|
-
he("div",
|
|
2408
|
+
he("div", Mn, [
|
|
2397
2409
|
Oe(Ue, {
|
|
2398
2410
|
name: `vuecal-slide-fade--${$(A).transitionDirection}`
|
|
2399
2411
|
}, {
|
|
2400
|
-
default:
|
|
2412
|
+
default: N(() => [
|
|
2401
2413
|
(V(), P("div", {
|
|
2402
2414
|
class: pe(["vuecal__scrollable", i.value]),
|
|
2403
2415
|
key: $(A).id + $(A).start.getTime()
|
|
2404
2416
|
}, [
|
|
2405
|
-
l.value ? (V(), Se(
|
|
2406
|
-
|
|
2417
|
+
l.value ? (V(), Se($n, { key: 0 }, Ce({ _: 2 }, [
|
|
2418
|
+
a.$slots["time-cell"] ? {
|
|
2407
2419
|
name: "time-cell",
|
|
2408
|
-
fn:
|
|
2409
|
-
|
|
2420
|
+
fn: N((e) => [
|
|
2421
|
+
O(a.$slots, "time-cell", ne(le(e)))
|
|
2410
2422
|
]),
|
|
2411
2423
|
key: "0"
|
|
2412
2424
|
} : void 0
|
|
2413
2425
|
]), 1024)) : x("", !0),
|
|
2414
|
-
$(v).weekNumbers && $(A).isMonth ? (V(), P("div",
|
|
2415
|
-
(V(!0), P(de, null, we(E.value, (e) => (V(), P("div",
|
|
2416
|
-
|
|
2426
|
+
$(v).weekNumbers && $(A).isMonth ? (V(), P("div", En, [
|
|
2427
|
+
(V(!0), P(de, null, we(E.value, (e) => (V(), P("div", Yn, [
|
|
2428
|
+
O(a.$slots, "week-number", {}, () => [
|
|
2417
2429
|
he("small", null, ce(e), 1)
|
|
2418
2430
|
])
|
|
2419
2431
|
]))), 256))
|
|
2420
2432
|
])) : x("", !0),
|
|
2421
|
-
he("div",
|
|
2422
|
-
Oe(
|
|
2423
|
-
|
|
2433
|
+
he("div", Sn, [
|
|
2434
|
+
Oe(wn, null, Ce({ _: 2 }, [
|
|
2435
|
+
a.$slots["weekday-heading"] ? {
|
|
2424
2436
|
name: "weekday-heading",
|
|
2425
|
-
fn:
|
|
2426
|
-
|
|
2437
|
+
fn: N((e) => [
|
|
2438
|
+
O(a.$slots, "weekday-heading", ne(le(e)))
|
|
2427
2439
|
]),
|
|
2428
2440
|
key: "0"
|
|
2429
2441
|
} : void 0,
|
|
2430
|
-
|
|
2442
|
+
a.$slots["schedule-heading"] ? {
|
|
2431
2443
|
name: "schedule-heading",
|
|
2432
|
-
fn:
|
|
2433
|
-
|
|
2444
|
+
fn: N((e) => [
|
|
2445
|
+
O(a.$slots, "schedule-heading", ne(le(e)))
|
|
2434
2446
|
]),
|
|
2435
2447
|
key: "1"
|
|
2436
2448
|
} : void 0,
|
|
2437
|
-
|
|
2449
|
+
a.$slots["event.all-day"] ? {
|
|
2438
2450
|
name: "event.all-day",
|
|
2439
|
-
fn:
|
|
2440
|
-
|
|
2451
|
+
fn: N((e) => [
|
|
2452
|
+
O(a.$slots, "event.all-day", ne(le(e)))
|
|
2441
2453
|
]),
|
|
2442
2454
|
key: "2"
|
|
2443
2455
|
} : void 0,
|
|
2444
|
-
|
|
2456
|
+
a.$slots.event ? {
|
|
2445
2457
|
name: "event",
|
|
2446
|
-
fn:
|
|
2447
|
-
|
|
2458
|
+
fn: N((e) => [
|
|
2459
|
+
O(a.$slots, "event", ne(le(e)))
|
|
2448
2460
|
]),
|
|
2449
2461
|
key: "3"
|
|
2450
2462
|
} : void 0
|
|
2451
2463
|
]), 1024),
|
|
2452
|
-
Oe(
|
|
2453
|
-
|
|
2464
|
+
Oe(bn, null, Ce({ _: 2 }, [
|
|
2465
|
+
a.$slots.cell ? {
|
|
2454
2466
|
name: "cell",
|
|
2455
|
-
fn:
|
|
2456
|
-
|
|
2467
|
+
fn: N((e) => [
|
|
2468
|
+
O(a.$slots, "cell", ne(le(e)))
|
|
2457
2469
|
]),
|
|
2458
2470
|
key: "0"
|
|
2459
2471
|
} : void 0,
|
|
2460
|
-
!
|
|
2472
|
+
!a.$slots.cell && a.$slots["cell-date"] ? {
|
|
2461
2473
|
name: "cell-date",
|
|
2462
|
-
fn:
|
|
2463
|
-
|
|
2474
|
+
fn: N((e) => [
|
|
2475
|
+
O(a.$slots, "cell-date", ne(le(e)))
|
|
2464
2476
|
]),
|
|
2465
2477
|
key: "1"
|
|
2466
2478
|
} : void 0,
|
|
2467
|
-
!
|
|
2479
|
+
!a.$slots.cell && a.$slots["cell-content"] ? {
|
|
2468
2480
|
name: "cell-content",
|
|
2469
|
-
fn:
|
|
2470
|
-
|
|
2481
|
+
fn: N((e) => [
|
|
2482
|
+
O(a.$slots, "cell-content", ne(le(e)))
|
|
2471
2483
|
]),
|
|
2472
2484
|
key: "2"
|
|
2473
2485
|
} : void 0,
|
|
2474
|
-
!
|
|
2486
|
+
!a.$slots.cell && a.$slots["cell-events"] ? {
|
|
2475
2487
|
name: "cell-events",
|
|
2476
|
-
fn:
|
|
2477
|
-
|
|
2488
|
+
fn: N((e) => [
|
|
2489
|
+
O(a.$slots, "cell-events", ne(le(e)))
|
|
2478
2490
|
]),
|
|
2479
2491
|
key: "3"
|
|
2480
2492
|
} : void 0,
|
|
2481
|
-
!
|
|
2493
|
+
!a.$slots.cell && !a.$slots["cell-events"] && a.$slots["event.all-day"] ? {
|
|
2482
2494
|
name: "event.all-day",
|
|
2483
|
-
fn:
|
|
2484
|
-
|
|
2495
|
+
fn: N((e) => [
|
|
2496
|
+
O(a.$slots, "event.all-day", ne(le(e)))
|
|
2485
2497
|
]),
|
|
2486
2498
|
key: "4"
|
|
2487
2499
|
} : void 0,
|
|
2488
|
-
!
|
|
2500
|
+
!a.$slots.cell && !a.$slots["cell-events"] && a.$slots[`event.${$(A).id}`] ? {
|
|
2489
2501
|
name: `event.${$(A).id}`,
|
|
2490
|
-
fn:
|
|
2491
|
-
|
|
2502
|
+
fn: N((e) => [
|
|
2503
|
+
O(a.$slots, `event.${$(A).id}`, ne(le(e)))
|
|
2492
2504
|
]),
|
|
2493
2505
|
key: "5"
|
|
2494
2506
|
} : void 0,
|
|
2495
|
-
!
|
|
2507
|
+
!a.$slots.cell && !a.$slots["cell-events"] && a.$slots.event ? {
|
|
2496
2508
|
name: "event",
|
|
2497
|
-
fn:
|
|
2498
|
-
|
|
2509
|
+
fn: N((e) => [
|
|
2510
|
+
O(a.$slots, "event", ne(le(e)))
|
|
2499
2511
|
]),
|
|
2500
2512
|
key: "6"
|
|
2501
2513
|
} : void 0,
|
|
2502
|
-
!
|
|
2514
|
+
!a.$slots.cell && a.$slots["event-count"] ? {
|
|
2503
2515
|
name: "event-count",
|
|
2504
|
-
fn:
|
|
2505
|
-
|
|
2516
|
+
fn: N((e) => [
|
|
2517
|
+
O(a.$slots, "event-count", ne(le(e)))
|
|
2506
2518
|
]),
|
|
2507
2519
|
key: "7"
|
|
2520
|
+
} : void 0,
|
|
2521
|
+
a.$slots["now-line"] ? {
|
|
2522
|
+
name: "now-line",
|
|
2523
|
+
fn: N((e) => [
|
|
2524
|
+
O(a.$slots, "now-line", ne(le(e)))
|
|
2525
|
+
]),
|
|
2526
|
+
key: "8"
|
|
2508
2527
|
} : void 0
|
|
2509
2528
|
]), 1024)
|
|
2510
2529
|
])
|
|
@@ -2514,63 +2533,63 @@ const lt = (y, t) => {
|
|
|
2514
2533
|
}, 8, ["name"])
|
|
2515
2534
|
])
|
|
2516
2535
|
], 64))
|
|
2517
|
-
], 14,
|
|
2536
|
+
], 14, Tn));
|
|
2518
2537
|
}
|
|
2519
|
-
},
|
|
2538
|
+
}, Vn = (y) => {
|
|
2520
2539
|
Fe.texts = { ...fe.texts, ...y }, Fe.dateUtils.updateTexts(Fe.texts);
|
|
2521
2540
|
}, {
|
|
2522
|
-
addDatePrototypes:
|
|
2523
|
-
removeDatePrototypes:
|
|
2524
|
-
updateTexts:
|
|
2525
|
-
addDays:
|
|
2526
|
-
subtractDays:
|
|
2527
|
-
addHours:
|
|
2528
|
-
subtractHours:
|
|
2529
|
-
addMinutes:
|
|
2530
|
-
subtractMinutes:
|
|
2531
|
-
getWeek:
|
|
2532
|
-
isToday:
|
|
2533
|
-
isSameDate:
|
|
2534
|
-
isInRange:
|
|
2535
|
-
isLeapYear:
|
|
2536
|
-
getPreviousFirstDayOfWeek:
|
|
2537
|
-
stringToDate:
|
|
2538
|
-
dateToMinutes:
|
|
2539
|
-
countDays:
|
|
2540
|
-
datesInSameTimeStep:
|
|
2541
|
-
isValid:
|
|
2542
|
-
formatDate:
|
|
2543
|
-
formatDateLite:
|
|
2544
|
-
formatTime:
|
|
2545
|
-
formatTimeLite:
|
|
2546
|
-
formatMinutes:
|
|
2541
|
+
addDatePrototypes: On,
|
|
2542
|
+
removeDatePrototypes: jn,
|
|
2543
|
+
updateTexts: Hn,
|
|
2544
|
+
addDays: Pn,
|
|
2545
|
+
subtractDays: Ln,
|
|
2546
|
+
addHours: An,
|
|
2547
|
+
subtractHours: Fn,
|
|
2548
|
+
addMinutes: Rn,
|
|
2549
|
+
subtractMinutes: Nn,
|
|
2550
|
+
getWeek: Bn,
|
|
2551
|
+
isToday: Wn,
|
|
2552
|
+
isSameDate: Xn,
|
|
2553
|
+
isInRange: In,
|
|
2554
|
+
isLeapYear: qn,
|
|
2555
|
+
getPreviousFirstDayOfWeek: Gn,
|
|
2556
|
+
stringToDate: Un,
|
|
2557
|
+
dateToMinutes: Jn,
|
|
2558
|
+
countDays: Zn,
|
|
2559
|
+
datesInSameTimeStep: Kn,
|
|
2560
|
+
isValid: Qn,
|
|
2561
|
+
formatDate: xn,
|
|
2562
|
+
formatDateLite: ea,
|
|
2563
|
+
formatTime: ta,
|
|
2564
|
+
formatTimeLite: na,
|
|
2565
|
+
formatMinutes: aa
|
|
2547
2566
|
} = Fe.dateUtils;
|
|
2548
2567
|
export {
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2568
|
+
zn as VueCal,
|
|
2569
|
+
On as addDatePrototypes,
|
|
2570
|
+
Pn as addDays,
|
|
2571
|
+
An as addHours,
|
|
2572
|
+
Rn as addMinutes,
|
|
2573
|
+
Zn as countDays,
|
|
2574
|
+
Jn as dateToMinutes,
|
|
2575
|
+
Kn as datesInSameTimeStep,
|
|
2576
|
+
xn as formatDate,
|
|
2577
|
+
ea as formatDateLite,
|
|
2578
|
+
aa as formatMinutes,
|
|
2579
|
+
ta as formatTime,
|
|
2580
|
+
na as formatTimeLite,
|
|
2581
|
+
Gn as getPreviousFirstDayOfWeek,
|
|
2582
|
+
Bn as getWeek,
|
|
2583
|
+
In as isInRange,
|
|
2584
|
+
qn as isLeapYear,
|
|
2585
|
+
Xn as isSameDate,
|
|
2586
|
+
Wn as isToday,
|
|
2587
|
+
Qn as isValidDate,
|
|
2588
|
+
jn as removeDatePrototypes,
|
|
2589
|
+
Un as stringToDate,
|
|
2590
|
+
Ln as subtractDays,
|
|
2591
|
+
Fn as subtractHours,
|
|
2592
|
+
Nn as subtractMinutes,
|
|
2593
|
+
Hn as updateTexts,
|
|
2594
|
+
Vn as useLocale
|
|
2576
2595
|
};
|