@progress/kendo-vue-scheduler 10.2.0-develop.11 → 10.2.0-develop.12
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/Scheduler.d.ts +157 -56
- package/Scheduler.js +1 -1
- package/Scheduler.mjs +242 -214
- package/components/EventOverviewPopover.d.ts +62 -0
- package/components/EventOverviewPopover.js +8 -0
- package/components/EventOverviewPopover.mjs +191 -0
- package/components/MoreEventsPopover.d.ts +3 -1
- package/components/MoreEventsPopover.js +1 -1
- package/components/MoreEventsPopover.mjs +31 -27
- package/components/SchedulerActionButtons.js +1 -1
- package/components/SchedulerActionButtons.mjs +1 -0
- package/components/SchedulerForm.d.ts +412 -2
- package/components/SchedulerForm.js +1 -1
- package/components/SchedulerForm.mjs +162 -60
- package/components/SchedulerQuickCreateForm.d.ts +118 -0
- package/components/SchedulerQuickCreateForm.js +8 -0
- package/components/SchedulerQuickCreateForm.mjs +249 -0
- package/constants/main.d.ts +2 -0
- package/constants/main.js +1 -1
- package/constants/main.mjs +10 -9
- package/dist/cdn/js/kendo-vue-scheduler.js +1 -1
- package/editors/KeepResetCustomEventsDialog.d.ts +31 -0
- package/editors/KeepResetCustomEventsDialog.js +8 -0
- package/editors/KeepResetCustomEventsDialog.mjs +72 -0
- package/editors/SchedulerFormEditor.d.ts +151 -52
- package/editors/SchedulerFormEditor.js +1 -1
- package/editors/SchedulerFormEditor.mjs +192 -139
- package/editors/SchedulerRecurrenceDialog.d.ts +2 -2
- package/editors/SchedulerRecurrenceDialog.js +1 -1
- package/editors/SchedulerRecurrenceDialog.mjs +126 -131
- package/editors/ZonedSplitDateTime.d.ts +32 -3
- package/editors/ZonedSplitDateTime.js +1 -1
- package/editors/ZonedSplitDateTime.mjs +112 -47
- package/hooks/useCloseOnAnchorScrollOut.d.ts +10 -0
- package/hooks/useCloseOnAnchorScrollOut.js +8 -0
- package/hooks/useCloseOnAnchorScrollOut.mjs +43 -0
- package/hooks/useCustomEventsConfirmation.d.ts +20 -0
- package/hooks/useCustomEventsConfirmation.js +8 -0
- package/hooks/useCustomEventsConfirmation.mjs +48 -0
- package/hooks/useDeferredClick.d.ts +12 -0
- package/hooks/useDeferredClick.js +8 -0
- package/hooks/useDeferredClick.mjs +22 -0
- package/hooks/useExclusivePopover.d.ts +26 -0
- package/hooks/useExclusivePopover.js +8 -0
- package/hooks/useExclusivePopover.mjs +30 -0
- package/hooks/useRecurrenceSummary.d.ts +3 -0
- package/hooks/useRecurrenceSummary.js +1 -1
- package/hooks/useRecurrenceSummary.mjs +68 -41
- package/index.d.mts +4 -2
- package/index.d.ts +4 -2
- package/index.js +1 -1
- package/index.mjs +83 -78
- package/items/SchedulerEditItem.d.ts +116 -12
- package/items/SchedulerEditItem.js +1 -1
- package/items/SchedulerEditItem.mjs +212 -131
- package/items/SchedulerItem.d.ts +2 -1
- package/items/SchedulerItem.js +1 -1
- package/items/SchedulerItem.mjs +28 -23
- package/items/SchedulerProportionalViewItem.d.ts +1 -0
- package/items/SchedulerProportionalViewItem.js +1 -1
- package/items/SchedulerProportionalViewItem.mjs +83 -68
- package/items/SchedulerViewItem.d.ts +1 -0
- package/items/SchedulerViewItem.js +1 -1
- package/items/SchedulerViewItem.mjs +84 -75
- package/items/hooks/use-drag-item.js +1 -1
- package/items/hooks/use-drag-item.mjs +49 -48
- package/items/hooks/use-form-item.d.ts +1 -1
- package/items/hooks/use-remove-item.d.ts +1 -1
- package/items/hooks/use-resize-item.js +1 -1
- package/items/hooks/use-resize-item.mjs +74 -65
- package/messages/main.d.ts +42 -0
- package/messages/main.js +1 -1
- package/messages/main.mjs +303 -275
- package/models/InternalDataAction.d.ts +13 -0
- package/models/SchedulerView.d.ts +1 -1
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +13 -12
- package/recurrence/RecurrenceEditor.js +1 -1
- package/recurrence/RecurrenceEditor.mjs +42 -42
- package/recurrence/common.d.ts +10 -0
- package/recurrence/common.js +1 -1
- package/recurrence/common.mjs +39 -35
- package/services/itemsService.d.ts +5 -2
- package/services/itemsService.js +1 -1
- package/services/itemsService.mjs +46 -33
- package/services/occurrenceService.js +1 -1
- package/services/occurrenceService.mjs +18 -18
- package/slots/SchedulerEditSlot.d.ts +70 -8
- package/slots/SchedulerEditSlot.js +1 -1
- package/slots/SchedulerEditSlot.mjs +222 -141
- package/slots/SchedulerSlot.js +1 -1
- package/slots/SchedulerSlot.mjs +20 -16
- package/slots/SchedulerViewSlot.d.ts +3 -0
- package/slots/SchedulerViewSlot.js +1 -1
- package/slots/SchedulerViewSlot.mjs +21 -15
- package/tasks/SchedulerEditTask.d.ts +13 -2
- package/tasks/SchedulerEditTask.js +1 -1
- package/tasks/SchedulerEditTask.mjs +45 -30
- package/utils/main.d.ts +27 -0
- package/utils/main.js +1 -1
- package/utils/main.mjs +172 -136
- package/views/agenda/AgendaView.d.ts +6 -2
- package/views/agenda/AgendaView.js +1 -1
- package/views/agenda/AgendaView.mjs +31 -29
- package/views/agenda/AgendaViewBody.d.ts +3 -3
- package/views/agenda/AgendaViewBody.js +1 -1
- package/views/agenda/AgendaViewBody.mjs +31 -29
- package/views/common/SchedulerDrag.d.ts +4 -2
- package/views/common/SchedulerDrag.js +1 -1
- package/views/common/SchedulerDrag.mjs +8 -7
- package/views/common/SchedulerResize.d.ts +4 -2
- package/views/common/SchedulerResize.js +1 -1
- package/views/common/SchedulerResize.mjs +14 -12
- package/views/common/VerticalResourceIterator.d.ts +3 -3
- package/views/common/VerticalResourceIterator.js +1 -1
- package/views/common/VerticalResourceIterator.mjs +34 -33
- package/views/day/DayView.d.ts +2 -0
- package/views/day/DayView.js +1 -1
- package/views/day/DayView.mjs +9 -7
- package/views/day/DayViewAllDaySlots.d.ts +7 -5
- package/views/day/DayViewAllDaySlots.js +1 -1
- package/views/day/DayViewAllDaySlots.mjs +24 -21
- package/views/day/DayViewMiddleRow.d.ts +7 -5
- package/views/day/DayViewMiddleRow.js +1 -1
- package/views/day/DayViewMiddleRow.mjs +18 -13
- package/views/day/DayViewVerticalRow.d.ts +7 -5
- package/views/day/DayViewVerticalRow.js +1 -1
- package/views/day/DayViewVerticalRow.mjs +23 -17
- package/views/day/DayViewVerticalSlotsRow.d.ts +7 -5
- package/views/day/DayViewVerticalSlotsRow.js +1 -1
- package/views/day/DayViewVerticalSlotsRow.mjs +34 -29
- package/views/day/MultiDayView.d.ts +13 -7
- package/views/day/MultiDayView.js +1 -1
- package/views/day/MultiDayView.mjs +108 -95
- package/views/month/MonthView.d.ts +15 -4
- package/views/month/MonthView.js +1 -1
- package/views/month/MonthView.mjs +105 -68
- package/views/month/MonthViewBody.d.ts +3 -3
- package/views/month/MonthViewBody.js +1 -1
- package/views/month/MonthViewBody.mjs +18 -16
- package/views/time/MultiDayTimelineView.d.ts +6 -4
- package/views/time/MultiDayTimelineView.js +1 -1
- package/views/time/MultiDayTimelineView.mjs +64 -63
- package/views/time/TimelineView.d.ts +2 -0
- package/views/time/TimelineView.js +1 -1
- package/views/time/TimelineView.mjs +5 -3
- package/views/time/TimelineViewBody.d.ts +7 -5
- package/views/time/TimelineViewBody.js +1 -1
- package/views/time/TimelineViewBody.mjs +29 -27
- package/views/week/WeekView.d.ts +2 -0
- package/views/week/WeekView.js +1 -1
- package/views/week/WeekView.mjs +11 -10
- package/views/week/WorkWeekView.d.ts +2 -0
- package/views/week/WorkWeekView.js +1 -1
- package/views/week/WorkWeekView.mjs +17 -16
package/utils/main.mjs
CHANGED
|
@@ -5,67 +5,96 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { ref as
|
|
9
|
-
import "@progress/kendo-date-math";
|
|
10
|
-
import { toGroupResources as
|
|
11
|
-
import { setter as
|
|
12
|
-
import { orderBy as
|
|
13
|
-
var
|
|
14
|
-
const
|
|
8
|
+
import { ref as T, onMounted as E } from "vue";
|
|
9
|
+
import { getDate as g, addDays as $, ZonedDate as h } from "@progress/kendo-date-math";
|
|
10
|
+
import { toGroupResources as v, toFlatGroupResources as A } from "../views/common/utils.mjs";
|
|
11
|
+
import { setter as I, getter as F, clone as R } from "@progress/kendo-vue-common";
|
|
12
|
+
import { orderBy as b } from "@progress/kendo-data-query";
|
|
13
|
+
var k = /* @__PURE__ */ ((e) => (e[e.add = 0] = "add", e[e.remove = 1] = "remove", e))(k || {});
|
|
14
|
+
const f = /* @__PURE__ */ new WeakMap(), w = (e) => {
|
|
15
15
|
if (!e || typeof document == "undefined" || !document.body || !document.defaultView)
|
|
16
16
|
return e;
|
|
17
17
|
const t = document;
|
|
18
|
-
let r =
|
|
19
|
-
r || (r = /* @__PURE__ */ new Map(),
|
|
18
|
+
let r = f.get(t);
|
|
19
|
+
r || (r = /* @__PURE__ */ new Map(), f.set(t, r), queueMicrotask(() => f.delete(t)));
|
|
20
20
|
const s = r.get(e);
|
|
21
21
|
if (s !== void 0)
|
|
22
22
|
return s;
|
|
23
|
-
const
|
|
24
|
-
|
|
23
|
+
const o = t.createElement("span");
|
|
24
|
+
o.className = "k-event", Object.assign(o.style, { position: "fixed", visibility: "hidden", pointerEvents: "none", width: "0", height: "0" }), o.style.setProperty("--kendo-scheduler-event-color", e), t.body.append(o);
|
|
25
25
|
try {
|
|
26
|
-
const
|
|
27
|
-
return r.set(e,
|
|
26
|
+
const n = t.defaultView.getComputedStyle(o).backgroundColor;
|
|
27
|
+
return r.set(e, n), n;
|
|
28
28
|
} finally {
|
|
29
|
-
|
|
29
|
+
o.remove();
|
|
30
30
|
}
|
|
31
|
-
},
|
|
32
|
-
const e =
|
|
33
|
-
return
|
|
31
|
+
}, N = () => {
|
|
32
|
+
const e = T(!1);
|
|
33
|
+
return E(() => {
|
|
34
34
|
e.value = !0;
|
|
35
|
-
}), (t) => e.value ?
|
|
36
|
-
},
|
|
35
|
+
}), (t) => e.value ? w(t) : t;
|
|
36
|
+
}, W = (e) => e[0], Z = (e) => e[e.length - 1], _ = (e, t, r) => {
|
|
37
|
+
const s = h.fromLocalDate(e, r), o = t.getTime() > e.getTime() ? new Date(t.getTime() - 1) : t, n = h.fromLocalDate(o, r);
|
|
38
|
+
return g(s).getTime() !== g(n).getTime();
|
|
39
|
+
}, J = (e, t) => {
|
|
40
|
+
var r;
|
|
41
|
+
return ((r = e.range) == null ? void 0 : r.isAllDay) === !0 && !e.isAllDay && t.dataset.slotAllday === "true";
|
|
42
|
+
}, K = (e, t, ...r) => {
|
|
43
|
+
var i;
|
|
44
|
+
const [s, o] = r, n = s === void 0 ? [] : [s], c = (u) => {
|
|
45
|
+
var a, d;
|
|
46
|
+
e.$emit("dataaction", u, ...n), (d = (a = e.$props).onDataAction) == null || d.call(a, u, ...n), o == null || o();
|
|
47
|
+
};
|
|
48
|
+
(i = e.confirmCustomEvents) != null && i.call(e, t, c) || c(t);
|
|
49
|
+
}, Q = (e, t) => {
|
|
50
|
+
const r = l(e, t.recurrenceId);
|
|
51
|
+
return r != null ? r : l(e, t.id);
|
|
52
|
+
}, X = (e, t, r) => e.filter((s) => {
|
|
53
|
+
const o = l(s, t.recurrenceId);
|
|
54
|
+
return o != null && o === r && !l(s, t.recurrenceRule);
|
|
55
|
+
}), L = (e, t) => {
|
|
56
|
+
const r = R(e);
|
|
57
|
+
return p(r, t.recurrenceId, null), p(r, t.recurrenceRule, null), p(r, t.originalStart, null), r;
|
|
58
|
+
}, O = (e) => {
|
|
37
59
|
const t = /* @__PURE__ */ new Set();
|
|
38
60
|
return e.forEach((r) => {
|
|
39
61
|
t.add(r.field);
|
|
40
62
|
}), t.size === e.length;
|
|
41
63
|
};
|
|
42
|
-
function
|
|
43
|
-
const
|
|
64
|
+
function ee(e, t, r, s, o = "all day") {
|
|
65
|
+
const n = { skeleton: "yMMMMEEEEdhm" }, c = { skeleton: "yMMMMEEEEd" }, i = "t", u = t.getFullYear() === r.getFullYear() && t.getMonth() === r.getMonth() && t.getDate() === r.getDate();
|
|
44
66
|
if (s) {
|
|
45
|
-
const
|
|
46
|
-
return
|
|
67
|
+
const a = r.getHours() === 0 && r.getMinutes() === 0 && r.getSeconds() === 0 && r.getTime() - t.getTime() === 864e5;
|
|
68
|
+
return u || a ? `${e.formatDate(t, c)} (${o})` : `${e.formatDate(t, c)} to ${e.formatDate(r, c)} (${o})`;
|
|
47
69
|
}
|
|
48
|
-
return
|
|
70
|
+
return u ? `${e.formatDate(t, n)}–${e.formatDate(r, i)}` : `${e.formatDate(t, n)}-${e.formatDate(r, n)}`;
|
|
71
|
+
}
|
|
72
|
+
function te(e, t, r, s, o) {
|
|
73
|
+
const n = { skeleton: "MMMMd" }, c = "t", i = r > t && g(r).getTime() === r.getTime() ? $(r, -1) : r, u = g(t).getTime() === g(i).getTime(), a = e.formatDate(t, n);
|
|
74
|
+
if (s)
|
|
75
|
+
return u ? `${a}, ${o}` : `${a} - ${e.formatDate(i, n)}, ${o}`;
|
|
76
|
+
const d = e.formatDate(t, c), m = e.formatDate(r, c);
|
|
77
|
+
return u ? `${a}, ${d} - ${m}` : `${a}, ${d} - ${e.formatDate(r, n)}, ${m}`;
|
|
49
78
|
}
|
|
50
|
-
const
|
|
79
|
+
const H = (e, t, r, s = 0) => {
|
|
51
80
|
if (s === r)
|
|
52
81
|
return null;
|
|
53
|
-
let
|
|
54
|
-
const
|
|
55
|
-
if (!
|
|
56
|
-
return n;
|
|
57
|
-
if (o.getAttribute("data-slot") === "true")
|
|
82
|
+
let o = null;
|
|
83
|
+
const n = document.elementFromPoint(e, t);
|
|
84
|
+
if (!n)
|
|
58
85
|
return o;
|
|
86
|
+
if (n.getAttribute("data-slot") === "true")
|
|
87
|
+
return n;
|
|
59
88
|
{
|
|
60
|
-
const i =
|
|
61
|
-
|
|
89
|
+
const i = n.style.pointerEvents;
|
|
90
|
+
n.style.pointerEvents = "none", o = H(e, t, r, s + 1), n.style.pointerEvents = i;
|
|
62
91
|
}
|
|
63
|
-
return
|
|
64
|
-
},
|
|
92
|
+
return o;
|
|
93
|
+
}, l = (e, t) => F(t)(e), p = (e, t, r) => {
|
|
65
94
|
if (t)
|
|
66
|
-
return
|
|
67
|
-
},
|
|
68
|
-
function
|
|
95
|
+
return I(t)(e, r);
|
|
96
|
+
}, re = (e) => e != null;
|
|
97
|
+
function oe(e) {
|
|
69
98
|
return new Date(Date.UTC(
|
|
70
99
|
e.getFullYear(),
|
|
71
100
|
e.getMonth(),
|
|
@@ -76,13 +105,13 @@ function _(e) {
|
|
|
76
105
|
e.getMilliseconds()
|
|
77
106
|
));
|
|
78
107
|
}
|
|
79
|
-
const
|
|
80
|
-
const s =
|
|
81
|
-
return r.find((
|
|
82
|
-
},
|
|
83
|
-
const r =
|
|
84
|
-
return !!(r &&
|
|
85
|
-
},
|
|
108
|
+
const ne = (e, t, r) => {
|
|
109
|
+
const s = z(e, t) ? l(e, t.id) : l(e, t.recurrenceId);
|
|
110
|
+
return r.find((o) => l(o, t.id) === s);
|
|
111
|
+
}, z = (e, t) => {
|
|
112
|
+
const r = l(e, t.id), s = l(e, t.recurrenceId), o = l(e, t.recurrenceRule);
|
|
113
|
+
return !!(r && o && s == null);
|
|
114
|
+
}, x = (e, t) => Math.max(e.getTime(), t.getTime()), S = (e, t) => Math.min(e.getTime(), t.getTime()), y = (e, t, r, s, o = !1) => o ? x(t, s) - S(e, r) <= t.getTime() - e.getTime() + (s.getTime() - r.getTime()) : x(t, s) - S(e, r) < t.getTime() - e.getTime() + (s.getTime() - r.getTime()), B = {
|
|
86
115
|
id: "id",
|
|
87
116
|
start: "start",
|
|
88
117
|
startTimezone: "startTimezone",
|
|
@@ -96,81 +125,81 @@ const J = (e, t, r) => {
|
|
|
96
125
|
recurrenceId: "recurrenceId",
|
|
97
126
|
recurrenceExceptions: "recurrenceExceptions",
|
|
98
127
|
readonly: "readonly"
|
|
99
|
-
},
|
|
100
|
-
const r =
|
|
128
|
+
}, se = (e) => ({ fields: { ...B, ...e } }), ce = (e, t, r) => (t.getHours() < e.getHours() || t.getHours() === e.getHours() && t.getMinutes() <= e.getMinutes()) && (e.getHours() < r.getHours() || r.getHours() === e.getHours() && e.getMinutes() < r.getMinutes()), ie = (e, t) => {
|
|
129
|
+
const r = v(e, t), s = A(r);
|
|
101
130
|
return s.length === 1 ? [{
|
|
102
131
|
index: 0,
|
|
103
132
|
// resources: []
|
|
104
133
|
resources: (t || []).reduce(
|
|
105
|
-
(
|
|
134
|
+
(o, n) => [...o, ...n.data.map((c) => ({
|
|
106
135
|
...c,
|
|
107
|
-
field:
|
|
108
|
-
valueField:
|
|
109
|
-
colorField:
|
|
110
|
-
multiple:
|
|
136
|
+
field: n.field,
|
|
137
|
+
valueField: n.valueField,
|
|
138
|
+
colorField: n.colorField,
|
|
139
|
+
multiple: n.multiple
|
|
111
140
|
}))],
|
|
112
141
|
[]
|
|
113
142
|
)
|
|
114
|
-
}] : s.map((
|
|
115
|
-
index:
|
|
116
|
-
resources:
|
|
143
|
+
}] : s.map((o, n) => ({
|
|
144
|
+
index: n,
|
|
145
|
+
resources: o
|
|
117
146
|
}));
|
|
118
|
-
},
|
|
147
|
+
}, P = (e) => e == null, ue = (e) => P(e) || e.trim && e.trim().length === 0, D = (e) => {
|
|
119
148
|
let t = 0;
|
|
120
149
|
const r = e.slice();
|
|
121
|
-
return r.sort((s,
|
|
122
|
-
r[
|
|
150
|
+
return r.sort((s, o) => s - o).forEach((s, o) => {
|
|
151
|
+
r[o] === o && (t = o + 1);
|
|
123
152
|
}), t;
|
|
124
|
-
},
|
|
125
|
-
let
|
|
126
|
-
return r.forEach((
|
|
153
|
+
}, ae = (e, t, r, s = !1) => {
|
|
154
|
+
let o;
|
|
155
|
+
return r.forEach((n) => {
|
|
127
156
|
const c = [];
|
|
128
|
-
t.sort((
|
|
129
|
-
if ((s ||
|
|
130
|
-
const
|
|
131
|
-
|
|
157
|
+
t.sort((u, a) => u.$props.start.getTime() - a.$props.start.getTime()).forEach((u) => {
|
|
158
|
+
if ((s || u.$props.isAllDay === n.cSlot.isAllDay) && u.$props.range.index === n.cSlot.range.index && u.$props.group.index === n.cSlot.group.index && y(u.$props.start, u.$props.end, n.cSlot.start, n.cSlot.end)) {
|
|
159
|
+
const d = D(c);
|
|
160
|
+
u === e && o === void 0 && (o = d), c.splice(d, 0, d);
|
|
132
161
|
}
|
|
133
162
|
});
|
|
134
|
-
}),
|
|
135
|
-
},
|
|
163
|
+
}), o;
|
|
164
|
+
}, de = (e, t) => {
|
|
136
165
|
const r = /* @__PURE__ */ new Set();
|
|
137
|
-
return t.forEach((
|
|
138
|
-
|
|
139
|
-
}),
|
|
140
|
-
},
|
|
141
|
-
e.forEach((
|
|
142
|
-
|
|
143
|
-
}), t.forEach((
|
|
144
|
-
const
|
|
145
|
-
|
|
166
|
+
return t.forEach((o) => {
|
|
167
|
+
o._order !== void 0 && o._order !== null && r.add(o._order);
|
|
168
|
+
}), D(Array.from(r));
|
|
169
|
+
}, le = (e, t, r = !1) => {
|
|
170
|
+
e.forEach((o) => {
|
|
171
|
+
o.order = null;
|
|
172
|
+
}), t.forEach((o) => {
|
|
173
|
+
const n = o.cSlot ? o.cSlot : o;
|
|
174
|
+
n.items.splice(0, n.items.length);
|
|
146
175
|
});
|
|
147
|
-
const s = [...e].sort((
|
|
148
|
-
t.forEach((
|
|
149
|
-
const
|
|
176
|
+
const s = [...e].sort((o, n) => o.start.getTime() - n.start.getTime());
|
|
177
|
+
t.forEach((o) => {
|
|
178
|
+
const n = o.cSlot ? o.cSlot : o, c = [];
|
|
150
179
|
s.forEach((i) => {
|
|
151
|
-
if ((r || i.isAllDay ===
|
|
180
|
+
if ((r || i.isAllDay === n.isAllDay) && i.range.index === n.range.index && (i.range.isAllDay === void 0 || n.range.isAllDay === void 0 || i.range.isAllDay === n.range.isAllDay) && i.group.index === n.group.index && y(i.start, i.end, n.start, n.end)) {
|
|
152
181
|
if (i.order !== null && i.order !== void 0)
|
|
153
|
-
c.includes(i.order) || (c.push(i.order), c.sort((
|
|
182
|
+
c.includes(i.order) || (c.push(i.order), c.sort((a, d) => a - d));
|
|
154
183
|
else {
|
|
155
|
-
const
|
|
156
|
-
i.order =
|
|
184
|
+
const a = D(c);
|
|
185
|
+
i.order = a, c.push(a), c.sort((d, m) => d - m);
|
|
157
186
|
}
|
|
158
|
-
|
|
187
|
+
n.items.push(i);
|
|
159
188
|
}
|
|
160
189
|
});
|
|
161
190
|
});
|
|
162
|
-
},
|
|
191
|
+
}, ge = (e, t, r = !1) => {
|
|
163
192
|
e.forEach((s) => s.slots.splice(0, s.slots.length)), e.forEach((s) => {
|
|
164
|
-
t.forEach((
|
|
165
|
-
const
|
|
166
|
-
(r || s.isAllDay ===
|
|
193
|
+
t.forEach((o) => {
|
|
194
|
+
const n = o.cSlot ? o.cSlot : o;
|
|
195
|
+
(r || s.isAllDay === n.isAllDay) && s.range.index === n.range.index && (s.range.isAllDay === void 0 || n.range.isAllDay === void 0 || s.range.isAllDay === n.range.isAllDay) && s.group.index === n.group.index && y(s.start, s.end, n.start, n.end) && s.slots.push(o);
|
|
167
196
|
});
|
|
168
197
|
});
|
|
169
|
-
},
|
|
198
|
+
}, me = function(e) {
|
|
170
199
|
return e.props.items.find((r) => r.order === 0) || e.props.items[0];
|
|
171
|
-
},
|
|
172
|
-
const r = e.filter((
|
|
173
|
-
return
|
|
200
|
+
}, G = (e, t, r) => !!(e.uid === t.uid && (e.occurrenceId === void 0 || e.occurrenceId === t.occurrenceId) && e.group.index === t.group.index && e.range.index === t.range.index && (r || e.isAllDay === t.isAllDay)), Y = (e, t) => {
|
|
201
|
+
const r = e.filter((o) => o.element !== null);
|
|
202
|
+
return b(
|
|
174
203
|
r,
|
|
175
204
|
[
|
|
176
205
|
{ field: "group.index", dir: "asc" },
|
|
@@ -179,54 +208,61 @@ const J = (e, t, r) => {
|
|
|
179
208
|
{ field: "start", dir: "asc" }
|
|
180
209
|
]
|
|
181
210
|
);
|
|
182
|
-
},
|
|
183
|
-
const s = e,
|
|
211
|
+
}, fe = (e, t) => e.start.getTime() === t.start.getTime() && e.end.getTime() === t.end.getTime() && e.index === t.index && e.group.index === t.group.index && e.range.index === t.range.index && e.isAllDay === t.isAllDay, M = (e, t, r = !1) => {
|
|
212
|
+
const s = e, o = Y(t, r);
|
|
184
213
|
return {
|
|
185
|
-
currentIndex:
|
|
186
|
-
sorted:
|
|
214
|
+
currentIndex: o.findIndex((c) => G(c, s, r)),
|
|
215
|
+
sorted: o
|
|
187
216
|
};
|
|
188
|
-
},
|
|
217
|
+
}, pe = (e, t, r = !1) => {
|
|
189
218
|
if (!e || !t)
|
|
190
219
|
return null;
|
|
191
|
-
const { currentIndex: s, sorted:
|
|
192
|
-
return
|
|
193
|
-
},
|
|
194
|
-
const { currentIndex:
|
|
195
|
-
return o
|
|
196
|
-
},
|
|
220
|
+
const { currentIndex: s, sorted: o } = M(e, t, r) || {};
|
|
221
|
+
return o[s];
|
|
222
|
+
}, ye = (e, t, r = !1, s = !1) => {
|
|
223
|
+
const { currentIndex: o, sorted: n } = M(e, t, r);
|
|
224
|
+
return n[o + (s ? -1 : 1)];
|
|
225
|
+
}, De = (e, t) => (e.order || 0) - (t.order || 0);
|
|
197
226
|
export {
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
Q as
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
227
|
+
k as COLLECTION_ACTION,
|
|
228
|
+
ae as calculateOrder,
|
|
229
|
+
de as calculateProportionalOrder,
|
|
230
|
+
G as compareItems,
|
|
231
|
+
fe as compareSlots,
|
|
232
|
+
_ as crossesDayBoundary,
|
|
233
|
+
B as defaultModelFields,
|
|
234
|
+
K as emitDataAction,
|
|
235
|
+
pe as findCurrentItem,
|
|
236
|
+
me as findFirstItem,
|
|
237
|
+
ne as findMaster,
|
|
238
|
+
D as findMissing,
|
|
239
|
+
ye as findNextItem,
|
|
240
|
+
X as findSeriesExceptions,
|
|
241
|
+
W as first,
|
|
242
|
+
te as formatEventSummary,
|
|
243
|
+
ee as formatEventTime,
|
|
244
|
+
M as getCurrentItemIndex,
|
|
245
|
+
l as getField,
|
|
246
|
+
se as getModelFields,
|
|
247
|
+
w as getSchedulerResourceColor,
|
|
248
|
+
Q as getSeriesMasterId,
|
|
249
|
+
Y as getSortedSlots,
|
|
250
|
+
y as intersects,
|
|
251
|
+
P as isBlank,
|
|
252
|
+
O as isGroupped,
|
|
253
|
+
ce as isInTimeRange,
|
|
254
|
+
z as isMaster,
|
|
255
|
+
ue as isNullOrEmptyString,
|
|
256
|
+
re as isPresent,
|
|
257
|
+
J as isTimedItemOnDaySlot,
|
|
258
|
+
Z as last,
|
|
259
|
+
ge as mapItemsToSlots,
|
|
260
|
+
le as mapSlotsToItems,
|
|
261
|
+
De as orderSort,
|
|
262
|
+
p as setField,
|
|
263
|
+
H as slotDive,
|
|
264
|
+
ie as toSchedulerGroups,
|
|
265
|
+
L as toStandaloneEvent,
|
|
266
|
+
oe as toUTCDateTime,
|
|
267
|
+
N as useSchedulerResourceColor
|
|
232
268
|
};
|
|
@@ -77,6 +77,7 @@ export interface AgendaViewProps extends SchedulerViewProps {
|
|
|
77
77
|
* @hidden
|
|
78
78
|
*/
|
|
79
79
|
declare const AgendaView: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
80
|
+
onDataAction: PropType<(action: DataAction) => void>;
|
|
80
81
|
name: {
|
|
81
82
|
type: PropType<string>;
|
|
82
83
|
default: string;
|
|
@@ -121,7 +122,8 @@ declare const AgendaView: import('vue').DefineComponent<import('vue').ExtractPro
|
|
|
121
122
|
items(): import('../../models/Item').Item[];
|
|
122
123
|
}, {
|
|
123
124
|
handleDataAction(action: DataAction): void;
|
|
124
|
-
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin,
|
|
125
|
+
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "dataaction"[], "dataaction", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
126
|
+
onDataAction: PropType<(action: DataAction) => void>;
|
|
125
127
|
name: {
|
|
126
128
|
type: PropType<string>;
|
|
127
129
|
default: string;
|
|
@@ -159,7 +161,9 @@ declare const AgendaView: import('vue').DefineComponent<import('vue').ExtractPro
|
|
|
159
161
|
type: PropType<boolean | EditableProp>;
|
|
160
162
|
default: boolean;
|
|
161
163
|
};
|
|
162
|
-
}>> & Readonly<{
|
|
164
|
+
}>> & Readonly<{
|
|
165
|
+
onDataaction?: (...args: any[]) => any;
|
|
166
|
+
}>, {
|
|
163
167
|
name: string;
|
|
164
168
|
step: number;
|
|
165
169
|
editable: boolean | EditableProp;
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("vue"),f=require("../../components/BaseView.js"),m=require("../common/VerticalResourceIterator.js"),l=require("../../constants/main.js"),t=require("@progress/kendo-date-math"),n=require("@progress/kendo-vue-intl"),T=require("../../services/rangeService.js"),y=require("../../services/occurrenceService.js"),V=require("../../services/itemsService.js"),
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("vue"),f=require("../../components/BaseView.js"),m=require("../common/VerticalResourceIterator.js"),l=require("../../constants/main.js"),t=require("@progress/kendo-date-math"),n=require("@progress/kendo-vue-intl"),T=require("../../services/rangeService.js"),y=require("../../services/occurrenceService.js"),V=require("../../services/itemsService.js"),r=require("../../utils/main.js"),A=require("./AgendaViewHead.js"),v=require("./AgendaViewBody.js"),E=require("../../tasks/SchedulerEditTask.js"),N=require("../../slots/SchedulerEditSlot.js"),w=require("../../services/slotsService.js"),o=require("../../hooks/useCellSync.js"),_=s.defineComponent({name:"KendoAgendaView",emits:["dataaction"],props:{onDataAction:Function,name:{type:String,default:"agenda"},dateRange:{type:[Function,Object],default:function(){return I}},selectedDateFormat:{type:String,default:"{0:M} - {1:M}"},selectedShortDateFormat:{type:String,default:"{0:m} - {1:m}"},slotDuration:{type:Number,default:1440},slotDivisions:{type:Number,default:1},step:{type:Number,default:l.DAYS_IN_WEEK_COUNT},numberOfDays:{type:Number,default:l.DAYS_IN_WEEK_COUNT},task:[String,Function,Object],editable:{type:[Boolean,Object],default:!1}},inject:{ks:{default:null},kendoLocalizationService:{default:null},kendoIntlService:{default:null}},created(){this.intl=n.provideIntlService(this)},mounted(){o.useCellSync({element:this.$el,selector:".k-scheduler-datecolumn",explicitDepth:!1}),setTimeout(()=>o.useCellSync({element:this.$el,selector:".k-scheduler-timecolumn",explicitDepth:!1}))},updated(){o.useCellSync({element:this.$el,selector:".k-scheduler-datecolumn",explicitDepth:!1}),setTimeout(()=>o.useCellSync({element:this.$el,selector:".k-scheduler-timecolumn",explicitDepth:!1}))},computed:{ranges(){return T.toRanges(this.ks.dateRange,{step:t.MS_PER_DAY,timezone:this.ks.timezone})},agendaSlots(){return w.toSlots(this.ks.dateRange,{step:t.MS_PER_DAY},{groups:this.ks.groups,ranges:this.ranges})},occurrences(){return y.toOccurrences(this.ks.dataItems,{dateRange:this.ks.dateRange,fields:this.ks.fields,timezone:this.ks.timezone})},items(){const e=V.toItems(this.occurrences,{timezone:this.ks.timezone},{groups:this.ks.groups,ranges:this.ranges});return r.mapItemsToSlots(e,this.agendaSlots,!0),r.mapSlotsToItems(e,this.agendaSlots,!0),e}},render(){this.$props.editTask||E.SchedulerEditTask,this.$props.editSlot||N.SchedulerEditSlot,n.provideIntlService(this),n.provideLocalizationService(this);const e=this.agendaSlots;return s.createVNode(f.BaseView,{id:this.$props.id,class:"k-scheduler-agendaview",viewProps:{...this.$props},baseSlots:this.items,ranges:this.ranges,isAgendaView:!0},{default:()=>[s.createVNode("div",{class:"k-scheduler-head",role:"rowgroup"},[s.createVNode(m.VerticalResourceIterator,{resources:this.ks.props.resources,group:this.ks.props.group,role:"presentation"},{default:()=>[s.createVNode(A.AgendaViewHead,null,null)]})]),s.createVNode("div",{class:"k-scheduler-body",role:"rowgroup"},[s.createVNode(m.VerticalResourceIterator,{resources:this.ks.props.resources,group:this.ks.props.group,nested:!0,role:"presentation"},{default:()=>[s.createVNode(v.AgendaViewBody,{items:this.items,agendaSlots:e,task:this.$props.task,editable:this.$props.editable,onDataaction:this.handleDataAction},null)]})])]})},methods:{handleDataAction(e){r.emitDataAction(this,e)}}}),g=e=>t.getDate(e),q=(e,a)=>t.getDate(t.addDays(e,a||1)),I=({intl:e,date:a,numberOfDays:c=1,timezone:i})=>{const d=t.ZonedDate.fromLocalDate(a,i),u=c===l.DAYS_IN_WEEK_COUNT?g(t.firstDayInWeek(d,e.firstDay())):g(d),S=q(u,c),p=t.ZonedDate.fromUTCDate(r.toUTCDateTime(u),i),h=t.ZonedDate.fromUTCDate(r.toUTCDateTime(S),i),D=new Date(p.getTime()),k=new Date(h.getTime());return{start:D,end:k,zonedStart:p,zonedEnd:h}};exports.AgendaView=_;
|
|
@@ -6,24 +6,26 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import { defineComponent as y, createVNode as t } from "vue";
|
|
9
|
-
import { BaseView as
|
|
10
|
-
import { VerticalResourceIterator as
|
|
9
|
+
import { BaseView as A } from "../../components/BaseView.mjs";
|
|
10
|
+
import { VerticalResourceIterator as p } from "../common/VerticalResourceIterator.mjs";
|
|
11
11
|
import { DAYS_IN_WEEK_COUNT as a } from "../../constants/main.mjs";
|
|
12
|
-
import { ZonedDate as i, firstDayInWeek as
|
|
12
|
+
import { ZonedDate as i, firstDayInWeek as w, getDate as D, addDays as b, MS_PER_DAY as u } from "@progress/kendo-date-math";
|
|
13
13
|
import { provideIntlService as h, provideLocalizationService as v } from "@progress/kendo-vue-intl";
|
|
14
14
|
import { toRanges as E } from "../../services/rangeService.mjs";
|
|
15
|
-
import { toOccurrences as
|
|
16
|
-
import { toItems as
|
|
17
|
-
import {
|
|
18
|
-
import { AgendaViewHead as
|
|
19
|
-
import { AgendaViewBody as
|
|
20
|
-
import { SchedulerEditTask as
|
|
21
|
-
import { SchedulerEditSlot as
|
|
22
|
-
import { toSlots as
|
|
15
|
+
import { toOccurrences as R } from "../../services/occurrenceService.mjs";
|
|
16
|
+
import { toItems as $ } from "../../services/itemsService.mjs";
|
|
17
|
+
import { emitDataAction as z, mapItemsToSlots as I, mapSlotsToItems as V, toUTCDateTime as f } from "../../utils/main.mjs";
|
|
18
|
+
import { AgendaViewHead as _ } from "./AgendaViewHead.mjs";
|
|
19
|
+
import { AgendaViewBody as N } from "./AgendaViewBody.mjs";
|
|
20
|
+
import { SchedulerEditTask as C } from "../../tasks/SchedulerEditTask.mjs";
|
|
21
|
+
import { SchedulerEditSlot as x } from "../../slots/SchedulerEditSlot.mjs";
|
|
22
|
+
import { toSlots as F } from "../../services/slotsService.mjs";
|
|
23
23
|
import { useCellSync as s } from "../../hooks/useCellSync.mjs";
|
|
24
|
-
const
|
|
24
|
+
const te = /* @__PURE__ */ y({
|
|
25
25
|
name: "KendoAgendaView",
|
|
26
|
+
emits: ["dataaction"],
|
|
26
27
|
props: {
|
|
28
|
+
onDataAction: Function,
|
|
27
29
|
name: {
|
|
28
30
|
type: String,
|
|
29
31
|
default: "agenda"
|
|
@@ -105,39 +107,39 @@ const ee = /* @__PURE__ */ y({
|
|
|
105
107
|
computed: {
|
|
106
108
|
ranges() {
|
|
107
109
|
return E(this.ks.dateRange, {
|
|
108
|
-
step:
|
|
110
|
+
step: u,
|
|
109
111
|
timezone: this.ks.timezone
|
|
110
112
|
});
|
|
111
113
|
},
|
|
112
114
|
agendaSlots() {
|
|
113
|
-
return
|
|
114
|
-
step:
|
|
115
|
+
return F(this.ks.dateRange, {
|
|
116
|
+
step: u
|
|
115
117
|
}, {
|
|
116
118
|
groups: this.ks.groups,
|
|
117
119
|
ranges: this.ranges
|
|
118
120
|
});
|
|
119
121
|
},
|
|
120
122
|
occurrences() {
|
|
121
|
-
return
|
|
123
|
+
return R(this.ks.dataItems, {
|
|
122
124
|
dateRange: this.ks.dateRange,
|
|
123
125
|
fields: this.ks.fields,
|
|
124
126
|
timezone: this.ks.timezone
|
|
125
127
|
});
|
|
126
128
|
},
|
|
127
129
|
items() {
|
|
128
|
-
const e =
|
|
130
|
+
const e = $(this.occurrences, {
|
|
129
131
|
timezone: this.ks.timezone
|
|
130
132
|
}, {
|
|
131
133
|
groups: this.ks.groups,
|
|
132
134
|
ranges: this.ranges
|
|
133
135
|
});
|
|
134
|
-
return
|
|
136
|
+
return I(e, this.agendaSlots, !0), V(e, this.agendaSlots, !0), e;
|
|
135
137
|
}
|
|
136
138
|
},
|
|
137
139
|
render() {
|
|
138
|
-
this.$props.editTask ||
|
|
140
|
+
this.$props.editTask || C, this.$props.editSlot || x, h(this), v(this);
|
|
139
141
|
const e = this.agendaSlots;
|
|
140
|
-
return t(
|
|
142
|
+
return t(A, {
|
|
141
143
|
id: this.$props.id,
|
|
142
144
|
class: "k-scheduler-agendaview",
|
|
143
145
|
viewProps: {
|
|
@@ -150,22 +152,22 @@ const ee = /* @__PURE__ */ y({
|
|
|
150
152
|
default: () => [t("div", {
|
|
151
153
|
class: "k-scheduler-head",
|
|
152
154
|
role: "rowgroup"
|
|
153
|
-
}, [t(
|
|
155
|
+
}, [t(p, {
|
|
154
156
|
resources: this.ks.props.resources,
|
|
155
157
|
group: this.ks.props.group,
|
|
156
158
|
role: "presentation"
|
|
157
159
|
}, {
|
|
158
|
-
default: () => [t(
|
|
160
|
+
default: () => [t(_, null, null)]
|
|
159
161
|
})]), t("div", {
|
|
160
162
|
class: "k-scheduler-body",
|
|
161
163
|
role: "rowgroup"
|
|
162
|
-
}, [t(
|
|
164
|
+
}, [t(p, {
|
|
163
165
|
resources: this.ks.props.resources,
|
|
164
166
|
group: this.ks.props.group,
|
|
165
167
|
nested: !0,
|
|
166
168
|
role: "presentation"
|
|
167
169
|
}, {
|
|
168
|
-
default: () => [t(
|
|
170
|
+
default: () => [t(N, {
|
|
169
171
|
items: this.items,
|
|
170
172
|
agendaSlots: e,
|
|
171
173
|
task: this.$props.task,
|
|
@@ -177,23 +179,23 @@ const ee = /* @__PURE__ */ y({
|
|
|
177
179
|
},
|
|
178
180
|
methods: {
|
|
179
181
|
handleDataAction(e) {
|
|
180
|
-
this
|
|
182
|
+
z(this, e);
|
|
181
183
|
}
|
|
182
184
|
}
|
|
183
|
-
}), g = (e) =>
|
|
185
|
+
}), g = (e) => D(e), O = (e, o) => D(b(e, o || 1)), j = ({
|
|
184
186
|
intl: e,
|
|
185
187
|
date: o,
|
|
186
188
|
numberOfDays: n = 1,
|
|
187
189
|
timezone: r
|
|
188
190
|
}) => {
|
|
189
|
-
const l = i.fromLocalDate(o, r), d = g(n === a ?
|
|
191
|
+
const l = i.fromLocalDate(o, r), d = g(n === a ? w(l, e.firstDay()) : l), k = O(d, n), m = i.fromUTCDate(f(d), r), c = i.fromUTCDate(f(k), r), S = new Date(m.getTime()), T = new Date(c.getTime());
|
|
190
192
|
return {
|
|
191
193
|
start: S,
|
|
192
194
|
end: T,
|
|
193
195
|
zonedStart: m,
|
|
194
|
-
zonedEnd:
|
|
196
|
+
zonedEnd: c
|
|
195
197
|
};
|
|
196
198
|
};
|
|
197
199
|
export {
|
|
198
|
-
|
|
200
|
+
te as AgendaView
|
|
199
201
|
};
|
|
@@ -15,7 +15,7 @@ export interface AgendaViewBodyProps {
|
|
|
15
15
|
agendaSlots: any[];
|
|
16
16
|
task: any;
|
|
17
17
|
editable?: boolean | object;
|
|
18
|
-
|
|
18
|
+
onDataAction: (action: DataAction) => void;
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
21
|
* @hidden
|
|
@@ -27,7 +27,7 @@ declare const AgendaViewBody: import('vue').DefineComponent<import('vue').Extrac
|
|
|
27
27
|
agendaSlots: PropType<any[]>;
|
|
28
28
|
task: PropType<any>;
|
|
29
29
|
editable: PropType<boolean | object>;
|
|
30
|
-
|
|
30
|
+
onDataAction: PropType<(action: DataAction) => void>;
|
|
31
31
|
}>, {}, {
|
|
32
32
|
hasMounted: boolean;
|
|
33
33
|
ksSlots: {
|
|
@@ -44,7 +44,7 @@ declare const AgendaViewBody: import('vue').DefineComponent<import('vue').Extrac
|
|
|
44
44
|
agendaSlots: PropType<any[]>;
|
|
45
45
|
task: PropType<any>;
|
|
46
46
|
editable: PropType<boolean | object>;
|
|
47
|
-
|
|
47
|
+
onDataAction: PropType<(action: DataAction) => void>;
|
|
48
48
|
}>> & Readonly<{
|
|
49
49
|
onDataaction?: (...args: any[]) => any;
|
|
50
50
|
}>, {}, {}, {}, {}, string, () => {
|