@progress/kendo-vue-scheduler 10.2.0-develop.10 → 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
|
@@ -5,16 +5,16 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { defineComponent as
|
|
9
|
-
import { SchedulerItem as
|
|
10
|
-
import { calculateOrder as
|
|
11
|
-
import { getRect as S, setRect as
|
|
12
|
-
import { BORDER_WIDTH as
|
|
13
|
-
import { provideIntlService as
|
|
14
|
-
import { SchedulerItemContent as
|
|
15
|
-
import { getDefaultSlots as
|
|
16
|
-
import { chevronRightIcon as k, chevronLeftIcon as
|
|
17
|
-
const
|
|
8
|
+
import { defineComponent as M, createVNode as i, Fragment as P, h as C } from "vue";
|
|
9
|
+
import { SchedulerItem as B } from "./SchedulerItem.mjs";
|
|
10
|
+
import { calculateOrder as N, intersects as y, last as j, first as K } from "../utils/main.mjs";
|
|
11
|
+
import { getRect as S, setRect as D } from "../views/common/utils.mjs";
|
|
12
|
+
import { BORDER_WIDTH as m } from "../constants/main.mjs";
|
|
13
|
+
import { provideIntlService as U } from "@progress/kendo-vue-intl";
|
|
14
|
+
import { SchedulerItemContent as I } from "./SchedulerItemContent.mjs";
|
|
15
|
+
import { getDefaultSlots as _, Icon as u, getTemplate as L, canUseDOM as w } from "@progress/kendo-vue-common";
|
|
16
|
+
import { chevronRightIcon as k, chevronLeftIcon as A, chevronUpIcon as V, arrowRotateCwIcon as E, arrowsNoRepeatIcon as F, chevronDownIcon as q } from "@progress/kendo-svg-icons";
|
|
17
|
+
const v = 1, H = 25, se = /* @__PURE__ */ M({
|
|
18
18
|
name: "KendoSchedulerViewItem",
|
|
19
19
|
inheritAttrs: !1,
|
|
20
20
|
props: {
|
|
@@ -104,6 +104,10 @@ const T = 1, x = 25, te = /* @__PURE__ */ A({
|
|
|
104
104
|
},
|
|
105
105
|
formattedTime() {
|
|
106
106
|
return this.intl.format("{0:t} – {1:t}", this.$props.zonedStart, this.$props.zonedEnd);
|
|
107
|
+
},
|
|
108
|
+
inAllDayArea() {
|
|
109
|
+
var e;
|
|
110
|
+
return ((e = this.$props.range) == null ? void 0 : e.isAllDay) === !0;
|
|
107
111
|
}
|
|
108
112
|
},
|
|
109
113
|
data() {
|
|
@@ -135,10 +139,11 @@ const T = 1, x = 25, te = /* @__PURE__ */ A({
|
|
|
135
139
|
this.observer && this.observer.disconnect();
|
|
136
140
|
},
|
|
137
141
|
render() {
|
|
138
|
-
const e =
|
|
139
|
-
this.intl =
|
|
140
|
-
|
|
141
|
-
|
|
142
|
+
const e = _(this);
|
|
143
|
+
this.intl = U(this);
|
|
144
|
+
const t = this.inAllDayArea;
|
|
145
|
+
let o;
|
|
146
|
+
const l = i(B, {
|
|
142
147
|
ignoreIsAllDay: this.ignoreIsAllDay,
|
|
143
148
|
item: this.item,
|
|
144
149
|
uid: this.uid,
|
|
@@ -204,57 +209,61 @@ const T = 1, x = 25, te = /* @__PURE__ */ A({
|
|
|
204
209
|
onResizestartdrag: this.handleResizeStartDrag,
|
|
205
210
|
onResizerelease: this.handleResizeRelease
|
|
206
211
|
}, {
|
|
207
|
-
default: () => [!this.$props.resizeHint &&
|
|
212
|
+
default: () => [!this.$props.resizeHint && i(P, null, [this.$props.tail && !this.$props.vertical && i("span", {
|
|
208
213
|
class: "k-event-continuation"
|
|
209
|
-
}, [
|
|
214
|
+
}, [i(u, {
|
|
210
215
|
name: this.ks.isRtl ? "chevron-right" : "chevron-left",
|
|
211
|
-
icon: this.ks.isRtl ? k :
|
|
212
|
-
}, null)]),
|
|
216
|
+
icon: this.ks.isRtl ? k : A
|
|
217
|
+
}, null)]), i("div", {
|
|
213
218
|
title: this.itemTitle
|
|
214
|
-
}, [this.$props.tail && this.$props.vertical &&
|
|
219
|
+
}, [this.$props.tail && this.$props.vertical && i("span", {
|
|
215
220
|
class: "k-event-continuation"
|
|
216
|
-
}, [
|
|
221
|
+
}, [i(u, {
|
|
217
222
|
name: "chevron-up",
|
|
218
|
-
icon:
|
|
219
|
-
}, null)]),
|
|
223
|
+
icon: V
|
|
224
|
+
}, null)]), t && !this.$props.isAllDay && !this.$props.tail && i("span", {
|
|
225
|
+
class: "k-event-all-day-time"
|
|
226
|
+
}, [this.intl.toString(this.$props.zonedStart, "t")]), i(I, {
|
|
220
227
|
class: "k-event-title"
|
|
221
228
|
}, {
|
|
222
229
|
default: () => [this.$props.title]
|
|
223
|
-
}), !this.$props.isAllDay &&
|
|
230
|
+
}), t && !this.$props.isAllDay && !this.$props.head && i("span", {
|
|
231
|
+
class: "k-event-all-day-time"
|
|
232
|
+
}, [this.intl.toString(this.$props.zonedEnd, "t")]), !t && !this.$props.isAllDay && i(I, {
|
|
224
233
|
class: "k-event-time"
|
|
225
234
|
}, {
|
|
226
|
-
default: () => [this.$props.isRecurring && !this.$props.isException &&
|
|
235
|
+
default: () => [this.$props.isRecurring && !this.$props.isException && i("span", {
|
|
227
236
|
class: "k-event-recurrence-icon"
|
|
228
|
-
}, [
|
|
237
|
+
}, [i(u, {
|
|
229
238
|
name: "arrow-rotate-cw",
|
|
230
|
-
icon:
|
|
231
|
-
}, null)]), !this.$props.isRecurring && this.$props.isException &&
|
|
239
|
+
icon: E
|
|
240
|
+
}, null)]), !this.$props.isRecurring && this.$props.isException && i("span", {
|
|
232
241
|
class: "k-event-recurrence-icon"
|
|
233
|
-
}, [
|
|
242
|
+
}, [i(u, {
|
|
234
243
|
name: "arrows-no-repeat",
|
|
235
|
-
icon:
|
|
244
|
+
icon: F
|
|
236
245
|
}, null)]), this.formattedTime]
|
|
237
|
-
}), this.$props.head && this.$props.vertical &&
|
|
246
|
+
}), this.$props.head && this.$props.vertical && i("span", {
|
|
238
247
|
class: "k-event-continuation"
|
|
239
|
-
}, [
|
|
248
|
+
}, [i(u, {
|
|
240
249
|
name: "chevron-down",
|
|
241
|
-
icon:
|
|
242
|
-
}, null)])]), (this.$props.isRecurring && !this.$props.isException || !this.$props.isRecurring && this.$props.isException) &&
|
|
250
|
+
icon: q
|
|
251
|
+
}, null)])]), (this.$props.isRecurring && !this.$props.isException || !this.$props.isRecurring && this.$props.isException) && i("span", {
|
|
243
252
|
class: "k-event-recurrence-icon"
|
|
244
|
-
}, [
|
|
253
|
+
}, [i(u, {
|
|
245
254
|
name: this.$props.isRecurring ? "arrow-rotate-cw" : "arrows-no-repeat",
|
|
246
|
-
icon: this.$props.isRecurring ?
|
|
247
|
-
}, null)]), this.$props.head && !this.$props.vertical &&
|
|
255
|
+
icon: this.$props.isRecurring ? E : F
|
|
256
|
+
}, null)]), this.$props.head && !this.$props.vertical && i("span", {
|
|
248
257
|
class: "k-event-continuation"
|
|
249
|
-
}, [
|
|
258
|
+
}, [i(u, {
|
|
250
259
|
name: this.ks.isRtl ? "chevron-left" : "chevron-right",
|
|
251
|
-
icon: this.ks.isRtl ?
|
|
260
|
+
icon: this.ks.isRtl ? A : k
|
|
252
261
|
}, null)])])]
|
|
253
262
|
});
|
|
254
|
-
return
|
|
255
|
-
h:
|
|
263
|
+
return o = L.call(this, {
|
|
264
|
+
h: C,
|
|
256
265
|
template: this.$props.item,
|
|
257
|
-
defaultRendering:
|
|
266
|
+
defaultRendering: l,
|
|
258
267
|
defaultSlots: e,
|
|
259
268
|
additionalListeners: {
|
|
260
269
|
// keydown: this.handleKeyDown,
|
|
@@ -277,7 +286,7 @@ const T = 1, x = 25, te = /* @__PURE__ */ A({
|
|
|
277
286
|
resizestartdrag: this.handleResizeStartDrag,
|
|
278
287
|
resizerelease: this.handleResizeRelease
|
|
279
288
|
}
|
|
280
|
-
}),
|
|
289
|
+
}), o;
|
|
281
290
|
},
|
|
282
291
|
methods: {
|
|
283
292
|
getElement() {
|
|
@@ -353,12 +362,12 @@ const T = 1, x = 25, te = /* @__PURE__ */ A({
|
|
|
353
362
|
calculateMostSiblings(e, t) {
|
|
354
363
|
let o = 1;
|
|
355
364
|
return e.forEach((l) => {
|
|
356
|
-
const
|
|
357
|
-
|
|
365
|
+
const r = t.filter((s) => this.inSlot(l.cSlot, s.$props));
|
|
366
|
+
r.length > o && (o = r.length);
|
|
358
367
|
}), o;
|
|
359
368
|
},
|
|
360
369
|
getSiblingsInAllSlots(e, t) {
|
|
361
|
-
return e.map((l) => t.filter((
|
|
370
|
+
return e.map((l) => t.filter((r) => this.inSlot(l.cSlot, r.$props)));
|
|
362
371
|
},
|
|
363
372
|
inSlot(e, t) {
|
|
364
373
|
return y(e.start, e.end, t.start, t.end) && e.group.index === t.group.index && e.range.index === t.range.index && (e.range.isAllDay === void 0 || t.range.isAllDay === void 0 || e.range.isAllDay === t.range.isAllDay) && (this.$props.ignoreIsAllDay || e.isAllDay === t.isAllDay);
|
|
@@ -366,29 +375,29 @@ const T = 1, x = 25, te = /* @__PURE__ */ A({
|
|
|
366
375
|
align() {
|
|
367
376
|
if (!this.element)
|
|
368
377
|
return;
|
|
369
|
-
const e = (this.bv.slots || []).filter((
|
|
378
|
+
const e = (this.bv.slots || []).filter((s) => s && this.inSlot(s.cSlot, this.$props));
|
|
370
379
|
if (e.length === 0) {
|
|
371
380
|
this.display = !1;
|
|
372
381
|
return;
|
|
373
382
|
}
|
|
374
|
-
const t =
|
|
375
|
-
return
|
|
376
|
-
}));
|
|
377
|
-
if (!
|
|
383
|
+
const t = e.sort(function(s, c) {
|
|
384
|
+
return s.cSlot.start && c.cSlot.start ? s.cSlot.start.getTime() - c.cSlot.start.getTime() : !0;
|
|
385
|
+
}), o = this.inAllDayArea && this.ks.isRtl ? j(t) : K(t);
|
|
386
|
+
if (!o)
|
|
378
387
|
return;
|
|
379
|
-
const
|
|
380
|
-
if (
|
|
381
|
-
const
|
|
382
|
-
let
|
|
383
|
-
if (
|
|
384
|
-
|
|
385
|
-
else if (
|
|
386
|
-
const
|
|
387
|
-
|
|
388
|
+
const l = S(o.$el), r = o.$el;
|
|
389
|
+
if (r && !this.$props.vertical) {
|
|
390
|
+
const s = r.querySelector(".k-nav-day");
|
|
391
|
+
let c = 0;
|
|
392
|
+
if (s)
|
|
393
|
+
c = s.offsetTop + parseFloat(window.getComputedStyle(s).lineHeight || "0");
|
|
394
|
+
else if (r.firstElementChild) {
|
|
395
|
+
const p = window.getComputedStyle(r), n = parseFloat(p.paddingTop || "0"), d = parseFloat(p.lineHeight || "0");
|
|
396
|
+
d > 0 && (c = n + d);
|
|
388
397
|
}
|
|
389
|
-
|
|
398
|
+
l.top += c, (this.$props.dragHint || this.$props.resizeHint) && (l.height -= c);
|
|
390
399
|
}
|
|
391
|
-
|
|
400
|
+
D(this.element, l);
|
|
392
401
|
},
|
|
393
402
|
position() {
|
|
394
403
|
var b, z;
|
|
@@ -398,27 +407,27 @@ const T = 1, x = 25, te = /* @__PURE__ */ A({
|
|
|
398
407
|
(this.bv.items || []).forEach((a) => {
|
|
399
408
|
a && (a.$props.dragHint ? o.push(a) : a.$props.resizeHint ? l.push(a) : t.push(a));
|
|
400
409
|
});
|
|
401
|
-
const
|
|
402
|
-
let
|
|
403
|
-
const
|
|
404
|
-
let
|
|
405
|
-
const
|
|
406
|
-
if (
|
|
407
|
-
let
|
|
410
|
+
const r = this.$props.dragHint || this.$props.resizeHint ? N(this, this.$props.dragHint ? o : l, e, this.$props.ignoreIsAllDay) : this.$props.order || 0;
|
|
411
|
+
let s = this.$props.dragHint || this.$props.resizeHint ? this.calculateMostSiblings(e, this.$props.dragHint ? o : l) : this.calculateMostSiblings(e, t);
|
|
412
|
+
const c = this.getSiblingsInAllSlots(e, t);
|
|
413
|
+
let p = 0;
|
|
414
|
+
const n = S(this.element), d = (b = this.$props.itemStyle) == null ? void 0 : b.height, $ = typeof d == "number" ? d : parseFloat(d), R = !this.$props.vertical && (d == null || !Number.isNaN($));
|
|
415
|
+
if (c.forEach((a) => {
|
|
416
|
+
let f = 0;
|
|
408
417
|
a.sort(function(h, g) {
|
|
409
418
|
return h.$props.order - g.$props.order;
|
|
410
419
|
}).forEach((h) => {
|
|
411
|
-
if (y(h.$props.start, h.$props.end, this.$props.start, this.$props.end) && !(this.$props.dragHint || this.$props.resizeHint) && h.$props.maxSiblingsPerSlot && h.$props.maxSiblingsPerSlot >
|
|
420
|
+
if (y(h.$props.start, h.$props.end, this.$props.start, this.$props.end) && !(this.$props.dragHint || this.$props.resizeHint) && h.$props.maxSiblingsPerSlot && h.$props.maxSiblingsPerSlot > s && h.getElement() !== this.element && (s = h.$props.maxSiblingsPerSlot), !R) {
|
|
412
421
|
const g = S(h.getElement());
|
|
413
|
-
h.$props.order !== null && h.$props.order <
|
|
422
|
+
h.$props.order !== null && h.$props.order < r && (f = (g.top || n.top) + g.height - n.top - m * r + v);
|
|
414
423
|
}
|
|
415
|
-
}),
|
|
416
|
-
}),
|
|
424
|
+
}), f > p && (p = f);
|
|
425
|
+
}), R && (p = r * ((Number.isNaN($) ? H : $) + v)), e.length === 0) {
|
|
417
426
|
this.display = !1;
|
|
418
427
|
return;
|
|
419
428
|
}
|
|
420
|
-
const
|
|
421
|
-
|
|
429
|
+
const T = 20, x = ((z = this.$props.itemStyle) == null ? void 0 : z.height) || H, O = this.inAllDayArea ? v : 0;
|
|
430
|
+
n.width = this.$props.vertical ? n.width / s - m - T / s : n.width * e.length - m - O, this.$props.vertical ? n.height = n.height * e.length - m : (this.$props.resizeHint || this.$props.dragHint) && s <= 1 || (n.height = x), n.left = this.$props.vertical ? n.left + r * n.width + m * r : n.left, n.top = this.$props.vertical ? n.top : n.top + p + m * r, this.maxSiblingsPerSlot = s, this._order = r, D(this.element, n), this.visible = !0, this.display = !0;
|
|
422
431
|
},
|
|
423
432
|
handleResize() {
|
|
424
433
|
this.timeout !== void 0 && window.cancelAnimationFrame(this.timeout), this.timeout = window.requestAnimationFrame(() => {
|
|
@@ -428,5 +437,5 @@ const T = 1, x = 25, te = /* @__PURE__ */ A({
|
|
|
428
437
|
}
|
|
429
438
|
});
|
|
430
439
|
export {
|
|
431
|
-
|
|
440
|
+
se as SchedulerViewItem
|
|
432
441
|
};
|
|
@@ -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 u=require("@progress/kendo-vue-common"),p=require("../../constants/main.js"),
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("@progress/kendo-vue-common"),S=require("@progress/kendo-date-math"),p=require("../../constants/main.js"),e=require("../../utils/main.js");let l=(function(s){return s.set="DRAG_ITEM_SET",s.start="DRAG_ITEM_START",s.drag="DRAG_ITEM_DRAG",s.complete="DRAG_ITEM_COMPLETE",s.completeOccurrence="DRAG_ITEM_COMPLETE_OCCURRENCE",s.completeSeries="DRAG_ITEM_COMPLETE_SERIES",s.reset="DRAG_ITEM_RESET",s.dragSelected="DRAG_ITEM_DRAG_SELECTED",s})({}),A=0,E=0,I=0,y=0,g=null,k=!1;const b=(s,r)=>e.toUTCDateTime(S.ZonedDate.fromLocalDate(new Date(s),r)).getTime(),T=(s,r)=>S.ZonedDate.fromUTCDate(new Date(b(s,r)-E),r).toLocalDate(),F=function(s){const r=u.clone(this.dataItem);switch(s.type){case l.set:{this.currentDragItem=s.payload;break}case l.reset:{this.currentDragItem=null;break}case l.dragSelected:{if(Math.abs(I-s.payload.x)<10&&Math.abs(y-s.payload.y)<10)return;const t=e.slotDive(s.payload.x,s.payload.y,7);if(!t||t===g)return;const a=t.getAttribute("data-slot-start"),i=t.getAttribute("data-slot-allday")==="true";if(!this.ignoreIsAllDay&&i!==this.isAllDay||k&&!i)return;const n=new Date(e.getField(r,this.ks.fields.start)),h=(e.isTimedItemOnDaySlot(this,t)?T(Number(a),this.ks.timezone):new Date(Number(a))).getTime()-n.getTime(),f=this.bv.selectedItems.map(d=>{if(!d)return null;const c=u.clone(d.$props.dataItem),D=new Date(d.$props.start.getTime()+h),o=new Date(d.$props.end.getTime()+h);return e.setField(c,this.ks.fields.start,D),e.setField(c,this.ks.fields.end,o),c}).filter(Boolean);g=t,this.currentDragItem=[...f];break}case l.start:{const t=s.payload.x,a=s.payload.y;I=t,y=a;const i=e.slotDive(t,a,7);if(!i)return;const n=i.getAttribute("data-slot-start"),m=e.getField(r,this.ks.fields.start);if(n===null)return;k=i.getAttribute("data-slot-allday")==="true",A=Number(n)-new Date(m).getTime(),e.isTimedItemOnDaySlot(this,i)&&(E=b(Number(n),this.ks.timezone)-b(new Date(m).getTime(),this.ks.timezone));break}case l.drag:{if(Math.abs(I-s.payload.x)<10&&Math.abs(y-s.payload.y)<10)return;const t=e.slotDive(s.payload.x,s.payload.y,7);if(!t||t===g)return;const a=t.getAttribute("data-slot-start"),i=t.getAttribute("data-slot-group"),n=t.getAttribute("data-slot-allday")==="true";if(!this.ignoreIsAllDay&&n!==this.isAllDay||k&&!n)return;const m=new Date(e.getField(r,this.ks.fields.start)),f=new Date(e.getField(r,this.ks.fields.end)).getTime()-m.getTime(),d=e.isTimedItemOnDaySlot(this,t)?T(Number(a),this.ks.timezone):new Date(Number(a)-Number(A)),c=new Date(d.getTime()+f),D=this.ks.groups.find(o=>o.index===Number(i));e.setField(r,this.ks.fields.start,d),e.setField(r,this.ks.fields.end,c),D&&this.ks.groups.length>1&&D.resources.forEach(o=>{o.multiple||e.setField(r,o.field,o[o.valueField])}),g=t,r&&(this.currentDragItem=r);break}case l.complete:{const t=this.compDragItem;this.currentDragItem=null,t&&e.emitDataAction(this,{type:p.DATA_ACTION.update,series:!1,dataItem:t});break}case l.completeOccurrence:{const t=Array.isArray(this.compDragItem)?this.compDragItem.slice():u.clone(this.compDragItem),a=this.compDragItem;this.currentDragItem=null,a&&e.emitDataAction(this,{type:p.DATA_ACTION.update,series:!1,dataItem:t});break}case l.completeSeries:{let t;if(Array.isArray(this.compDragItem))t=this.compDragItem.map(a=>{const i=u.clone(a);return e.setField(i,this.ks.fields.start,e.getField(a,this.ks.fields.start)),e.setField(i,this.ks.fields.end,e.getField(a,this.ks.fields.end)),i});else{const a=u.clone(this.compDragItem);e.setField(a,this.ks.fields.start,e.getField(this.compDragItem,this.ks.fields.start)),e.setField(a,this.ks.fields.end,e.getField(this.compDragItem,this.ks.fields.end)),t=a}this.currentDragItem=null,t&&e.emitDataAction(this,{type:p.DATA_ACTION.update,series:!0,dataItem:t});break}default:this.currentDragItem=this.compDragItem;break}this.$emit("dragitemchange",this.currentDragItem)};exports.DRAG_ITEM_ACTION=l;exports.useDragItem=F;
|
|
@@ -6,98 +6,99 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import { clone as h } from "@progress/kendo-vue-common";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
9
|
+
import { ZonedDate as x } from "@progress/kendo-date-math";
|
|
10
|
+
import { DATA_ACTION as y } from "../../constants/main.mjs";
|
|
11
|
+
import { setField as i, getField as o, emitDataAction as I, slotDive as k, isTimedItemOnDaySlot as b, toUTCDateTime as L } from "../../utils/main.mjs";
|
|
12
|
+
let m = /* @__PURE__ */ (function(e) {
|
|
12
13
|
return e.set = "DRAG_ITEM_SET", e.start = "DRAG_ITEM_START", e.drag = "DRAG_ITEM_DRAG", e.complete = "DRAG_ITEM_COMPLETE", e.completeOccurrence = "DRAG_ITEM_COMPLETE_OCCURRENCE", e.completeSeries = "DRAG_ITEM_COMPLETE_SERIES", e.reset = "DRAG_ITEM_RESET", e.dragSelected = "DRAG_ITEM_DRAG_SELECTED", e;
|
|
13
|
-
})({}),
|
|
14
|
-
const R = function(e) {
|
|
15
|
-
const
|
|
14
|
+
})({}), w = 0, M = 0, E = 0, S = 0, f = null, A = !1;
|
|
15
|
+
const T = (e, a) => L(x.fromLocalDate(new Date(e), a)).getTime(), R = (e, a) => x.fromUTCDate(new Date(T(e, a) - M), a).toLocalDate(), z = function(e) {
|
|
16
|
+
const a = h(this.dataItem);
|
|
16
17
|
switch (e.type) {
|
|
17
|
-
case
|
|
18
|
+
case m.set: {
|
|
18
19
|
this.currentDragItem = e.payload;
|
|
19
20
|
break;
|
|
20
21
|
}
|
|
21
|
-
case
|
|
22
|
+
case m.reset: {
|
|
22
23
|
this.currentDragItem = null;
|
|
23
24
|
break;
|
|
24
25
|
}
|
|
25
|
-
case
|
|
26
|
-
if (Math.abs(
|
|
26
|
+
case m.dragSelected: {
|
|
27
|
+
if (Math.abs(E - e.payload.x) < 10 && Math.abs(S - e.payload.y) < 10)
|
|
27
28
|
return;
|
|
28
|
-
const t =
|
|
29
|
+
const t = k(e.payload.x, e.payload.y, 7);
|
|
29
30
|
if (!t || t === f)
|
|
30
31
|
return;
|
|
31
|
-
const s = t.getAttribute("data-slot-start"),
|
|
32
|
-
if (!this.ignoreIsAllDay &&
|
|
32
|
+
const s = t.getAttribute("data-slot-start"), r = t.getAttribute("data-slot-allday") === "true";
|
|
33
|
+
if (!this.ignoreIsAllDay && r !== this.isAllDay || A && !r)
|
|
33
34
|
return;
|
|
34
|
-
const
|
|
35
|
-
if (!
|
|
35
|
+
const l = new Date(o(a, this.ks.fields.start)), p = (b(this, t) ? R(Number(s), this.ks.timezone) : new Date(Number(s))).getTime() - l.getTime(), g = this.bv.selectedItems.map((d) => {
|
|
36
|
+
if (!d)
|
|
36
37
|
return null;
|
|
37
|
-
const u = h(
|
|
38
|
-
return i(u, this.ks.fields.start,
|
|
38
|
+
const u = h(d.$props.dataItem), D = new Date(d.$props.start.getTime() + p), n = new Date(d.$props.end.getTime() + p);
|
|
39
|
+
return i(u, this.ks.fields.start, D), i(u, this.ks.fields.end, n), u;
|
|
39
40
|
}).filter(Boolean);
|
|
40
|
-
f = t, this.currentDragItem = [...
|
|
41
|
+
f = t, this.currentDragItem = [...g];
|
|
41
42
|
break;
|
|
42
43
|
}
|
|
43
|
-
case
|
|
44
|
+
case m.start: {
|
|
44
45
|
const t = e.payload.x, s = e.payload.y;
|
|
45
|
-
|
|
46
|
-
const
|
|
47
|
-
if (!
|
|
46
|
+
E = t, S = s;
|
|
47
|
+
const r = k(t, s, 7);
|
|
48
|
+
if (!r)
|
|
48
49
|
return;
|
|
49
|
-
const
|
|
50
|
-
if (
|
|
50
|
+
const l = r.getAttribute("data-slot-start"), c = o(a, this.ks.fields.start);
|
|
51
|
+
if (l === null)
|
|
51
52
|
return;
|
|
52
|
-
|
|
53
|
+
A = r.getAttribute("data-slot-allday") === "true", w = Number(l) - new Date(c).getTime(), b(this, r) && (M = T(Number(l), this.ks.timezone) - T(new Date(c).getTime(), this.ks.timezone));
|
|
53
54
|
break;
|
|
54
55
|
}
|
|
55
|
-
case
|
|
56
|
-
if (Math.abs(
|
|
56
|
+
case m.drag: {
|
|
57
|
+
if (Math.abs(E - e.payload.x) < 10 && Math.abs(S - e.payload.y) < 10)
|
|
57
58
|
return;
|
|
58
|
-
const t =
|
|
59
|
+
const t = k(e.payload.x, e.payload.y, 7);
|
|
59
60
|
if (!t || t === f)
|
|
60
61
|
return;
|
|
61
|
-
const s = t.getAttribute("data-slot-start"),
|
|
62
|
-
if (!this.ignoreIsAllDay &&
|
|
62
|
+
const s = t.getAttribute("data-slot-start"), r = t.getAttribute("data-slot-group"), l = t.getAttribute("data-slot-allday") === "true";
|
|
63
|
+
if (!this.ignoreIsAllDay && l !== this.isAllDay || A && !l)
|
|
63
64
|
return;
|
|
64
|
-
const
|
|
65
|
-
i(
|
|
66
|
-
|
|
67
|
-
}), f = t,
|
|
65
|
+
const c = new Date(o(a, this.ks.fields.start)), g = new Date(o(a, this.ks.fields.end)).getTime() - c.getTime(), d = b(this, t) ? R(Number(s), this.ks.timezone) : new Date(Number(s) - Number(w)), u = new Date(d.getTime() + g), D = this.ks.groups.find((n) => n.index === Number(r));
|
|
66
|
+
i(a, this.ks.fields.start, d), i(a, this.ks.fields.end, u), D && this.ks.groups.length > 1 && D.resources.forEach((n) => {
|
|
67
|
+
n.multiple || i(a, n.field, n[n.valueField]);
|
|
68
|
+
}), f = t, a && (this.currentDragItem = a);
|
|
68
69
|
break;
|
|
69
70
|
}
|
|
70
|
-
case
|
|
71
|
+
case m.complete: {
|
|
71
72
|
const t = this.compDragItem;
|
|
72
|
-
this.currentDragItem = null, t && this
|
|
73
|
-
type:
|
|
73
|
+
this.currentDragItem = null, t && I(this, {
|
|
74
|
+
type: y.update,
|
|
74
75
|
series: !1,
|
|
75
76
|
dataItem: t
|
|
76
77
|
});
|
|
77
78
|
break;
|
|
78
79
|
}
|
|
79
|
-
case
|
|
80
|
+
case m.completeOccurrence: {
|
|
80
81
|
const t = Array.isArray(this.compDragItem) ? this.compDragItem.slice() : h(this.compDragItem), s = this.compDragItem;
|
|
81
|
-
this.currentDragItem = null, s && this
|
|
82
|
-
type:
|
|
82
|
+
this.currentDragItem = null, s && I(this, {
|
|
83
|
+
type: y.update,
|
|
83
84
|
series: !1,
|
|
84
85
|
dataItem: t
|
|
85
86
|
});
|
|
86
87
|
break;
|
|
87
88
|
}
|
|
88
|
-
case
|
|
89
|
+
case m.completeSeries: {
|
|
89
90
|
let t;
|
|
90
91
|
if (Array.isArray(this.compDragItem))
|
|
91
92
|
t = this.compDragItem.map((s) => {
|
|
92
|
-
const
|
|
93
|
-
return i(
|
|
93
|
+
const r = h(s);
|
|
94
|
+
return i(r, this.ks.fields.start, o(s, this.ks.fields.start)), i(r, this.ks.fields.end, o(s, this.ks.fields.end)), r;
|
|
94
95
|
});
|
|
95
96
|
else {
|
|
96
97
|
const s = h(this.compDragItem);
|
|
97
|
-
i(s, this.ks.fields.start,
|
|
98
|
+
i(s, this.ks.fields.start, o(this.compDragItem, this.ks.fields.start)), i(s, this.ks.fields.end, o(this.compDragItem, this.ks.fields.end)), t = s;
|
|
98
99
|
}
|
|
99
|
-
this.currentDragItem = null, t && this
|
|
100
|
-
type:
|
|
100
|
+
this.currentDragItem = null, t && I(this, {
|
|
101
|
+
type: y.update,
|
|
101
102
|
series: !0,
|
|
102
103
|
dataItem: t
|
|
103
104
|
});
|
|
@@ -110,6 +111,6 @@ const R = function(e) {
|
|
|
110
111
|
this.$emit("dragitemchange", this.currentDragItem);
|
|
111
112
|
};
|
|
112
113
|
export {
|
|
113
|
-
|
|
114
|
-
|
|
114
|
+
m as DRAG_ITEM_ACTION,
|
|
115
|
+
z as useDragItem
|
|
115
116
|
};
|
|
@@ -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 c=require("@progress/kendo-vue-common"),
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("@progress/kendo-vue-common"),I=require("@progress/kendo-date-math"),k=require("../../constants/main.js"),e=require("../../utils/main.js");let o=(function(t){return t.set="RESIZE_ITEM_SET",t.start="RESIZE_ITEM_START",t.startDrag="RESIZE_ITEM_START_DRAG",t.startDragSelected="RESIZE_ITEM_START_DRAG_SELECTED",t.endDrag="RESIZE_ITEM_END_DRAG",t.endDragSelected="RESIZE_ITEM_END_DRAG_SELECTED",t.complete="RESIZE_ITEM_COMPLETE",t.completeOccurrence="RESIZE_ITEM_COMPLETE_OCCURRENCE",t.completeSeries="RESIZE_ITEM_COMPLETE_SERIES",t.reset="RESIZE_ITEM_RESET",t})({});const E=(t,d,l)=>{const n=new Date(Number(d.getAttribute("data-slot-start")));if(!e.isTimedItemOnDaySlot(t,d))return n;const i=t.ks.timezone,s=I.ZonedDate.fromLocalDate(n,i),a=I.ZonedDate.fromLocalDate(l,i),r=Date.UTC(s.getFullYear(),s.getMonth(),s.getDate(),a.getHours(),a.getMinutes(),a.getSeconds(),a.getMilliseconds());return I.ZonedDate.fromUTCDate(new Date(r),i).toLocalDate()};let m=null;const y=function(t,d){let l=this.compResizeItem;switch(t.type){case o.set:l=t.payload;break;case o.reset:l=null;break;case o.start:{d.stopPropagation(),d.preventDefault();const n=t.payload.x,i=t.payload.y,s=e.slotDive(n,i,7);if(!s||s===m)return;const a=c.clone(this.dataItem),r=E(this,s,e.getField(a,this.ks.fields.start));if(r>=e.getField(a,this.ks.fields.end))return;e.setField(a,this.ks.fields.start,r),m=s,l=a;break}case o.startDragSelected:{d.stopPropagation(),d.preventDefault();const n=t.payload.x,i=t.payload.y,s=c.clone(this.dataItem),a=e.slotDive(n,i,7);if(!a||a===m)return;const r=new Date(e.getField(s,this.ks.fields.start)),S=E(this,a,r).getTime()-r.getTime();let h=!1;const g=this.bv.selectedItems.map(D=>{if(!D)return null;const u=c.clone(D.$props.dataItem),p=new Date(D.$props.start.getTime()+S);if(p>=e.getField(u,this.ks.fields.end)){h=!0;return}return e.setField(u,this.ks.fields.start,p),u}).filter(Boolean);h||(l=[...g]);break}case o.startDrag:{const n=t.payload.x,i=t.payload.y,s=e.slotDive(n,i,7);if(!s||s===m)return;const a=c.clone(this.dataItem),r=E(this,s,e.getField(a,this.ks.fields.start));if(r>=a.end)return;e.setField(a,this.ks.fields.start,r),m=s,l=a;break}case o.endDrag:{const n=t.payload.x,i=t.payload.y,s=e.slotDive(n,i,7);if(!s||s===m)return;const a=s.getAttribute("data-slot-end"),r=new Date(Number(a)),f=c.clone(this.dataItem);if(r<=f.start)return;e.setField(f,this.ks.fields.end,r),m=s,l=f;break}case o.endDragSelected:{d.stopPropagation(),d.preventDefault();const n=t.payload.x,i=t.payload.y,s=c.clone(this.dataItem),a=e.slotDive(n,i,7);if(!a||a===m)return;const r=a.getAttribute(e.isTimedItemOnDaySlot(this,a)?"data-slot-end":"data-slot-start"),f=new Date(e.getField(s,this.ks.fields.end)),h=new Date(Number(r)).getTime()-f.getTime();let g;const D=this.bv.selectedItems.map(u=>{if(!u)return null;const p=c.clone(u.$props.dataItem),R=new Date(u.$props.end.getTime()+h);if(R<=e.getField(p,this.ks.fields.start)){g=!0;return}return e.setField(p,this.ks.fields.end,R),p}).filter(Boolean);g||(l=[...D]);break}case o.complete:{l=null,this.compResizeItem&&e.emitDataAction(this,{type:k.DATA_ACTION.update,series:!1,dataItem:this.compResizeItem});break}case o.completeOccurrence:{l=null,this.compResizeItem&&e.emitDataAction(this,{type:k.DATA_ACTION.update,series:!1,dataItem:this.compResizeItem});break}case o.completeSeries:{l=null;let n;if(Array.isArray(this.compResizeItem))n=this.compResizeItem.map(i=>{const s=c.clone(i);return e.setField(s,this.ks.fields.start,e.getField(i,this.ks.fields.start)),e.setField(s,this.ks.fields.end,e.getField(i,this.ks.fields.end)),s});else{const i=c.clone(this.compResizeItem);e.setField(i,this.ks.fields.start,e.getField(this.compResizeItem,this.ks.fields.start)),e.setField(i,this.ks.fields.end,e.getField(this.compResizeItem,this.ks.fields.end)),n=i}n&&e.emitDataAction(this,{type:k.DATA_ACTION.update,series:!0,dataItem:n});break}default:l=null;break}this.currentResizeItem=l,this.$emit("resizeitemchange",l)};exports.RESIZE_ITEM_ACTION=o;exports.useResizeItem=y;
|