@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
package/Scheduler.mjs
CHANGED
|
@@ -5,48 +5,49 @@
|
|
|
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 { findMaster as
|
|
10
|
-
import { canUseDOM as
|
|
11
|
-
import { SchedulerHeader as
|
|
12
|
-
import { provideIntlService as
|
|
13
|
-
import { ZonedDate as
|
|
14
|
-
import { SchedulerFooter as
|
|
15
|
-
import { Button as V, ButtonGroup as
|
|
16
|
-
import { NavigationDatePicker as
|
|
17
|
-
import { ViewSelectorList as
|
|
18
|
-
import { BusinessHours as
|
|
19
|
-
import { today as
|
|
8
|
+
import { defineComponent as ue, createVNode as u, markRaw as pe, toRaw as M, h as $, isVNode as me } from "vue";
|
|
9
|
+
import { findMaster as b, setField as h, getField as s, findSeriesExceptions as W, toStandaloneEvent as A, getSeriesMasterId as fe, toSchedulerGroups as we, getModelFields as L } from "./utils/main.mjs";
|
|
10
|
+
import { canUseDOM as O, clone as w, validatePackage as ke, shouldShowValidationUI as ge, getLicenseMessage as ve, templateRendering as g, getListeners as H, getTemplate as j, WatermarkOverlay as be, isRtl as De } from "@progress/kendo-vue-common";
|
|
11
|
+
import { SchedulerHeader as Se } from "./components/header/SchedulerHeader.mjs";
|
|
12
|
+
import { provideIntlService as z, provideLocalizationService as Ie } from "@progress/kendo-vue-intl";
|
|
13
|
+
import { ZonedDate as Ce, addMonths as B, addDays as _ } from "@progress/kendo-date-math";
|
|
14
|
+
import { SchedulerFooter as Ee } from "./components/footer/SchedulerFooter.mjs";
|
|
15
|
+
import { Button as V, ButtonGroup as Ve, ToolbarSpacer as U } from "@progress/kendo-vue-buttons";
|
|
16
|
+
import { NavigationDatePicker as ye } from "./components/header/navigation/NavigationDatePicker.mjs";
|
|
17
|
+
import { ViewSelectorList as Re } from "./components/header/view-selector/ViewSelectorList.mjs";
|
|
18
|
+
import { BusinessHours as $e } from "./components/footer/bussiness-hours/BusinessHours.mjs";
|
|
19
|
+
import { today as q, messages as E, previousTitle as K, nextTitle as Y, newEvent as G, newEventLabel as Q, toolbarLabel as Z } from "./messages/main.mjs";
|
|
20
20
|
import { packageMetadata as x } from "./package-metadata.mjs";
|
|
21
|
-
import { AgendaView as
|
|
22
|
-
import { TimelineView as
|
|
23
|
-
import { DayView as
|
|
24
|
-
import { WeekView as
|
|
25
|
-
import { WorkWeekView as
|
|
26
|
-
import { MonthView as
|
|
27
|
-
import { DATA_ACTION as
|
|
28
|
-
import { plusIcon as
|
|
29
|
-
import { SchedulerForm as
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
|
|
33
|
-
|
|
21
|
+
import { AgendaView as Oe } from "./views/agenda/AgendaView.mjs";
|
|
22
|
+
import { TimelineView as xe } from "./views/time/TimelineView.mjs";
|
|
23
|
+
import { DayView as R } from "./views/day/DayView.mjs";
|
|
24
|
+
import { WeekView as Te } from "./views/week/WeekView.mjs";
|
|
25
|
+
import { WorkWeekView as Fe } from "./views/week/WorkWeekView.mjs";
|
|
26
|
+
import { MonthView as Ne } from "./views/month/MonthView.mjs";
|
|
27
|
+
import { DATA_ACTION as T } from "./constants/main.mjs";
|
|
28
|
+
import { plusIcon as Pe, chevronRightIcon as J, chevronLeftIcon as X } from "@progress/kendo-svg-icons";
|
|
29
|
+
import { SchedulerForm as Me } from "./components/SchedulerForm.mjs";
|
|
30
|
+
import { POPOVER_COORDINATOR_KEY as We, createPopoverCoordinator as Ae } from "./hooks/useExclusivePopover.mjs";
|
|
31
|
+
import { parseRule as Le, serializeRule as He } from "@progress/kendo-recurrence";
|
|
32
|
+
import { useEditable as je } from "./hooks/useEditable.mjs";
|
|
33
|
+
function ee(e) {
|
|
34
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !me(e);
|
|
34
35
|
}
|
|
35
|
-
const
|
|
36
|
-
const i = Math.round(
|
|
36
|
+
const te = "{0:D}", se = "{0:d}", ie = (e, t) => {
|
|
37
|
+
const i = Math.round(t / 864e5), a = Le({
|
|
37
38
|
recurrenceRule: e
|
|
38
39
|
});
|
|
39
|
-
if (i % 7 === 0 || (
|
|
40
|
+
if (i % 7 === 0 || (a == null ? void 0 : a.freq) !== "weekly" || !a.byWeekDay)
|
|
40
41
|
return e;
|
|
41
|
-
const
|
|
42
|
-
...
|
|
43
|
-
byWeekDay:
|
|
44
|
-
...
|
|
45
|
-
day: (
|
|
42
|
+
const n = He({
|
|
43
|
+
...a,
|
|
44
|
+
byWeekDay: a.byWeekDay.map((l) => ({
|
|
45
|
+
...l,
|
|
46
|
+
day: (l.day + i + 7) % 7
|
|
46
47
|
}))
|
|
47
48
|
});
|
|
48
|
-
return e.toUpperCase().includes("WKST=") ?
|
|
49
|
-
},
|
|
49
|
+
return e.toUpperCase().includes("WKST=") ? n : n.replace(";WKST=SU", "");
|
|
50
|
+
}, pt = /* @__PURE__ */ ue({
|
|
50
51
|
name: "KendoScheduler",
|
|
51
52
|
emits: ["datechange", "viewchange", "datachange", "itemclick", "itemdoubleclick", "slotclick", "slotdoubleclick", "taskclick", "taskdoubleclick"],
|
|
52
53
|
props: {
|
|
@@ -78,6 +79,14 @@ const J = "{0:D}", Q = "{0:d}", X = (e, s) => {
|
|
|
78
79
|
type: Number,
|
|
79
80
|
default: -1
|
|
80
81
|
},
|
|
82
|
+
eventOverview: {
|
|
83
|
+
type: Boolean,
|
|
84
|
+
default: !0
|
|
85
|
+
},
|
|
86
|
+
quickCreate: {
|
|
87
|
+
type: Boolean,
|
|
88
|
+
default: !0
|
|
89
|
+
},
|
|
81
90
|
editable: {
|
|
82
91
|
type: [Boolean, Object],
|
|
83
92
|
default: !1
|
|
@@ -104,6 +113,7 @@ const J = "{0:D}", Q = "{0:d}", X = (e, s) => {
|
|
|
104
113
|
viewItem: [String, Function, Object],
|
|
105
114
|
task: [String, Function, Object],
|
|
106
115
|
form: [String, Function, Object],
|
|
116
|
+
quickCreateForm: [String, Function, Object],
|
|
107
117
|
resizeHint: [String, Function, Object],
|
|
108
118
|
editItem: [String, Function, Object],
|
|
109
119
|
viewTask: [String, Function, Object],
|
|
@@ -133,16 +143,15 @@ const J = "{0:D}", Q = "{0:d}", X = (e, s) => {
|
|
|
133
143
|
return {
|
|
134
144
|
"k-rtl": this.isRtl,
|
|
135
145
|
"k-scheduler": !0,
|
|
136
|
-
"k-scheduler-mobile": this.isMobile,
|
|
137
146
|
[this.$props.className]: !!this.$props.className
|
|
138
147
|
};
|
|
139
148
|
},
|
|
140
149
|
fields() {
|
|
141
|
-
return
|
|
150
|
+
return L(this.$props.modelFields).fields;
|
|
142
151
|
}
|
|
143
152
|
},
|
|
144
153
|
mounted() {
|
|
145
|
-
this.currentRtl =
|
|
154
|
+
this.currentRtl = De(this.$el), this.calculateMedia(), this.$props.adaptive && O && window.ResizeObserver && (this.resizeObserver = new window.ResizeObserver(this.calculateMedia), this.resizeObserver.observe(this.$el)), O && window.ResizeObserver && (this.toolbarObserver = new window.ResizeObserver(this.measureToolbar), this.toolbarElement && (this.toolbarObserver.observe(this.toolbarElement), this.measureToolbar()));
|
|
146
155
|
},
|
|
147
156
|
unmounted() {
|
|
148
157
|
this.resizeObserver && this.resizeObserver.disconnect(), this.toolbarObserver && this.toolbarObserver.disconnect();
|
|
@@ -151,6 +160,10 @@ const J = "{0:D}", Q = "{0:d}", X = (e, s) => {
|
|
|
151
160
|
return {
|
|
152
161
|
ks: this.ks,
|
|
153
162
|
ksMobile: () => this.isMobile,
|
|
163
|
+
ksEventOverview: () => this.$props.eventOverview,
|
|
164
|
+
ksQuickCreate: () => this.$props.quickCreate,
|
|
165
|
+
ksQuickCreateForm: () => g.call(this, M(this.$props.quickCreateForm), {}),
|
|
166
|
+
[We]: Ae(),
|
|
154
167
|
setActiveViewName: this.handleActiveViewNameChange,
|
|
155
168
|
setActiveDate: this.handleDateChange,
|
|
156
169
|
itemDoubleClick: this.handleItemDoubleClick,
|
|
@@ -172,13 +185,13 @@ const J = "{0:D}", Q = "{0:d}", X = (e, s) => {
|
|
|
172
185
|
}
|
|
173
186
|
},
|
|
174
187
|
data() {
|
|
175
|
-
const e =
|
|
188
|
+
const e = z(this), t = this.$props.date || this.$props.defaultDate, i = this.$props.view || this.$props.defaultView || this.views[0] && this.views[0].name || "day", a = this.views.find((o) => o.name === i) || this.views[0] || u(R, null, null), n = this.getViewPropValue(a, "selectedDateFormat", i) || te, l = this.getViewPropValue(a, "selectedShortDateFormat", i) || se, r = this.getViewComponentByName(i).props.dateRange.default()({
|
|
176
189
|
intl: e,
|
|
177
|
-
date:
|
|
190
|
+
date: t,
|
|
178
191
|
timezone: this.$props.timezone,
|
|
179
|
-
numberOfDays: this.getViewPropValue(
|
|
180
|
-
workWeekStart: this.getViewPropValue(
|
|
181
|
-
workWeekEnd: this.getViewPropValue(
|
|
192
|
+
numberOfDays: this.getViewPropValue(a, "numberOfDays", i),
|
|
193
|
+
workWeekStart: this.getViewPropValue(a, "workWeekStart", i) || e.firstDay(),
|
|
194
|
+
workWeekEnd: this.getViewPropValue(a, "workWeekEnd", i) || (e.firstDay() + this.getViewPropValue(a, "numberOfDays", i)) % 6
|
|
182
195
|
});
|
|
183
196
|
return {
|
|
184
197
|
media: "desktop",
|
|
@@ -187,20 +200,21 @@ const J = "{0:D}", Q = "{0:d}", X = (e, s) => {
|
|
|
187
200
|
newEventDialogItem: null,
|
|
188
201
|
ks: {
|
|
189
202
|
activeViewName: i,
|
|
190
|
-
currentDate:
|
|
191
|
-
showWorkHours:
|
|
203
|
+
currentDate: t,
|
|
204
|
+
showWorkHours: a.showWorkHours !== void 0 ? a.showWorkHours : !0,
|
|
192
205
|
timezone: this.$props.timezone,
|
|
206
|
+
isRtl: this.$props.rtl,
|
|
193
207
|
props: {
|
|
194
208
|
...this.$props
|
|
195
209
|
},
|
|
196
210
|
views: this.views,
|
|
197
|
-
view:
|
|
198
|
-
fields:
|
|
199
|
-
groups:
|
|
200
|
-
dateRange:
|
|
211
|
+
view: a,
|
|
212
|
+
fields: L(this.$props.modelFields).fields,
|
|
213
|
+
groups: we(this.$props.group, this.$props.resources),
|
|
214
|
+
dateRange: r,
|
|
201
215
|
orientation: this.$props.group && this.$props.group.orientation ? this.$props.group.orientation : "horizontal",
|
|
202
|
-
dateFormat:
|
|
203
|
-
shortDateFormat:
|
|
216
|
+
dateFormat: n,
|
|
217
|
+
shortDateFormat: l,
|
|
204
218
|
scheduler: this,
|
|
205
219
|
dataItems: this.dataItems
|
|
206
220
|
}
|
|
@@ -224,10 +238,10 @@ const J = "{0:D}", Q = "{0:d}", X = (e, s) => {
|
|
|
224
238
|
}
|
|
225
239
|
},
|
|
226
240
|
render() {
|
|
227
|
-
|
|
228
|
-
const e = this.views.find((
|
|
229
|
-
this.ks.form =
|
|
230
|
-
const
|
|
241
|
+
ke(x), this.showLicenseWatermark = ge(x), this.licenseMessage = ve(x);
|
|
242
|
+
const e = this.views.find((de) => de.name === this.ks.activeViewName) || this.views[0] || u(R, null, null), t = this.getViewPropValue(this.ks.view, "slotDuration", this.ks.activeViewName), i = g.call(this, e.header || this.$props.header, H.call(this)), a = g.call(this, e.footer || this.$props.footer, H.call(this)), n = g.call(this, e.slot || this.$props.slotRender, {}), l = g.call(this, e.viewSlot || this.$props.viewSlot, {}), r = g.call(this, e.item || this.$props.item, {}), o = g.call(this, e.viewItem || this.$props.viewItem, {}), c = g.call(this, e.task || this.$props.task, {}), d = e.editSlot || this.$props.editSlot, f = e.form || this.$props.form || Me, p = g.call(this, e.dateHeaderCell || this.$props.dateHeaderCell, {}), m = g.call(this, e.timeHeaderCell || this.$props.timeHeaderCell, {}), k = g.call(this, e.resizeHint || this.$props.resizeHint, {});
|
|
243
|
+
this.ks.form = g.call(this, e.form || this.$props.form, {}), this.ks.editSlot = d && typeof d == "object" ? pe(M(d)) : d, this.ks.dialogProps = e.dialogProps || this.$props.dialogProps, this.ks.formProps = e.formProps || this.$props.formProps;
|
|
244
|
+
const v = je(e.editable !== void 0 ? e.editable : this.$props.editable), S = this.getViewComponentByName(this.ks.activeViewName || e.name), y = {
|
|
231
245
|
...this.$props,
|
|
232
246
|
...this.ks.view,
|
|
233
247
|
showWorkHours: this.ks.showWorkHours,
|
|
@@ -235,67 +249,67 @@ const J = "{0:D}", Q = "{0:d}", X = (e, s) => {
|
|
|
235
249
|
views: void 0,
|
|
236
250
|
defaultDate: void 0,
|
|
237
251
|
dateRange: this.ks.dateRange,
|
|
238
|
-
slotRender:
|
|
239
|
-
viewSlot:
|
|
240
|
-
item:
|
|
241
|
-
viewItem:
|
|
242
|
-
task:
|
|
243
|
-
dateHeaderCell:
|
|
244
|
-
timeHeaderCell:
|
|
245
|
-
resizeHint:
|
|
246
|
-
editable:
|
|
247
|
-
},
|
|
252
|
+
slotRender: n,
|
|
253
|
+
viewSlot: l,
|
|
254
|
+
item: r,
|
|
255
|
+
viewItem: o,
|
|
256
|
+
task: c,
|
|
257
|
+
dateHeaderCell: p,
|
|
258
|
+
timeHeaderCell: m,
|
|
259
|
+
resizeHint: k,
|
|
260
|
+
editable: v
|
|
261
|
+
}, I = Ie(this), D = I.toLanguageString(q, E[q]), F = I.toLanguageString(K, E[K]), N = I.toLanguageString(Y, E[Y]), re = I.toLanguageString(G, E[G]), ae = I.toLanguageString(Q, E[Q]), P = I.toLanguageString(Z, E[Z]), C = this.toolbarLevel, ne = u(Se, {
|
|
248
262
|
ref: this.setToolbarRef,
|
|
249
|
-
ariaLabel:
|
|
263
|
+
ariaLabel: P
|
|
250
264
|
}, {
|
|
251
|
-
default: () => [this.canAdd &&
|
|
265
|
+
default: () => [this.canAdd && u(V, {
|
|
252
266
|
class: "k-toolbar-button",
|
|
253
267
|
themeColor: "primary",
|
|
254
|
-
svgIcon:
|
|
255
|
-
"aria-label":
|
|
268
|
+
svgIcon: Pe,
|
|
269
|
+
"aria-label": ae,
|
|
256
270
|
tabIndex: -1,
|
|
257
271
|
onClick: this.handleNewEventClick
|
|
258
272
|
}, {
|
|
259
|
-
default: () => [
|
|
260
|
-
}),
|
|
273
|
+
default: () => [C < 2 && re]
|
|
274
|
+
}), C < 2 && u(V, {
|
|
261
275
|
class: "k-toolbar-button",
|
|
262
276
|
fillMode: "flat",
|
|
263
277
|
tabIndex: -1,
|
|
264
278
|
title: D,
|
|
265
279
|
onClick: this.handleTodayClick
|
|
266
|
-
},
|
|
280
|
+
}, ee(D) ? D : {
|
|
267
281
|
default: () => [D]
|
|
268
|
-
}),
|
|
282
|
+
}), C < 3 && u(Ve, {
|
|
269
283
|
class: "k-button-group-flat k-toolbar-button-group"
|
|
270
284
|
}, {
|
|
271
|
-
default: () => [
|
|
285
|
+
default: () => [u(V, {
|
|
272
286
|
fillMode: "flat",
|
|
273
287
|
tabIndex: -1,
|
|
274
|
-
svgIcon: this.isRtl ?
|
|
275
|
-
"aria-label":
|
|
276
|
-
title:
|
|
288
|
+
svgIcon: this.isRtl ? J : X,
|
|
289
|
+
"aria-label": F,
|
|
290
|
+
title: F,
|
|
277
291
|
onClick: this.handlePrevClick
|
|
278
|
-
}, null),
|
|
292
|
+
}, null), u(V, {
|
|
279
293
|
fillMode: "flat",
|
|
280
294
|
tabIndex: -1,
|
|
281
|
-
svgIcon: this.isRtl ?
|
|
295
|
+
svgIcon: this.isRtl ? X : J,
|
|
282
296
|
"aria-label": N,
|
|
283
297
|
title: N,
|
|
284
298
|
onClick: this.handleNextClick
|
|
285
299
|
}, null)]
|
|
286
|
-
}),
|
|
300
|
+
}), u(ye, {
|
|
287
301
|
value: this.ks.currentDate,
|
|
288
302
|
onChange: this.handleDatePickerChange,
|
|
289
|
-
level:
|
|
290
|
-
}, null),
|
|
303
|
+
level: C
|
|
304
|
+
}, null), u(U, null, null), C === 1 && u("span", {
|
|
291
305
|
class: "k-separator"
|
|
292
|
-
}, null),
|
|
293
|
-
level:
|
|
306
|
+
}, null), u(Re, {
|
|
307
|
+
level: C
|
|
294
308
|
}, null)]
|
|
295
|
-
}),
|
|
309
|
+
}), oe = j.call(this, {
|
|
296
310
|
h: $,
|
|
297
311
|
template: i,
|
|
298
|
-
defaultRendering:
|
|
312
|
+
defaultRendering: ne,
|
|
299
313
|
additionalProps: {
|
|
300
314
|
currentDate: this.ks.currentDate
|
|
301
315
|
},
|
|
@@ -305,33 +319,33 @@ const J = "{0:D}", Q = "{0:d}", X = (e, s) => {
|
|
|
305
319
|
todayclick: this.handleTodayClick,
|
|
306
320
|
datepickerchange: this.handleDatePickerChange
|
|
307
321
|
}
|
|
308
|
-
}),
|
|
309
|
-
"aria-label":
|
|
322
|
+
}), le = u(Ee, {
|
|
323
|
+
"aria-label": P
|
|
310
324
|
}, {
|
|
311
|
-
default: () => [this.isMobile &&
|
|
325
|
+
default: () => [this.isMobile && u(V, {
|
|
312
326
|
class: "k-scheduler-today",
|
|
313
327
|
tabIndex: -1,
|
|
314
328
|
onClick: this.handleTodayClick
|
|
315
|
-
},
|
|
329
|
+
}, ee(D) ? D : {
|
|
316
330
|
default: () => [D]
|
|
317
|
-
}), this.isMobile &&
|
|
318
|
-
slotDuration:
|
|
331
|
+
}), this.isMobile && u(U, null, null), u($e, {
|
|
332
|
+
slotDuration: t,
|
|
319
333
|
onClick: this.handleShowWorkHoursClick
|
|
320
334
|
}, null)]
|
|
321
|
-
}),
|
|
335
|
+
}), ce = j.call(this, {
|
|
322
336
|
h: $,
|
|
323
|
-
template:
|
|
324
|
-
defaultRendering:
|
|
337
|
+
template: a,
|
|
338
|
+
defaultRendering: le,
|
|
325
339
|
additionalProps: {
|
|
326
|
-
slotDuration:
|
|
340
|
+
slotDuration: t
|
|
327
341
|
},
|
|
328
342
|
additionalListeners: {
|
|
329
343
|
showworkhoursclick: this.handleShowWorkHoursClick
|
|
330
344
|
}
|
|
331
|
-
}),
|
|
345
|
+
}), he = this.showLicenseWatermark ? u(be, {
|
|
332
346
|
message: this.licenseMessage
|
|
333
347
|
}, null) : null;
|
|
334
|
-
return
|
|
348
|
+
return u("div", {
|
|
335
349
|
id: this.$props.id,
|
|
336
350
|
style: {
|
|
337
351
|
height: this.$props.height + "px"
|
|
@@ -344,11 +358,11 @@ const J = "{0:D}", Q = "{0:d}", X = (e, s) => {
|
|
|
344
358
|
"aria-labelledby": this.$props.ariaLabelledby,
|
|
345
359
|
onFocusin: this.handleFocus,
|
|
346
360
|
onFocusout: this.handleBlur
|
|
347
|
-
}, [
|
|
361
|
+
}, [oe, $(S, {
|
|
348
362
|
key: `${this.ks.view.name}-${this.ks.showWorkHours}`,
|
|
349
|
-
|
|
350
|
-
...
|
|
351
|
-
}), !["agenda", "month"].includes(this.ks.activeViewName) &&
|
|
363
|
+
onDataAction: this.handleDataAction,
|
|
364
|
+
...y
|
|
365
|
+
}), !["agenda", "month"].includes(this.ks.activeViewName) && ce, he, this.newEventDialogItem && u(f, {
|
|
352
366
|
dataItem: this.newEventDialogItem,
|
|
353
367
|
onSubmit: this.handleNewEventFormSubmit,
|
|
354
368
|
onCancel: this.handleNewEventFormCancel,
|
|
@@ -359,49 +373,49 @@ const J = "{0:D}", Q = "{0:d}", X = (e, s) => {
|
|
|
359
373
|
getViewComponentByName(e) {
|
|
360
374
|
switch (e.toLowerCase()) {
|
|
361
375
|
case "week":
|
|
362
|
-
return
|
|
376
|
+
return Te;
|
|
363
377
|
case "workweek":
|
|
364
|
-
return
|
|
378
|
+
return Fe;
|
|
365
379
|
case "agenda":
|
|
366
|
-
return
|
|
380
|
+
return Oe;
|
|
367
381
|
case "timeline":
|
|
368
|
-
return
|
|
382
|
+
return xe;
|
|
369
383
|
case "month":
|
|
370
|
-
return
|
|
384
|
+
return Ne;
|
|
371
385
|
default:
|
|
372
|
-
return
|
|
386
|
+
return R;
|
|
373
387
|
}
|
|
374
388
|
},
|
|
375
|
-
getViewPropValue(e,
|
|
376
|
-
const
|
|
377
|
-
return e[
|
|
389
|
+
getViewPropValue(e, t, i) {
|
|
390
|
+
const a = this.getViewComponentByName(i).props[t];
|
|
391
|
+
return e[t] || (a ? a.default : void 0);
|
|
378
392
|
},
|
|
379
393
|
handleDataChange({
|
|
380
394
|
created: e = [],
|
|
381
|
-
updated:
|
|
395
|
+
updated: t = [],
|
|
382
396
|
deleted: i = []
|
|
383
397
|
}) {
|
|
384
|
-
const
|
|
398
|
+
const a = {
|
|
385
399
|
created: e,
|
|
386
|
-
updated:
|
|
400
|
+
updated: t,
|
|
387
401
|
deleted: i
|
|
388
402
|
};
|
|
389
|
-
this.$emit("datachange",
|
|
403
|
+
this.$emit("datachange", a);
|
|
390
404
|
},
|
|
391
405
|
handleNewEventClick(e) {
|
|
392
406
|
e.preventDefault();
|
|
393
|
-
const
|
|
394
|
-
let
|
|
395
|
-
|
|
396
|
-
const
|
|
397
|
-
const
|
|
398
|
-
return !
|
|
407
|
+
const t = /* @__PURE__ */ new Date(), i = this.getViewPropValue(this.ks.view, "slotDuration", this.ks.activeViewName) || 30, a = i * 60 * 1e3, n = t.getMinutes(), l = Math.ceil(n / i) * i;
|
|
408
|
+
let r = new Date(t);
|
|
409
|
+
r.setHours(t.getHours() + Math.floor(l / 60), l % 60, 0, 0);
|
|
410
|
+
const o = this.$props.dataItems || [], c = this.fields, d = (m, k) => o.some((v) => {
|
|
411
|
+
const S = s(v, c.start), y = s(v, c.end);
|
|
412
|
+
return !S || !y ? !1 : S.getTime() < k.getTime() && y.getTime() > m.getTime();
|
|
399
413
|
});
|
|
400
|
-
let f = new Date(
|
|
401
|
-
for (let m = 0; m < 48 &&
|
|
402
|
-
|
|
403
|
-
const
|
|
404
|
-
|
|
414
|
+
let f = new Date(r.getTime() + a);
|
|
415
|
+
for (let m = 0; m < 48 && d(r, f); m++)
|
|
416
|
+
r = new Date(r.getTime() + a), f = new Date(r.getTime() + a);
|
|
417
|
+
const p = {};
|
|
418
|
+
h(p, c.start, r), h(p, c.end, f), h(p, c.isAllDay, !1), h(p, c.title, ""), h(p, c.description, ""), this.newEventDialogItem = p;
|
|
405
419
|
},
|
|
406
420
|
handleNewEventFormSubmit(e) {
|
|
407
421
|
this.handleDataChange({
|
|
@@ -412,126 +426,140 @@ const J = "{0:D}", Q = "{0:d}", X = (e, s) => {
|
|
|
412
426
|
this.newEventDialogItem = null;
|
|
413
427
|
},
|
|
414
428
|
handleCreate(e) {
|
|
415
|
-
const
|
|
429
|
+
const t = [e.dataItem];
|
|
416
430
|
this.handleDataChange({
|
|
417
|
-
created:
|
|
431
|
+
created: t
|
|
418
432
|
});
|
|
419
433
|
},
|
|
420
434
|
handleUpdate(e) {
|
|
421
|
-
const
|
|
435
|
+
const t = [], i = [], a = [];
|
|
422
436
|
if (e.series)
|
|
423
437
|
if (Array.isArray(e.dataItem)) {
|
|
424
|
-
const
|
|
425
|
-
if (
|
|
426
|
-
const
|
|
427
|
-
|
|
428
|
-
const
|
|
429
|
-
if (
|
|
430
|
-
const
|
|
431
|
-
|
|
438
|
+
const n = e.dataItem[0];
|
|
439
|
+
if (s(n, this.fields.recurrenceId) !== null && s(n, this.fields.recurrenceId) !== void 0) {
|
|
440
|
+
const r = w(b(n, this.fields, this.dataItems)), o = new Date(s(n, this.fields.originalStart)).getTime(), c = new Date(s(n, this.fields.start)).getTime(), d = new Date(s(n, this.fields.end)).getTime(), f = c - o, p = d - c, m = new Date(s(r, this.fields.start)).getTime();
|
|
441
|
+
h(r, this.fields.start, new Date(m + f)), h(r, this.fields.end, new Date(m + f + p));
|
|
442
|
+
const k = s(r, this.fields.recurrenceExceptions) || [];
|
|
443
|
+
if (k.length > 0 && f !== 0) {
|
|
444
|
+
const v = k.map((S) => new Date(new Date(S).getTime() + f));
|
|
445
|
+
h(r, this.fields.recurrenceExceptions, v);
|
|
432
446
|
}
|
|
433
|
-
|
|
447
|
+
h(r, this.fields.recurrenceRule, ie(s(r, this.fields.recurrenceRule), f)), i.push(r);
|
|
434
448
|
} else
|
|
435
|
-
e.dataItem.forEach((
|
|
436
|
-
const
|
|
437
|
-
|
|
438
|
-
const
|
|
439
|
-
if (
|
|
440
|
-
const
|
|
441
|
-
|
|
449
|
+
e.dataItem.forEach((r) => {
|
|
450
|
+
const o = w(b(r, this.fields, this.dataItems)), c = w(r);
|
|
451
|
+
h(c, this.fields.originalStart, s(o, this.fields.originalStart)), h(c, this.fields.recurrenceId, s(o, this.fields.recurrenceId));
|
|
452
|
+
const d = s(o, this.fields.recurrenceExceptions) || [], f = new Date(s(o, this.fields.start)).getTime(), m = new Date(s(c, this.fields.start)).getTime() - f;
|
|
453
|
+
if (d.length > 0 && m !== 0) {
|
|
454
|
+
const k = d.map((v) => new Date(new Date(v).getTime() + m));
|
|
455
|
+
h(c, this.fields.recurrenceExceptions, k);
|
|
442
456
|
} else
|
|
443
|
-
|
|
457
|
+
h(c, this.fields.recurrenceExceptions, d);
|
|
444
458
|
i.push(c);
|
|
445
459
|
});
|
|
446
|
-
} else if (
|
|
447
|
-
const
|
|
448
|
-
l
|
|
449
|
-
const
|
|
450
|
-
if (
|
|
451
|
-
const
|
|
452
|
-
l
|
|
460
|
+
} else if (s(e.dataItem, this.fields.recurrenceId) !== null && s(e.dataItem, this.fields.recurrenceId) !== void 0) {
|
|
461
|
+
const l = w(b(e.dataItem, this.fields, this.dataItems)), r = new Date(s(e.dataItem, this.fields.originalStart)).getTime(), o = new Date(s(e.dataItem, this.fields.start)).getTime(), c = new Date(s(e.dataItem, this.fields.end)).getTime(), d = o - r, f = c - o, p = new Date(s(l, this.fields.start)).getTime();
|
|
462
|
+
h(l, this.fields.start, new Date(p + d)), h(l, this.fields.end, new Date(p + d + f));
|
|
463
|
+
const m = s(l, this.fields.recurrenceExceptions) || [];
|
|
464
|
+
if (m.length > 0 && d !== 0) {
|
|
465
|
+
const k = m.map((v) => new Date(new Date(v).getTime() + d));
|
|
466
|
+
h(l, this.fields.recurrenceExceptions, k);
|
|
453
467
|
}
|
|
454
|
-
l
|
|
468
|
+
h(l, this.fields.recurrenceRule, ie(s(l, this.fields.recurrenceRule), d)), i.push(l);
|
|
455
469
|
} else {
|
|
456
|
-
const
|
|
457
|
-
if (
|
|
458
|
-
const
|
|
459
|
-
l
|
|
460
|
-
const c =
|
|
461
|
-
if (c.length > 0 &&
|
|
462
|
-
const
|
|
463
|
-
l
|
|
470
|
+
const l = w(e.dataItem);
|
|
471
|
+
if (s(l, this.fields.recurrenceRule)) {
|
|
472
|
+
const o = w(b(e.dataItem, this.fields, this.dataItems));
|
|
473
|
+
h(l, this.fields.originalStart, s(o, this.fields.originalStart)), h(l, this.fields.recurrenceId, s(o, this.fields.recurrenceId));
|
|
474
|
+
const c = s(o, this.fields.recurrenceExceptions) || [], d = new Date(s(o, this.fields.start)).getTime(), p = new Date(s(l, this.fields.start)).getTime() - d;
|
|
475
|
+
if (c.length > 0 && p !== 0) {
|
|
476
|
+
const m = c.map((k) => new Date(new Date(k).getTime() + p));
|
|
477
|
+
h(l, this.fields.recurrenceExceptions, m);
|
|
464
478
|
} else
|
|
465
|
-
l
|
|
479
|
+
h(l, this.fields.recurrenceExceptions, c);
|
|
466
480
|
} else
|
|
467
|
-
l
|
|
468
|
-
i.push(
|
|
481
|
+
h(l, this.fields.recurrenceExceptions, null);
|
|
482
|
+
i.push(l);
|
|
469
483
|
}
|
|
470
484
|
else if (Array.isArray(e.dataItem))
|
|
471
|
-
e.dataItem.forEach((
|
|
472
|
-
const
|
|
473
|
-
if (
|
|
474
|
-
const
|
|
475
|
-
|
|
485
|
+
e.dataItem.forEach((n) => {
|
|
486
|
+
const l = s(n, this.fields.recurrenceRule) !== null && s(n, this.fields.recurrenceRule) !== void 0;
|
|
487
|
+
if (s(n, this.fields.recurrenceId) !== null && s(n, this.fields.recurrenceId) !== void 0 && l) {
|
|
488
|
+
const o = w(b(n, this.fields, this.dataItems)), c = s(n, this.fields.originalStart), d = s(o, this.fields.recurrenceExceptions) || [];
|
|
489
|
+
h(o, this.fields.recurrenceExceptions, [...d, c]), h(n, this.fields.recurrenceRule, null), i.push(o), t.push(n);
|
|
476
490
|
} else
|
|
477
|
-
i.push(
|
|
491
|
+
i.push(n);
|
|
478
492
|
});
|
|
479
493
|
else {
|
|
480
|
-
const
|
|
481
|
-
if (
|
|
482
|
-
const
|
|
483
|
-
|
|
494
|
+
const n = s(e.dataItem, this.fields.recurrenceRule) !== null && s(e.dataItem, this.fields.recurrenceRule) !== void 0;
|
|
495
|
+
if (s(e.dataItem, this.fields.recurrenceId) !== null && s(e.dataItem, this.fields.recurrenceId) !== void 0 && n) {
|
|
496
|
+
const r = w(b(e.dataItem, this.fields, this.dataItems)), o = s(e.dataItem, this.fields.originalStart), c = s(r, this.fields.recurrenceExceptions) || [];
|
|
497
|
+
h(r, this.fields.recurrenceExceptions, [...c, o]), h(e.dataItem, this.fields.recurrenceRule, null), i.push(r), t.push(e.dataItem);
|
|
484
498
|
} else
|
|
485
499
|
i.push(e.dataItem);
|
|
486
500
|
}
|
|
501
|
+
if (e.series) {
|
|
502
|
+
const n = Array.isArray(e.dataItem) ? e.dataItem : [e.dataItem], l = new Set(n.map((o) => fe(o, this.fields))), r = new Set(n.filter((o) => !s(o, this.fields.recurrenceRule) && (s(o, this.fields.recurrenceId) === null || s(o, this.fields.recurrenceId) === void 0)).map((o) => s(o, this.fields.id)));
|
|
503
|
+
l.forEach((o) => {
|
|
504
|
+
if (o == null)
|
|
505
|
+
return;
|
|
506
|
+
const c = W(this.dataItems, this.fields, o);
|
|
507
|
+
e.resetExceptions ? a.push(...c.map((d) => w(d))) : r.has(o) && i.push(...c.map((d) => A(d, this.fields))), (r.has(o) || e.resetExceptions) && i.forEach((d) => {
|
|
508
|
+
s(d, this.fields.id) === o && h(d, this.fields.recurrenceExceptions, null);
|
|
509
|
+
});
|
|
510
|
+
});
|
|
511
|
+
}
|
|
487
512
|
this.handleDataChange({
|
|
488
513
|
updated: i,
|
|
489
|
-
created:
|
|
514
|
+
created: t,
|
|
515
|
+
deleted: a
|
|
490
516
|
});
|
|
491
517
|
},
|
|
492
518
|
handleRemove(e) {
|
|
493
|
-
const
|
|
519
|
+
const t = [], i = [];
|
|
494
520
|
if (e.series) {
|
|
495
|
-
const
|
|
496
|
-
|
|
497
|
-
|
|
521
|
+
const a = w(b(e.dataItem, this.fields, this.dataItems)), n = w(a);
|
|
522
|
+
h(n, this.fields.originalStart, s(a, this.fields.originalStart)), h(n, this.fields.recurrenceId, s(a, this.fields.recurrenceId)), h(n, this.fields.recurrenceRule, s(a, this.fields.recurrenceRule)), h(n, this.fields.recurrenceExceptions, s(a, this.fields.recurrenceExceptions)), i.push(n);
|
|
523
|
+
const l = W(this.dataItems, this.fields, s(a, this.fields.id));
|
|
524
|
+
e.resetExceptions ? i.push(...l.map((r) => w(r))) : t.push(...l.map((r) => A(r, this.fields)));
|
|
525
|
+
} else if (!(s(e.dataItem, this.fields.recurrenceRule) !== null && s(e.dataItem, this.fields.recurrenceRule) !== void 0))
|
|
498
526
|
i.push(e.dataItem);
|
|
499
527
|
else {
|
|
500
|
-
const
|
|
501
|
-
|
|
528
|
+
const n = w(b(e.dataItem, this.fields, this.dataItems)), l = s(e.dataItem, this.fields.originalStart), r = s(n, this.fields.recurrenceExceptions) || [];
|
|
529
|
+
h(n, this.fields.recurrenceExceptions, [...r, l]), h(e.dataItem, this.fields.recurrenceRule, null), t.push(n);
|
|
502
530
|
}
|
|
503
531
|
this.handleDataChange({
|
|
504
|
-
updated:
|
|
532
|
+
updated: t,
|
|
505
533
|
deleted: i
|
|
506
534
|
});
|
|
507
535
|
},
|
|
508
536
|
handleDataAction(e) {
|
|
509
537
|
switch (e.type) {
|
|
510
|
-
case
|
|
538
|
+
case T.create:
|
|
511
539
|
this.handleCreate(e);
|
|
512
540
|
break;
|
|
513
|
-
case
|
|
541
|
+
case T.update:
|
|
514
542
|
this.handleUpdate(e);
|
|
515
543
|
break;
|
|
516
|
-
case
|
|
544
|
+
case T.remove:
|
|
517
545
|
this.handleRemove(e);
|
|
518
546
|
break;
|
|
519
547
|
}
|
|
520
548
|
},
|
|
521
|
-
handleActiveViewNameChange(e,
|
|
549
|
+
handleActiveViewNameChange(e, t) {
|
|
522
550
|
this.$props.view === void 0 && this.updatePassedState(e), this.$emit("viewchange", {
|
|
523
551
|
viewName: e,
|
|
524
|
-
...
|
|
552
|
+
...t,
|
|
525
553
|
target: this.ks.scheduler.$el
|
|
526
554
|
});
|
|
527
555
|
},
|
|
528
556
|
setToolbarRef(e) {
|
|
529
|
-
const
|
|
530
|
-
|
|
557
|
+
const t = (e == null ? void 0 : e.$el) || null;
|
|
558
|
+
t !== this.toolbarElement && (this.toolbarObserver && this.toolbarElement && this.toolbarObserver.unobserve(this.toolbarElement), this.toolbarElement = t, this.toolbarObserver && t && this.toolbarObserver.observe(t));
|
|
531
559
|
},
|
|
532
|
-
handleDateChange(e,
|
|
560
|
+
handleDateChange(e, t) {
|
|
533
561
|
this.setDate(e, {
|
|
534
|
-
...
|
|
562
|
+
...t,
|
|
535
563
|
target: this.ks.scheduler.$el
|
|
536
564
|
});
|
|
537
565
|
},
|
|
@@ -544,18 +572,18 @@ const J = "{0:D}", Q = "{0:d}", X = (e, s) => {
|
|
|
544
572
|
},
|
|
545
573
|
handleNextClick(e) {
|
|
546
574
|
e.preventDefault();
|
|
547
|
-
const
|
|
548
|
-
this.setDate(
|
|
575
|
+
const t = this.getViewPropValue(this.ks.view, "step", this.ks.activeViewName) || this.getViewPropValue(this.ks.view, "numberOfDays", this.ks.activeViewName) || 1, a = t > 27 ? B(this.ks.currentDate, Math.round(t / 27)) : _(this.ks.currentDate, t);
|
|
576
|
+
this.setDate(a, e);
|
|
549
577
|
},
|
|
550
578
|
handlePrevClick(e) {
|
|
551
579
|
e.preventDefault();
|
|
552
|
-
const
|
|
553
|
-
this.setDate(
|
|
580
|
+
const t = this.getViewPropValue(this.ks.view, "step", this.ks.activeViewName) || this.getViewPropValue(this.ks.view, "numberOfDays", this.ks.activeViewName) || 1, a = t > 27 ? B(this.ks.currentDate, -Math.round(t / 27)) : _(this.ks.currentDate, -t);
|
|
581
|
+
this.setDate(a, e);
|
|
554
582
|
},
|
|
555
583
|
handleTodayClick(e) {
|
|
556
584
|
e.preventDefault();
|
|
557
|
-
const
|
|
558
|
-
this.setDate(new Date(
|
|
585
|
+
const t = Ce.fromLocalDate(/* @__PURE__ */ new Date(), this.ks.timezone);
|
|
586
|
+
this.setDate(new Date(t.getTime()), e);
|
|
559
587
|
},
|
|
560
588
|
handleShowWorkHoursClick() {
|
|
561
589
|
this.ks.showWorkHours = !this.ks.showWorkHours;
|
|
@@ -584,42 +612,42 @@ const J = "{0:D}", Q = "{0:d}", X = (e, s) => {
|
|
|
584
612
|
handleTaskDoubleClick(e) {
|
|
585
613
|
this.$emit("taskdoubleclick", e);
|
|
586
614
|
},
|
|
587
|
-
setDate(e,
|
|
615
|
+
setDate(e, t) {
|
|
588
616
|
this.$props.date === void 0 && (this.ks.currentDate = e, this.updatePassedState()), this.$emit("datechange", {
|
|
589
617
|
date: e,
|
|
590
|
-
event:
|
|
618
|
+
event: t
|
|
591
619
|
});
|
|
592
620
|
},
|
|
593
621
|
updatePassedState(e) {
|
|
594
|
-
const
|
|
595
|
-
this.ks.activeViewName = i, this.ks.view = this.views.find((
|
|
596
|
-
intl:
|
|
622
|
+
const t = z(this), i = e || this.ks.activeViewName;
|
|
623
|
+
this.ks.activeViewName = i, this.ks.view = this.views.find((a) => a.name === i) || this.views[0] || u(R, null, null), this.ks.dateFormat = this.getViewPropValue(this.ks.view, "selectedDateFormat", i) || te, this.ks.shortDateFormat = this.getViewPropValue(this.ks.view, "selectedShortDateFormat", i) || se, this.ks.dateRange = this.getViewComponentByName(i).props.dateRange.default()({
|
|
624
|
+
intl: t,
|
|
597
625
|
date: this.ks.currentDate,
|
|
598
626
|
timezone: this.$props.timezone,
|
|
599
627
|
numberOfDays: this.getViewPropValue(this.ks.view, "numberOfDays", this.ks.activeViewName),
|
|
600
|
-
workWeekStart: this.getViewPropValue(this.ks.view, "workWeekStart", this.ks.activeViewName) ||
|
|
601
|
-
workWeekEnd: this.getViewPropValue(this.ks.view, "workWeekEnd", this.ks.activeViewName) || (
|
|
628
|
+
workWeekStart: this.getViewPropValue(this.ks.view, "workWeekStart", this.ks.activeViewName) || t.firstDay(),
|
|
629
|
+
workWeekEnd: this.getViewPropValue(this.ks.view, "workWeekEnd", this.ks.activeViewName) || (t.firstDay() + this.getViewPropValue(this.ks.view, "numberOfDays", this.ks.activeViewName)) % 6
|
|
602
630
|
});
|
|
603
631
|
},
|
|
604
632
|
calculateMedia() {
|
|
605
|
-
|
|
633
|
+
O && window.matchMedia && (this.media = window.matchMedia("(min-width: 1024px)").matches ? "desktop" : "mobile");
|
|
606
634
|
},
|
|
607
635
|
measureToolbar() {
|
|
608
|
-
const
|
|
609
|
-
if (!
|
|
636
|
+
const t = this.toolbarElement;
|
|
637
|
+
if (!t)
|
|
610
638
|
return;
|
|
611
|
-
const i =
|
|
639
|
+
const i = t.clientWidth;
|
|
612
640
|
if (!i)
|
|
613
641
|
return;
|
|
614
|
-
const
|
|
615
|
-
if (
|
|
616
|
-
this.toolbarBreakpoints[
|
|
642
|
+
const a = parseInt(window.getComputedStyle(t).gap || "0", 10), n = Array.from(t.children), l = n.reduce((o, c) => o + c.offsetWidth, 0) + (n.length - 1) * a, r = this.toolbarLevel;
|
|
643
|
+
if (l > i && r < 3) {
|
|
644
|
+
this.toolbarBreakpoints[r] = i, this.toolbarLevel = r + 1;
|
|
617
645
|
return;
|
|
618
646
|
}
|
|
619
|
-
|
|
647
|
+
r > 0 && i > this.toolbarBreakpoints[r - 1] + 20 && (this.toolbarLevel = r - 1);
|
|
620
648
|
}
|
|
621
649
|
}
|
|
622
650
|
});
|
|
623
651
|
export {
|
|
624
|
-
|
|
652
|
+
pt as Scheduler
|
|
625
653
|
};
|