@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.
Files changed (156) hide show
  1. package/Scheduler.d.ts +157 -56
  2. package/Scheduler.js +1 -1
  3. package/Scheduler.mjs +242 -214
  4. package/components/EventOverviewPopover.d.ts +62 -0
  5. package/components/EventOverviewPopover.js +8 -0
  6. package/components/EventOverviewPopover.mjs +191 -0
  7. package/components/MoreEventsPopover.d.ts +3 -1
  8. package/components/MoreEventsPopover.js +1 -1
  9. package/components/MoreEventsPopover.mjs +31 -27
  10. package/components/SchedulerActionButtons.js +1 -1
  11. package/components/SchedulerActionButtons.mjs +1 -0
  12. package/components/SchedulerForm.d.ts +412 -2
  13. package/components/SchedulerForm.js +1 -1
  14. package/components/SchedulerForm.mjs +162 -60
  15. package/components/SchedulerQuickCreateForm.d.ts +118 -0
  16. package/components/SchedulerQuickCreateForm.js +8 -0
  17. package/components/SchedulerQuickCreateForm.mjs +249 -0
  18. package/constants/main.d.ts +2 -0
  19. package/constants/main.js +1 -1
  20. package/constants/main.mjs +10 -9
  21. package/dist/cdn/js/kendo-vue-scheduler.js +1 -1
  22. package/editors/KeepResetCustomEventsDialog.d.ts +31 -0
  23. package/editors/KeepResetCustomEventsDialog.js +8 -0
  24. package/editors/KeepResetCustomEventsDialog.mjs +72 -0
  25. package/editors/SchedulerFormEditor.d.ts +151 -52
  26. package/editors/SchedulerFormEditor.js +1 -1
  27. package/editors/SchedulerFormEditor.mjs +192 -139
  28. package/editors/SchedulerRecurrenceDialog.d.ts +2 -2
  29. package/editors/SchedulerRecurrenceDialog.js +1 -1
  30. package/editors/SchedulerRecurrenceDialog.mjs +126 -131
  31. package/editors/ZonedSplitDateTime.d.ts +32 -3
  32. package/editors/ZonedSplitDateTime.js +1 -1
  33. package/editors/ZonedSplitDateTime.mjs +112 -47
  34. package/hooks/useCloseOnAnchorScrollOut.d.ts +10 -0
  35. package/hooks/useCloseOnAnchorScrollOut.js +8 -0
  36. package/hooks/useCloseOnAnchorScrollOut.mjs +43 -0
  37. package/hooks/useCustomEventsConfirmation.d.ts +20 -0
  38. package/hooks/useCustomEventsConfirmation.js +8 -0
  39. package/hooks/useCustomEventsConfirmation.mjs +48 -0
  40. package/hooks/useDeferredClick.d.ts +12 -0
  41. package/hooks/useDeferredClick.js +8 -0
  42. package/hooks/useDeferredClick.mjs +22 -0
  43. package/hooks/useExclusivePopover.d.ts +26 -0
  44. package/hooks/useExclusivePopover.js +8 -0
  45. package/hooks/useExclusivePopover.mjs +30 -0
  46. package/hooks/useRecurrenceSummary.d.ts +3 -0
  47. package/hooks/useRecurrenceSummary.js +1 -1
  48. package/hooks/useRecurrenceSummary.mjs +68 -41
  49. package/index.d.mts +4 -2
  50. package/index.d.ts +4 -2
  51. package/index.js +1 -1
  52. package/index.mjs +83 -78
  53. package/items/SchedulerEditItem.d.ts +116 -12
  54. package/items/SchedulerEditItem.js +1 -1
  55. package/items/SchedulerEditItem.mjs +212 -131
  56. package/items/SchedulerItem.d.ts +2 -1
  57. package/items/SchedulerItem.js +1 -1
  58. package/items/SchedulerItem.mjs +28 -23
  59. package/items/SchedulerProportionalViewItem.d.ts +1 -0
  60. package/items/SchedulerProportionalViewItem.js +1 -1
  61. package/items/SchedulerProportionalViewItem.mjs +83 -68
  62. package/items/SchedulerViewItem.d.ts +1 -0
  63. package/items/SchedulerViewItem.js +1 -1
  64. package/items/SchedulerViewItem.mjs +84 -75
  65. package/items/hooks/use-drag-item.js +1 -1
  66. package/items/hooks/use-drag-item.mjs +49 -48
  67. package/items/hooks/use-form-item.d.ts +1 -1
  68. package/items/hooks/use-remove-item.d.ts +1 -1
  69. package/items/hooks/use-resize-item.js +1 -1
  70. package/items/hooks/use-resize-item.mjs +74 -65
  71. package/messages/main.d.ts +42 -0
  72. package/messages/main.js +1 -1
  73. package/messages/main.mjs +303 -275
  74. package/models/InternalDataAction.d.ts +13 -0
  75. package/models/SchedulerView.d.ts +1 -1
  76. package/package-metadata.js +1 -1
  77. package/package-metadata.mjs +2 -2
  78. package/package.json +13 -12
  79. package/recurrence/RecurrenceEditor.js +1 -1
  80. package/recurrence/RecurrenceEditor.mjs +42 -42
  81. package/recurrence/common.d.ts +10 -0
  82. package/recurrence/common.js +1 -1
  83. package/recurrence/common.mjs +39 -35
  84. package/services/itemsService.d.ts +5 -2
  85. package/services/itemsService.js +1 -1
  86. package/services/itemsService.mjs +46 -33
  87. package/services/occurrenceService.js +1 -1
  88. package/services/occurrenceService.mjs +18 -18
  89. package/slots/SchedulerEditSlot.d.ts +70 -8
  90. package/slots/SchedulerEditSlot.js +1 -1
  91. package/slots/SchedulerEditSlot.mjs +222 -141
  92. package/slots/SchedulerSlot.js +1 -1
  93. package/slots/SchedulerSlot.mjs +20 -16
  94. package/slots/SchedulerViewSlot.d.ts +3 -0
  95. package/slots/SchedulerViewSlot.js +1 -1
  96. package/slots/SchedulerViewSlot.mjs +21 -15
  97. package/tasks/SchedulerEditTask.d.ts +13 -2
  98. package/tasks/SchedulerEditTask.js +1 -1
  99. package/tasks/SchedulerEditTask.mjs +45 -30
  100. package/utils/main.d.ts +27 -0
  101. package/utils/main.js +1 -1
  102. package/utils/main.mjs +172 -136
  103. package/views/agenda/AgendaView.d.ts +6 -2
  104. package/views/agenda/AgendaView.js +1 -1
  105. package/views/agenda/AgendaView.mjs +31 -29
  106. package/views/agenda/AgendaViewBody.d.ts +3 -3
  107. package/views/agenda/AgendaViewBody.js +1 -1
  108. package/views/agenda/AgendaViewBody.mjs +31 -29
  109. package/views/common/SchedulerDrag.d.ts +4 -2
  110. package/views/common/SchedulerDrag.js +1 -1
  111. package/views/common/SchedulerDrag.mjs +8 -7
  112. package/views/common/SchedulerResize.d.ts +4 -2
  113. package/views/common/SchedulerResize.js +1 -1
  114. package/views/common/SchedulerResize.mjs +14 -12
  115. package/views/common/VerticalResourceIterator.d.ts +3 -3
  116. package/views/common/VerticalResourceIterator.js +1 -1
  117. package/views/common/VerticalResourceIterator.mjs +34 -33
  118. package/views/day/DayView.d.ts +2 -0
  119. package/views/day/DayView.js +1 -1
  120. package/views/day/DayView.mjs +9 -7
  121. package/views/day/DayViewAllDaySlots.d.ts +7 -5
  122. package/views/day/DayViewAllDaySlots.js +1 -1
  123. package/views/day/DayViewAllDaySlots.mjs +24 -21
  124. package/views/day/DayViewMiddleRow.d.ts +7 -5
  125. package/views/day/DayViewMiddleRow.js +1 -1
  126. package/views/day/DayViewMiddleRow.mjs +18 -13
  127. package/views/day/DayViewVerticalRow.d.ts +7 -5
  128. package/views/day/DayViewVerticalRow.js +1 -1
  129. package/views/day/DayViewVerticalRow.mjs +23 -17
  130. package/views/day/DayViewVerticalSlotsRow.d.ts +7 -5
  131. package/views/day/DayViewVerticalSlotsRow.js +1 -1
  132. package/views/day/DayViewVerticalSlotsRow.mjs +34 -29
  133. package/views/day/MultiDayView.d.ts +13 -7
  134. package/views/day/MultiDayView.js +1 -1
  135. package/views/day/MultiDayView.mjs +108 -95
  136. package/views/month/MonthView.d.ts +15 -4
  137. package/views/month/MonthView.js +1 -1
  138. package/views/month/MonthView.mjs +105 -68
  139. package/views/month/MonthViewBody.d.ts +3 -3
  140. package/views/month/MonthViewBody.js +1 -1
  141. package/views/month/MonthViewBody.mjs +18 -16
  142. package/views/time/MultiDayTimelineView.d.ts +6 -4
  143. package/views/time/MultiDayTimelineView.js +1 -1
  144. package/views/time/MultiDayTimelineView.mjs +64 -63
  145. package/views/time/TimelineView.d.ts +2 -0
  146. package/views/time/TimelineView.js +1 -1
  147. package/views/time/TimelineView.mjs +5 -3
  148. package/views/time/TimelineViewBody.d.ts +7 -5
  149. package/views/time/TimelineViewBody.js +1 -1
  150. package/views/time/TimelineViewBody.mjs +29 -27
  151. package/views/week/WeekView.d.ts +2 -0
  152. package/views/week/WeekView.js +1 -1
  153. package/views/week/WeekView.mjs +11 -10
  154. package/views/week/WorkWeekView.d.ts +2 -0
  155. package/views/week/WorkWeekView.js +1 -1
  156. package/views/week/WorkWeekView.mjs +17 -16
@@ -5,28 +5,31 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { defineComponent as I, createVNode as r } from "vue";
9
- import { BaseView as D } from "../../components/BaseView.mjs";
10
- import { firstDayInWeek as h, firstDayOfMonth as R, getDate as l, addDays as k, lastDayOfMonth as z, ZonedDate as u, MS_PER_DAY as d } from "@progress/kendo-date-math";
11
- import { VerticalResourceIterator as c } from "../common/VerticalResourceIterator.mjs";
12
- import { HorizontalResourceIterator as p } from "../common/HorizontalResourceIterator.mjs";
13
- import { orderSort as $, mapItemsToSlots as b, mapSlotsToItems as A, toUTCDateTime as m } from "../../utils/main.mjs";
14
- import { monthViewTitle as f, messages as C } from "../../messages/main.mjs";
15
- import { SchedulerEditSlot as F } from "../../slots/SchedulerEditSlot.mjs";
16
- import { provideLocalizationService as M, provideIntlService as S } from "@progress/kendo-vue-intl";
17
- import { DAYS_IN_WEEK_COUNT as w } from "../../constants/main.mjs";
18
- import { toRanges as T } from "../../services/rangeService.mjs";
19
- import { toSlots as O } from "../../services/slotsService.mjs";
20
- import { toOccurrences as x } from "../../services/occurrenceService.mjs";
21
- import { toItems as E } from "../../services/itemsService.mjs";
22
- import { MonthViewHead as g } from "./MonthViewHead.mjs";
23
- import { MonthViewBody as P } from "./MonthViewBody.mjs";
24
- import { MoreEventsPopover as j } from "../../components/MoreEventsPopover.mjs";
25
- import { SchedulerEditItem as V } from "../../items/SchedulerEditItem.mjs";
26
- import { syncGroupRowHeights as N } from "../../hooks/useGroupRowHeightSync.mjs";
27
- const ie = /* @__PURE__ */ I({
8
+ import { defineComponent as D, createVNode as n, mergeProps as k, shallowRef as h, ref as R } from "vue";
9
+ import { BaseView as b } from "../../components/BaseView.mjs";
10
+ import { firstDayInWeek as u, firstDayOfMonth as $, getDate as c, addDays as z, lastDayOfMonth as C, ZonedDate as d, MS_PER_DAY as p } from "@progress/kendo-date-math";
11
+ import { VerticalResourceIterator as m } from "../common/VerticalResourceIterator.mjs";
12
+ import { HorizontalResourceIterator as f } from "../common/HorizontalResourceIterator.mjs";
13
+ import { emitDataAction as A, orderSort as F, mapItemsToSlots as P, mapSlotsToItems as O, toUTCDateTime as g } from "../../utils/main.mjs";
14
+ import { monthViewTitle as S, messages as M } from "../../messages/main.mjs";
15
+ import { SchedulerEditSlot as E } from "../../slots/SchedulerEditSlot.mjs";
16
+ import { provideLocalizationService as T, provideIntlService as v } from "@progress/kendo-vue-intl";
17
+ import { DAYS_IN_WEEK_COUNT as y } from "../../constants/main.mjs";
18
+ import { toRanges as x } from "../../services/rangeService.mjs";
19
+ import { toSlots as j } from "../../services/slotsService.mjs";
20
+ import { toOccurrences as V } from "../../services/occurrenceService.mjs";
21
+ import { toItems as N } from "../../services/itemsService.mjs";
22
+ import { MonthViewHead as w } from "./MonthViewHead.mjs";
23
+ import { MonthViewBody as H } from "./MonthViewBody.mjs";
24
+ import { MoreEventsPopover as G } from "../../components/MoreEventsPopover.mjs";
25
+ import { SchedulerEditItem as q } from "../../items/SchedulerEditItem.mjs";
26
+ import { syncGroupRowHeights as _ } from "../../hooks/useGroupRowHeightSync.mjs";
27
+ import { useEditable as B } from "../../hooks/useEditable.mjs";
28
+ const de = /* @__PURE__ */ D({
28
29
  name: "KendoMonthView",
30
+ emits: ["dataaction"],
29
31
  props: {
32
+ onDataAction: Function,
30
33
  itemsPerSlot: {
31
34
  type: Number,
32
35
  default: 2
@@ -38,7 +41,7 @@ const ie = /* @__PURE__ */ I({
38
41
  dateRange: {
39
42
  type: [Function, Object],
40
43
  default: function() {
41
- return H;
44
+ return K;
42
45
  }
43
46
  },
44
47
  slotDuration: {
@@ -100,8 +103,23 @@ const ie = /* @__PURE__ */ I({
100
103
  default: null
101
104
  }
102
105
  },
106
+ setup(t) {
107
+ const s = h(null), o = h(null), r = R(!1);
108
+ return {
109
+ popoverEditItem: s,
110
+ popoverFormItem: o,
111
+ popoverShowOccurrenceDialog: r,
112
+ handlePopoverItemDoubleClick: (i) => !B(t.editable).edit || i.readonly ? !1 : (s.value = i, o.value = i.dataItem, r.value = !!i.isRecurring, !0),
113
+ handlePopoverFormItemChange: (i) => {
114
+ o.value = i, i || (s.value = null);
115
+ },
116
+ handlePopoverShowOccurrenceDialogChange: (i) => {
117
+ r.value = i;
118
+ }
119
+ };
120
+ },
103
121
  created() {
104
- this.intl = S(this);
122
+ this.intl = v(this);
105
123
  },
106
124
  mounted() {
107
125
  this.hasMounted = !0, this.queueSyncGroupRows();
@@ -134,34 +152,34 @@ const ie = /* @__PURE__ */ I({
134
152
  },
135
153
  computed: {
136
154
  ranges() {
137
- return T(this.ks.dateRange, {
138
- step: d * w,
155
+ return x(this.ks.dateRange, {
156
+ step: p * y,
139
157
  timezone: this.ks.timezone
140
158
  });
141
159
  },
142
160
  monthSlots() {
143
- return O(this.ks.dateRange, {
144
- step: d
161
+ return j(this.ks.dateRange, {
162
+ step: p
145
163
  }, {
146
164
  groups: this.ks.groups,
147
165
  ranges: this.ranges
148
166
  });
149
167
  },
150
168
  occurrences() {
151
- return x(this.ks.dataItems, {
169
+ return V(this.ks.dataItems, {
152
170
  dateRange: this.ks.dateRange,
153
171
  fields: this.ks.fields,
154
172
  timezone: this.ks.timezone
155
173
  });
156
174
  },
157
175
  items() {
158
- const t = E(this.occurrences, {
176
+ const t = N(this.occurrences, {
159
177
  timezone: this.ks.timezone
160
178
  }, {
161
179
  groups: this.ks.groups,
162
180
  ranges: this.ranges
163
181
  });
164
- return b(t, this.monthSlots, !0), A(t, this.monthSlots, !0), t;
182
+ return P(t, this.monthSlots, !0), O(t, this.monthSlots, !0), t;
165
183
  },
166
184
  rowSyncKey() {
167
185
  return [this.itemsPerSlot, this.monthSlots.map((t) => `${t.group.index}:${t.range.index}:${t.items.length}`).join("|")].join("::");
@@ -174,28 +192,28 @@ const ie = /* @__PURE__ */ I({
174
192
  }
175
193
  },
176
194
  render() {
177
- this.localization = M(this), this.localization.toLanguageString(f, C[f]);
178
- const t = this.$props.editItem || V;
179
- this.$props.editSlot || F;
180
- const n = this.items, o = this.monthSlots;
181
- this.intl = S(this);
182
- const s = this.$props.itemsPerSlot, a = this.ks.orientation === "horizontal" ? this.ranges.map(function(e, i) {
183
- return r(p, {
195
+ this.localization = T(this), this.localization.toLanguageString(S, M[S]);
196
+ const t = this.$props.editItem || q;
197
+ this.$props.editSlot || E;
198
+ const s = this.items, o = this.monthSlots;
199
+ this.intl = v(this);
200
+ const r = this.$props.itemsPerSlot, l = this.ks.orientation === "horizontal" ? this.ranges.map(function(e, a) {
201
+ return n(f, {
184
202
  resources: this.ks.props.resources,
185
203
  group: this.ks.props.group
186
204
  }, {
187
- default: () => [r(P, {
205
+ default: () => [n(H, {
188
206
  editable: this.$props.editable,
189
207
  slotRender: this.$props.slotRender,
190
208
  viewSlot: this.$props.viewSlot,
191
209
  monthSlots: o,
192
- rangeIndex: i,
193
- itemsPerSlot: s,
210
+ rangeIndex: a,
211
+ itemsPerSlot: r,
194
212
  onDataaction: this.handleDataAction,
195
213
  onShowmoreitems: this.handleShowMoreItemsClick
196
214
  }, null)]
197
215
  });
198
- }, this) : r(c, {
216
+ }, this) : n(m, {
199
217
  nested: !0,
200
218
  resources: this.ks.props.resources,
201
219
  group: this.ks.props.group,
@@ -205,12 +223,12 @@ const ie = /* @__PURE__ */ I({
205
223
  viewSlot: this.$props.viewSlot,
206
224
  monthSlots: o,
207
225
  ranges: this.ranges,
208
- itemsPerSlot: s,
226
+ itemsPerSlot: r,
209
227
  editable: this.$props.editable,
210
228
  onShowmoreitems: this.handleShowMoreItemsClick
211
229
  }
212
230
  }, null);
213
- return r(D, {
231
+ return n(b, {
214
232
  viewProps: {
215
233
  ...this.$props
216
234
  },
@@ -218,30 +236,30 @@ const ie = /* @__PURE__ */ I({
218
236
  ranges: this.ranges,
219
237
  class: "k-scheduler-monthview"
220
238
  }, {
221
- default: () => [r("div", {
239
+ default: () => [n("div", {
222
240
  class: "k-scheduler-head"
223
- }, [this.ks.orientation === "horizontal" ? r(p, {
241
+ }, [this.ks.orientation === "horizontal" ? n(f, {
224
242
  nested: !0,
225
243
  resources: this.ks.props.resources,
226
244
  group: this.ks.props.group
227
245
  }, {
228
- default: () => [r(g, {
246
+ default: () => [n(w, {
229
247
  monthSlots: o,
230
248
  dateHeaderCell: this.$props.dateHeaderCell
231
249
  }, null)]
232
- }) : r(c, {
250
+ }) : n(m, {
233
251
  resources: this.ks.props.resources,
234
252
  group: this.ks.props.group
235
253
  }, {
236
- default: () => [r(g, {
254
+ default: () => [n(w, {
237
255
  monthSlots: o,
238
256
  dateHeaderCell: this.$props.dateHeaderCell
239
257
  }, null)]
240
- })]), r("div", {
258
+ })]), n("div", {
241
259
  class: "k-scheduler-body",
242
260
  ref: "body"
243
- }, [a, this.hasMounted && n.filter((e) => e.order === null || e.order < s).sort($).map(function(e) {
244
- return r(t, {
261
+ }, [l, this.hasMounted && s.filter((e) => e.order === null || e.order < r).sort(F).map(function(e) {
262
+ return n(t, {
245
263
  item: this.$props.item,
246
264
  viewItem: this.$props.viewItem,
247
265
  form: this.$props.form,
@@ -279,15 +297,34 @@ const ie = /* @__PURE__ */ I({
279
297
  editable: this.$props.editable,
280
298
  ignoreIsAllDay: !0
281
299
  }, null);
282
- }, this)]), r(j, {
300
+ }, this)]), n(G, {
283
301
  show: this.popoverShow,
284
302
  anchor: this.popoverAnchor,
285
303
  slot: this.popoverSlot,
286
- items: n,
287
- itemsPerSlot: s,
304
+ items: s,
305
+ itemsPerSlot: r,
288
306
  onDayclick: this.handlePopoverDayClick,
307
+ onItemdoubleclick: (e) => {
308
+ this.handlePopoverItemDoubleClick(e) && this.handlePopoverClose();
309
+ },
289
310
  onClose: this.handlePopoverClose
290
- }, null)]
311
+ }, null), this.popoverEditItem && n(t, k(this.popoverEditItem, {
312
+ item: this.$props.item,
313
+ viewItem: this.$props.viewItem,
314
+ form: this.$props.form,
315
+ formItem: this.popoverFormItem,
316
+ showOccurrenceDialog: this.popoverShowOccurrenceDialog,
317
+ itemStyle: {
318
+ display: "none"
319
+ },
320
+ tabIndex: -1,
321
+ editable: this.$props.editable,
322
+ vertical: !1,
323
+ ignoreIsAllDay: !0,
324
+ onFormitemchange: this.handlePopoverFormItemChange,
325
+ onShowoccurrencedialogchange: this.handlePopoverShowOccurrenceDialogChange,
326
+ onDataaction: this.handleDataAction
327
+ }), null)]
291
328
  });
292
329
  },
293
330
  methods: {
@@ -302,32 +339,32 @@ const ie = /* @__PURE__ */ I({
302
339
  this.rowSyncFrame = void 0;
303
340
  return;
304
341
  }
305
- N(this.$refs.body), this.rowSyncFrame = void 0;
342
+ _(this.$refs.body), this.rowSyncFrame = void 0;
306
343
  });
307
344
  },
308
345
  handleShowMoreItemsClick({
309
346
  event: t,
310
- slot: n
347
+ slot: s
311
348
  }) {
312
- var s;
313
- const o = ((s = t.target) == null ? void 0 : s.element) || null;
349
+ var r;
350
+ const o = ((r = t.target) == null ? void 0 : r.element) || null;
314
351
  if (this.popoverShow && this.popoverAnchor === o) {
315
352
  this.popoverShow = !1, this.popoverAnchor = null, this.popoverSlot = null;
316
353
  return;
317
354
  }
318
- this.popoverShow = !0, this.popoverAnchor = o, this.popoverSlot = n || null;
355
+ this.popoverShow = !0, this.popoverAnchor = o, this.popoverSlot = s || null;
319
356
  },
320
357
  handlePopoverClose() {
321
358
  this.popoverShow = !1, this.popoverAnchor = null, this.popoverSlot = null;
322
359
  },
323
360
  handlePopoverDayClick(t) {
324
- const o = this.ks.views.find((s) => s.name === "day");
361
+ const o = this.ks.views.find((r) => r.name === "day");
325
362
  !this.setActiveViewName || !o || !o.name || (this.popoverShow = !1, this.popoverAnchor = null, this.popoverSlot = null, this.$nextTick(() => {
326
363
  this.setActiveViewName(o.name), this.setActiveDate(t.start);
327
364
  }));
328
365
  },
329
366
  handleDataAction(t) {
330
- this.$emit("dataaction", t);
367
+ A(this, t);
331
368
  },
332
369
  handleDragItemChange(t) {
333
370
  this.currentDragItem = t;
@@ -336,19 +373,19 @@ const ie = /* @__PURE__ */ I({
336
373
  this.currentResizeItem = t;
337
374
  }
338
375
  }
339
- }), H = ({
376
+ }), K = ({
340
377
  intl: t,
341
- date: n,
378
+ date: s,
342
379
  timezone: o
343
380
  }) => {
344
- const s = h(R(l(n)), t.firstDay()), a = k(h(z(l(n)), t.firstDay()), w), e = u.fromUTCDate(m(s), o), i = u.fromUTCDate(m(a), o), y = new Date(e.getTime()), v = new Date(i.getTime());
381
+ const r = u($(c(s)), t.firstDay()), l = z(u(C(c(s)), t.firstDay()), y), e = d.fromUTCDate(g(r), o), a = d.fromUTCDate(g(l), o), i = new Date(e.getTime()), I = new Date(a.getTime());
345
382
  return {
346
- start: y,
347
- end: v,
383
+ start: i,
384
+ end: I,
348
385
  zonedStart: e,
349
- zonedEnd: i
386
+ zonedEnd: a
350
387
  };
351
388
  };
352
389
  export {
353
- ie as MonthView
390
+ de as MonthView
354
391
  };
@@ -18,7 +18,7 @@ export interface MonthViewBodyProps {
18
18
  ranges: any[];
19
19
  slotRender: any;
20
20
  viewSlot: any;
21
- onDataaction: (action: DataAction) => void;
21
+ onDataAction: (action: DataAction) => void;
22
22
  }
23
23
  /** @hidden */
24
24
  declare const MonthViewBody: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
@@ -30,7 +30,7 @@ declare const MonthViewBody: import('vue').DefineComponent<import('vue').Extract
30
30
  ranges: PropType<any[]>;
31
31
  slotRender: PropType<any>;
32
32
  viewSlot: PropType<any>;
33
- onDataaction: PropType<(action: DataAction) => void>;
33
+ onDataAction: PropType<(action: DataAction) => void>;
34
34
  onShowmoreitems: PropType<(event: any) => void>;
35
35
  }>, {}, {
36
36
  ksSlots: {
@@ -51,7 +51,7 @@ declare const MonthViewBody: import('vue').DefineComponent<import('vue').Extract
51
51
  ranges: PropType<any[]>;
52
52
  slotRender: PropType<any>;
53
53
  viewSlot: PropType<any>;
54
- onDataaction: PropType<(action: DataAction) => void>;
54
+ onDataAction: PropType<(action: DataAction) => void>;
55
55
  onShowmoreitems: PropType<(event: any) => void>;
56
56
  }>> & Readonly<{
57
57
  onShowmoreitems?: (...args: any[]) => any;
@@ -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 r=require("vue"),d=require("../../slots/SchedulerEditSlot.js"),a=require("@progress/kendo-vue-common"),h=require("@progress/kendo-vue-intl"),u=r.defineComponent({name:"KendoMonthViewBody",emits:["dataaction","showmoreitems"],props:{editable:[Object,Boolean],groupIndex:Number,rangeIndex:Number,itemsPerSlot:Number,monthSlots:Array,ranges:Array,slotRender:[String,Function,Object],viewSlot:[String,Function,Object],onDataaction:Function,onShowmoreitems:Function},inject:{ri:{default:{}},ks:{default:null},setActiveDate:{default:null},setActiveViewName:{default:null},setSlots:{default:null},kendoIntlService:{default:null}},provide(){return{ksSlots:this.ksSlots}},data(){const t=this.groupIndex!==void 0?this.groupIndex:this.ri.groupIndex;return{ksSlots:{cSlots:this.monthSlots.filter(e=>e.group.index===t&&e.range.index===this.rangeIndex)}}},watch:{currentCellSlots(t){this.ksSlots.cSlots=t}},computed:{currentCellSlots(){const t=this.groupIndex!==void 0?this.groupIndex:this.ri.groupIndex;return this.monthSlots.filter(e=>e.group.index===t&&e.range.index===this.rangeIndex)}},render(){this.intl=h.provideIntlService(this);const t=this.$props.editSlot||d.SchedulerEditSlot,e=this,i=this.groupIndex!==void 0?this.groupIndex:this.ri.groupIndex;return r.createVNode("div",{class:"k-scheduler-row",key:this.rangeIndex},[this.currentCellSlots.map(function(n,o,s){return r.createVNode(t,{className:a.classNames({"k-other-month":this.isOtherMonth(n,this.ks.currentDate)}),slotRender:this.$props.slotRender,viewSlot:e.$props.viewSlot,form:e.$props.form,index:o,navDay:!0,itemsPerSlot:e.itemsPerSlot,expandable:{offsetTop:30,offsetBottom:e.itemsPerSlot<n.items.length?15:0},onDataaction:e.handleDataAction,col:e.ks.orientation==="horizontal"?s.length*(i||0)+o:o,row:e.ks.orientation==="horizontal"?e.rangeIndex:e.ranges.length*(i||0)+e.rangeIndex,editable:e.$props.editable,onShowmoreitems:l=>e.handleShowMoreItemsClick(l,n)},null)},this)])},methods:{handleShowMoreItemsClick(t,e){this.$emit("showmoreitems",{event:t,slot:e})},handleDataAction(t){this.$emit("dataaction",t)},isOtherMonth(t,e){return t.start.getMonth()<e.getMonth()||t.start.getMonth()>e.getMonth()}}});exports.MonthViewBody=u;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue"),a=require("../../slots/SchedulerEditSlot.js"),h=require("@progress/kendo-vue-common"),u=require("@progress/kendo-vue-intl"),c=require("../../utils/main.js"),m=r.defineComponent({name:"KendoMonthViewBody",emits:["dataaction","showmoreitems"],props:{editable:[Object,Boolean],groupIndex:Number,rangeIndex:Number,itemsPerSlot:Number,monthSlots:Array,ranges:Array,slotRender:[String,Function,Object],viewSlot:[String,Function,Object],onDataAction:Function,onShowmoreitems:Function},inject:{ri:{default:{}},ks:{default:null},setActiveDate:{default:null},setActiveViewName:{default:null},setSlots:{default:null},kendoIntlService:{default:null}},provide(){return{ksSlots:this.ksSlots}},data(){const t=this.groupIndex!==void 0?this.groupIndex:this.ri.groupIndex;return{ksSlots:{cSlots:this.monthSlots.filter(e=>e.group.index===t&&e.range.index===this.rangeIndex)}}},watch:{currentCellSlots(t){this.ksSlots.cSlots=t}},computed:{currentCellSlots(){const t=this.groupIndex!==void 0?this.groupIndex:this.ri.groupIndex;return this.monthSlots.filter(e=>e.group.index===t&&e.range.index===this.rangeIndex)}},render(){var s;this.intl=u.provideIntlService(this);const t=this.$props.editSlot||((s=this.ks)==null?void 0:s.editSlot)||a.SchedulerEditSlot,e=this,i=this.groupIndex!==void 0?this.groupIndex:this.ri.groupIndex;return r.createVNode("div",{class:"k-scheduler-row",key:this.rangeIndex},[this.currentCellSlots.map(function(n,o,l){return r.createVNode(t,{className:h.classNames({"k-other-month":this.isOtherMonth(n,this.ks.currentDate)}),slotRender:this.$props.slotRender,viewSlot:e.$props.viewSlot,form:e.$props.form,index:o,navDay:!0,itemsPerSlot:e.itemsPerSlot,expandable:{offsetTop:30,offsetBottom:e.itemsPerSlot<n.items.length?15:0},onDataaction:e.handleDataAction,col:e.ks.orientation==="horizontal"?l.length*(i||0)+o:o,row:e.ks.orientation==="horizontal"?e.rangeIndex:e.ranges.length*(i||0)+e.rangeIndex,editable:e.$props.editable,onShowmoreitems:d=>e.handleShowMoreItemsClick(d,n)},null)},this)])},methods:{handleShowMoreItemsClick(t,e){this.$emit("showmoreitems",{event:t,slot:e})},handleDataAction(t){c.emitDataAction(this,t)},isOtherMonth(t,e){return t.start.getMonth()<e.getMonth()||t.start.getMonth()>e.getMonth()}}});exports.MonthViewBody=m;
@@ -5,11 +5,12 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { defineComponent as a, createVNode as i } from "vue";
9
- import { SchedulerEditSlot as d } from "../../slots/SchedulerEditSlot.mjs";
10
- import { classNames as h } from "@progress/kendo-vue-common";
11
- import { provideIntlService as u } from "@progress/kendo-vue-intl";
12
- const S = /* @__PURE__ */ a({
8
+ import { defineComponent as a, createVNode as s } from "vue";
9
+ import { SchedulerEditSlot as h } from "../../slots/SchedulerEditSlot.mjs";
10
+ import { classNames as u } from "@progress/kendo-vue-common";
11
+ import { provideIntlService as m } from "@progress/kendo-vue-intl";
12
+ import { emitDataAction as c } from "../../utils/main.mjs";
13
+ const I = /* @__PURE__ */ a({
13
14
  name: "KendoMonthViewBody",
14
15
  emits: ["dataaction", "showmoreitems"],
15
16
  props: {
@@ -21,7 +22,7 @@ const S = /* @__PURE__ */ a({
21
22
  ranges: Array,
22
23
  slotRender: [String, Function, Object],
23
24
  viewSlot: [String, Function, Object],
24
- onDataaction: Function,
25
+ onDataAction: Function,
25
26
  onShowmoreitems: Function
26
27
  },
27
28
  inject: {
@@ -69,14 +70,15 @@ const S = /* @__PURE__ */ a({
69
70
  }
70
71
  },
71
72
  render() {
72
- this.intl = u(this);
73
- const e = this.$props.editSlot || d, t = this, r = this.groupIndex !== void 0 ? this.groupIndex : this.ri.groupIndex;
74
- return i("div", {
73
+ var i;
74
+ this.intl = m(this);
75
+ const e = this.$props.editSlot || ((i = this.ks) == null ? void 0 : i.editSlot) || h, t = this, r = this.groupIndex !== void 0 ? this.groupIndex : this.ri.groupIndex;
76
+ return s("div", {
75
77
  class: "k-scheduler-row",
76
78
  key: this.rangeIndex
77
- }, [this.currentCellSlots.map(function(o, n, s) {
78
- return i(e, {
79
- className: h({
79
+ }, [this.currentCellSlots.map(function(o, n, l) {
80
+ return s(e, {
81
+ className: u({
80
82
  "k-other-month": this.isOtherMonth(o, this.ks.currentDate)
81
83
  }),
82
84
  slotRender: this.$props.slotRender,
@@ -90,10 +92,10 @@ const S = /* @__PURE__ */ a({
90
92
  offsetBottom: t.itemsPerSlot < o.items.length ? 15 : 0
91
93
  },
92
94
  onDataaction: t.handleDataAction,
93
- col: t.ks.orientation === "horizontal" ? s.length * (r || 0) + n : n,
95
+ col: t.ks.orientation === "horizontal" ? l.length * (r || 0) + n : n,
94
96
  row: t.ks.orientation === "horizontal" ? t.rangeIndex : t.ranges.length * (r || 0) + t.rangeIndex,
95
97
  editable: t.$props.editable,
96
- onShowmoreitems: (l) => t.handleShowMoreItemsClick(l, o)
98
+ onShowmoreitems: (d) => t.handleShowMoreItemsClick(d, o)
97
99
  }, null);
98
100
  }, this)]);
99
101
  },
@@ -105,7 +107,7 @@ const S = /* @__PURE__ */ a({
105
107
  });
106
108
  },
107
109
  handleDataAction(e) {
108
- this.$emit("dataaction", e);
110
+ c(this, e);
109
111
  },
110
112
  isOtherMonth(e, t) {
111
113
  return e.start.getMonth() < t.getMonth() || e.start.getMonth() > t.getMonth();
@@ -113,5 +115,5 @@ const S = /* @__PURE__ */ a({
113
115
  }
114
116
  });
115
117
  export {
116
- S as MonthViewBody
118
+ I as MonthViewBody
117
119
  };
@@ -240,7 +240,7 @@ declare const MultiDayTimelineView: import('vue').DefineComponent<import('vue').
240
240
  type: PropType<boolean | EditableProp>;
241
241
  default: boolean;
242
242
  };
243
- onDataaction: PropType<(action: DataAction) => void>;
243
+ onDataAction: PropType<(action: DataAction) => void>;
244
244
  }>, {}, {
245
245
  hasMounted: boolean;
246
246
  currentDragItem: any;
@@ -263,7 +263,7 @@ declare const MultiDayTimelineView: import('vue').DefineComponent<import('vue').
263
263
  handleDataAction(action: DataAction): void;
264
264
  handleDragItemChange(item: any): void;
265
265
  handleResizeItemChange(item: any): void;
266
- }, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
266
+ }, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "dataaction"[], "dataaction", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
267
267
  name: {
268
268
  type: PropType<string>;
269
269
  default: string;
@@ -359,8 +359,10 @@ declare const MultiDayTimelineView: import('vue').DefineComponent<import('vue').
359
359
  type: PropType<boolean | EditableProp>;
360
360
  default: boolean;
361
361
  };
362
- onDataaction: PropType<(action: DataAction) => void>;
363
- }>> & Readonly<{}>, {
362
+ onDataAction: PropType<(action: DataAction) => void>;
363
+ }>> & Readonly<{
364
+ onDataaction?: (...args: any[]) => any;
365
+ }>, {
364
366
  title: string | ((localization: import('@progress/kendo-vue-intl').LocalizationService) => string);
365
367
  name: string;
366
368
  step: number;
@@ -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 n=require("vue"),f=require("../../components/BaseView.js"),o=require("@progress/kendo-date-math"),S=require("../common/HorizontalResourceIterator.js"),D=require("./TimelineViewRowContent.js"),k=require("./TimelineViewAllEventsRowContent.js"),g=require("../common/VerticalResourceIterator.js"),s=require("../../utils/main.js"),T=require("../../services/rangeService.js"),R=require("../../services/slotsService.js"),v=require("../../services/occurrenceService.js"),b=require("../../services/itemsService.js"),I=require("./TimelineViewBody.js"),z=require("../../constants/main.js"),m=require("@progress/kendo-vue-intl"),$=require("../../items/SchedulerEditItem.js"),E=require("../../components/DateHeaderCell.js"),C=require("../../components/TimeHeaderCell.js"),V=require("../../hooks/useRowSync.js"),w=require("../../hooks/useCellSync.js");function y(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!n.isVNode(t)}const O="t",q=0,N=n.defineComponent({name:"KendoMultiDayTimelineView",props:{name:{type:String,default:"multi-day-timeline"},title:{type:String,default:"Multi Day Timeline"},currentTimeMarker:{type:Boolean,default:!0},dragItem:{type:Object,default:function(){}},resizeItem:{type:Object,default:function(){}},showWorkHours:{type:Boolean,default:!0},dateRange:{type:[Function,Object],default:function(){return M}},selectedDateFormat:{type:String,default:"{0:M}"},selectedShortDateFormat:{type:String,default:"{0:m}"},step:{type:Number,default:1},numberOfDays:{type:Number,default:1},startTime:{type:String,default:"00:00"},endTime:{type:String,default:"00:00"},workDayStart:{type:String,default:"8:00"},workDayEnd:{type:String,default:"17:00"},workWeekStart:{type:Number,default:o.Day.Monday},workWeekEnd:{type:Number,default:o.Day.Friday},slotDivisions:{type:Number,default:2},slotDuration:{type:Number,default:60},defaultShowWorkHours:{type:Boolean,default:!0},columnWidth:{type:Number,default:100},dateHeaderCell:[String,Function,Object],timeHeaderCell:[String,Function,Object],slotRender:[String,Function,Object],viewSlot:[String,Function,Object],resizeHint:[String,Function,Object],item:[String,Function,Object],viewItem:[String,Function,Object],editable:{type:[Boolean,Object],default:!1},onDataaction:Function},data(){return{hasMounted:!1,currentDragItem:void 0,currentResizeItem:void 0,rowSyncTimeout:void 0,rowSyncObserver:null}},inject:{ks:{default:null},kendoIntlService:{default:null}},computed:{viewStart(){this.intl=m.provideIntlService(this);const t=this.intl.parseDate(this.$props.workDayStart),r=this.intl.parseDate(this.$props.startTime);return this.showWorkHours?t:r},viewEnd(){this.intl=m.provideIntlService(this);const t=this.intl.parseDate(this.$props.workDayEnd),r=this.intl.parseDate(this.$props.endTime);return this.showWorkHours?t:r},ranges(){return T.toRanges(this.ks.dateRange,{step:o.MS_PER_DAY,timezone:this.ks.timezone})},timelineSlots(){return R.toSlots(this.ks.dateRange,{step:this.slotDuration/this.slotDivisions*o.MS_PER_MINUTE},{groups:this.ks.groups,ranges:this.ranges}).filter(r=>s.isInTimeRange(r.zonedStart,this.viewStart,this.viewEnd)||this.viewStart.getTime()===this.viewEnd.getTime())},occurrences(){return v.toOccurrences(this.ks.dataItems,{dateRange:this.ks.dateRange,fields:this.ks.fields,timezone:this.ks.timezone})},items(){const t=b.toItems(this.occurrences,{timezone:this.ks.timezone},{groups:this.ks.groups,ranges:this.ranges}).filter(r=>this.viewStart.getTime()===this.viewEnd.getTime()||s.isInTimeRange(r.zonedStart,this.viewStart,this.viewEnd)||s.isInTimeRange(r.zonedEnd,this.viewStart,this.viewEnd)||s.isInTimeRange(new Date(r.zonedEnd.getTime()-(r.zonedEnd.getTime()-r.zonedStart.getTime())/2),this.viewStart,this.viewEnd));return s.mapItemsToSlots(t,this.timelineSlots,!0),s.mapSlotsToItems(t,this.timelineSlots,!0),t},compDragItem(){return this.dragItem!==void 0?this.dragItem:this.currentDragItem},compResizeItem(){return this.resizeItem!==void 0?this.resizeItem:this.currentResizeItem}},mounted(){this.timeRef=null,this.bodyRef=null,this.hasMounted=!0,w.useCellSync({element:this.$el,selector:".k-resource-cell",attribute:"data-depth-index",explicitDepth:!0}),this.scheduleRowSync(),this.observeSlotChanges()},unmounted(){this.rowSyncTimeout!==void 0&&window.cancelAnimationFrame(this.rowSyncTimeout),this.rowSyncObserver&&(this.rowSyncObserver.disconnect(),this.rowSyncObserver=null)},updated(){w.useCellSync({element:this.$el,selector:".k-resource-cell",attribute:"data-depth-index",explicitDepth:!0}),this.scheduleRowSync()},render(){const t=m.provideIntlService(this),r=this.$props.slotDuration,u=t.parseDate(this.$props.workDayStart),d=t.parseDate(this.$props.workDayEnd),p=[...this.items],a=[...this.timelineSlots],c=(this.ks.orientation==="horizontal"?a.length:a.length/this.ks.groups.length)*(this.$props.columnWidth+z.BORDER_WIDTH),i=[n.createVNode("div",{class:"k-scheduler-row"},[this.ranges.map(function(e,h){return n.createVNode(E.DateHeaderCell,{as:this.$props.dateHeaderCell,key:h,date:e.zonedStart,start:e.start,end:e.end,format:"m"},null)},this)]),n.createVNode("div",{class:"k-scheduler-row",ref:"timeRef"},[this.ranges.map(function(e,h){return a.filter(l=>l.group.index===q&&l.range.index===h).map(function(l){return l.zonedStart.getMinutes()%r===0?n.createVNode(C.TimeHeaderCell,{key:l.index,as:this.$props.timeHeaderCell,format:O,date:l.zonedStart,start:l.zonedStart,end:l.zonedEnd},null):null},this)},this)])];return n.createVNode(f.BaseView,{id:this.$props.id,class:"k-scheduler-timelineview",viewProps:{...this.$props},baseSlots:a,ranges:this.ranges},{default:()=>[n.createVNode("div",{class:"k-scheduler-head",style:{width:c+"px"}},[this.ks.orientation==="horizontal"?n.createVNode(S.HorizontalResourceIterator,{nested:!0,group:this.ks.props.group,resources:this.ks.props.resources,rowContent:D.TimelineViewRowContent},y(i)?i:{default:()=>[i]}):n.createVNode(g.VerticalResourceIterator,{wrapGroup:!0,group:this.ks.props.group,resources:this.ks.props.resources,editable:this.$props.editable},y(i)?i:{default:()=>[i]})]),n.createVNode("div",{class:"k-scheduler-body",style:{width:c+"px"},ref:"bodyRef"},[this.ks.orientation==="horizontal"?n.createVNode(S.HorizontalResourceIterator,{group:this.ks.props.group,resources:this.ks.props.resources,rowContent:k.TimelineViewAllEventsRowContent},{default:()=>[n.createVNode(I.TimelineViewBody,{editable:this.$props.editable,slotRender:this.$props.slotRender,viewSlot:this.$props.viewSlot,ranges:this.ranges,workDayStart:u,workDayEnd:d,timelineSlots:a,onDataaction:this.handleDataAction},null)]}):n.createVNode(g.VerticalResourceIterator,{nested:!0,wrapGroup:!0,group:this.ks.props.group,resources:this.ks.props.resources,onDataaction:this.handleDataAction,more:{ranges:this.ranges,workDayStart:u,workDayEnd:d,timelineSlots:a,slotRender:this.$props.slotRender,viewSlot:this.$props.viewSlot,editable:this.$props.editable,currentTimeMarker:this.$props.currentTimeMarker}},null),this.hasMounted&&p.sort(s.orderSort).map(function(e){return n.createVNode($.SchedulerEditItem,{key:e.isRecurring?`${e.uid}:${e.group.index}:${e.range.index}:${e.originalStart}`:`${e.uid}:${e.group.index}:${e.range.index}`,uid:e.uid,start:e.start,end:e.end,originalStart:e.originalStart,startTimezone:e.startTimezone,endTimezone:e.endTimezone,isAllDay:e.isAllDay,title:e.title,description:e.description,occurrenceId:e.occurrenceId,recurrenceExceptions:e.recurrenceExceptions,recurrenceRule:e.recurrenceRule,recurrenceId:e.recurrenceId,dataItem:e.dataItem,itemRef:e.itemRef,head:e.head,tail:e.tail,order:e.order,zonedStart:e.zonedStart,zonedEnd:e.zonedEnd,slots:e.slots,group:e.group,range:e.range,isException:e.isException,isRecurring:e.isRecurring,readonly:e.readonly,format:"t",form:this.$props.form,onDragitemchange:this.handleDragItemChange,onResizeitemchange:this.handleResizeItemChange,onDataaction:this.handleDataAction,item:this.$props.item,viewItem:this.$props.viewItem,editable:this.$props.editable,ignoreIsAllDay:!0,vertical:!1},null)},this)])]})},methods:{scheduleRowSync(){this.rowSyncTimeout!==void 0&&window.cancelAnimationFrame(this.rowSyncTimeout),this.rowSyncTimeout=window.requestAnimationFrame(()=>{this.rowSyncTimeout=window.requestAnimationFrame(()=>{this.runRowSync()})})},runRowSync(){const t=this.$el?this.$el.closest(".k-scheduler-layout"):null;t&&V.useRowSync({element:t,selector:".k-resource-row",horizontalAttribute:"data-depth-index",verticalAttribute:"data-resource-index",applyTo:".k-resource-cell"})},observeSlotChanges(){const t=this.$el?this.$el.querySelector(".k-scheduler-body"):null;t&&(this.rowSyncObserver=new MutationObserver(r=>{r.some(d=>d.target instanceof HTMLElement&&d.target.classList.contains("k-slot-cell"))&&this.scheduleRowSync()}),this.rowSyncObserver.observe(t,{attributes:!0,attributeFilter:["style"],subtree:!0}))},handleDataAction(t){this.$emit("dataaction",t)},handleDragItemChange(t){this.currentDragItem=t},handleResizeItemChange(t){this.currentResizeItem=t}}}),M=({date:t,numberOfDays:r=1,timezone:u})=>{const d=o.ZonedDate.fromLocalDate(t,u),p=o.getDate(d),a=o.addDays(p,r),c=o.ZonedDate.fromUTCDate(s.toUTCDateTime(p),u),i=o.ZonedDate.fromUTCDate(s.toUTCDateTime(a),u),e=new Date(c.getTime()),h=new Date(i.getTime());return{start:e,end:h,zonedStart:c,zonedEnd:i}};exports.MultiDayTimelineView=N;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue"),D=require("../../components/BaseView.js"),s=require("@progress/kendo-date-math"),S=require("../common/HorizontalResourceIterator.js"),k=require("./TimelineViewRowContent.js"),b=require("./TimelineViewAllEventsRowContent.js"),g=require("../common/VerticalResourceIterator.js"),c=require("../../utils/main.js"),R=require("../../services/rangeService.js"),T=require("../../services/slotsService.js"),v=require("../../services/occurrenceService.js"),y=require("../../services/itemsService.js"),I=require("./TimelineViewBody.js"),z=require("../../constants/main.js"),m=require("@progress/kendo-vue-intl"),$=require("../../items/SchedulerEditItem.js"),E=require("../../components/DateHeaderCell.js"),C=require("../../components/TimeHeaderCell.js"),V=require("../../hooks/useRowSync.js"),w=require("../../hooks/useCellSync.js");function f(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!r.isVNode(t)}const O="t",q=0,N=r.defineComponent({name:"KendoMultiDayTimelineView",emits:["dataaction"],props:{name:{type:String,default:"multi-day-timeline"},title:{type:String,default:"Multi Day Timeline"},currentTimeMarker:{type:Boolean,default:!0},dragItem:{type:Object,default:function(){}},resizeItem:{type:Object,default:function(){}},showWorkHours:{type:Boolean,default:!0},dateRange:{type:[Function,Object],default:function(){return M}},selectedDateFormat:{type:String,default:"{0:M}"},selectedShortDateFormat:{type:String,default:"{0:m}"},step:{type:Number,default:1},numberOfDays:{type:Number,default:1},startTime:{type:String,default:"00:00"},endTime:{type:String,default:"00:00"},workDayStart:{type:String,default:"8:00"},workDayEnd:{type:String,default:"17:00"},workWeekStart:{type:Number,default:s.Day.Monday},workWeekEnd:{type:Number,default:s.Day.Friday},slotDivisions:{type:Number,default:2},slotDuration:{type:Number,default:60},defaultShowWorkHours:{type:Boolean,default:!0},columnWidth:{type:Number,default:100},dateHeaderCell:[String,Function,Object],timeHeaderCell:[String,Function,Object],slotRender:[String,Function,Object],viewSlot:[String,Function,Object],resizeHint:[String,Function,Object],item:[String,Function,Object],viewItem:[String,Function,Object],editable:{type:[Boolean,Object],default:!1},onDataAction:Function},data(){return{hasMounted:!1,currentDragItem:void 0,currentResizeItem:void 0,rowSyncTimeout:void 0,rowSyncObserver:null}},inject:{ks:{default:null},kendoIntlService:{default:null}},computed:{viewStart(){this.intl=m.provideIntlService(this);const t=this.intl.parseDate(this.$props.workDayStart),n=this.intl.parseDate(this.$props.startTime);return this.showWorkHours?t:n},viewEnd(){this.intl=m.provideIntlService(this);const t=this.intl.parseDate(this.$props.workDayEnd),n=this.intl.parseDate(this.$props.endTime);return this.showWorkHours?t:n},ranges(){return R.toRanges(this.ks.dateRange,{step:s.MS_PER_DAY,timezone:this.ks.timezone})},timelineSlots(){return T.toSlots(this.ks.dateRange,{step:this.slotDuration/this.slotDivisions*s.MS_PER_MINUTE},{groups:this.ks.groups,ranges:this.ranges}).filter(n=>c.isInTimeRange(n.zonedStart,this.viewStart,this.viewEnd)||this.viewStart.getTime()===this.viewEnd.getTime())},occurrences(){return v.toOccurrences(this.ks.dataItems,{dateRange:this.ks.dateRange,fields:this.ks.fields,timezone:this.ks.timezone})},items(){const t=y.toItems(this.occurrences,{timezone:this.ks.timezone},{groups:this.ks.groups,ranges:this.ranges}).filter(n=>y.inTimeRange(n,this.viewStart,this.viewEnd));return c.mapItemsToSlots(t,this.timelineSlots,!0),c.mapSlotsToItems(t,this.timelineSlots,!0),t},compDragItem(){return this.dragItem!==void 0?this.dragItem:this.currentDragItem},compResizeItem(){return this.resizeItem!==void 0?this.resizeItem:this.currentResizeItem}},mounted(){this.timeRef=null,this.bodyRef=null,this.hasMounted=!0,w.useCellSync({element:this.$el,selector:".k-resource-cell",attribute:"data-depth-index",explicitDepth:!0}),this.scheduleRowSync(),this.observeSlotChanges()},unmounted(){this.rowSyncTimeout!==void 0&&window.cancelAnimationFrame(this.rowSyncTimeout),this.rowSyncObserver&&(this.rowSyncObserver.disconnect(),this.rowSyncObserver=null)},updated(){w.useCellSync({element:this.$el,selector:".k-resource-cell",attribute:"data-depth-index",explicitDepth:!0}),this.scheduleRowSync()},render(){const t=m.provideIntlService(this),n=this.$props.slotDuration,l=t.parseDate(this.$props.workDayStart),u=t.parseDate(this.$props.workDayEnd),p=[...this.items],o=[...this.timelineSlots],d=(this.ks.orientation==="horizontal"?o.length:o.length/this.ks.groups.length)*(this.$props.columnWidth+z.BORDER_WIDTH),i=[r.createVNode("div",{class:"k-scheduler-row"},[this.ranges.map(function(e,h){return r.createVNode(E.DateHeaderCell,{as:this.$props.dateHeaderCell,key:h,date:e.zonedStart,start:e.start,end:e.end,format:"m"},null)},this)]),r.createVNode("div",{class:"k-scheduler-row",ref:"timeRef"},[this.ranges.map(function(e,h){return o.filter(a=>a.group.index===q&&a.range.index===h).map(function(a){return a.zonedStart.getMinutes()%n===0?r.createVNode(C.TimeHeaderCell,{key:a.index,as:this.$props.timeHeaderCell,format:O,date:a.zonedStart,start:a.zonedStart,end:a.zonedEnd},null):null},this)},this)])];return r.createVNode(D.BaseView,{id:this.$props.id,class:"k-scheduler-timelineview",viewProps:{...this.$props},baseSlots:o,ranges:this.ranges},{default:()=>[r.createVNode("div",{class:"k-scheduler-head",style:{width:d+"px"}},[this.ks.orientation==="horizontal"?r.createVNode(S.HorizontalResourceIterator,{nested:!0,group:this.ks.props.group,resources:this.ks.props.resources,rowContent:k.TimelineViewRowContent},f(i)?i:{default:()=>[i]}):r.createVNode(g.VerticalResourceIterator,{wrapGroup:!0,group:this.ks.props.group,resources:this.ks.props.resources,editable:this.$props.editable},f(i)?i:{default:()=>[i]})]),r.createVNode("div",{class:"k-scheduler-body",style:{width:d+"px"},ref:"bodyRef"},[this.ks.orientation==="horizontal"?r.createVNode(S.HorizontalResourceIterator,{group:this.ks.props.group,resources:this.ks.props.resources,rowContent:b.TimelineViewAllEventsRowContent},{default:()=>[r.createVNode(I.TimelineViewBody,{editable:this.$props.editable,slotRender:this.$props.slotRender,viewSlot:this.$props.viewSlot,ranges:this.ranges,workDayStart:l,workDayEnd:u,timelineSlots:o,onDataaction:this.handleDataAction},null)]}):r.createVNode(g.VerticalResourceIterator,{nested:!0,wrapGroup:!0,group:this.ks.props.group,resources:this.ks.props.resources,onDataaction:this.handleDataAction,more:{ranges:this.ranges,workDayStart:l,workDayEnd:u,timelineSlots:o,slotRender:this.$props.slotRender,viewSlot:this.$props.viewSlot,editable:this.$props.editable,currentTimeMarker:this.$props.currentTimeMarker}},null),this.hasMounted&&p.sort(c.orderSort).map(function(e){return r.createVNode($.SchedulerEditItem,{key:e.isRecurring?`${e.uid}:${e.group.index}:${e.range.index}:${e.originalStart}`:`${e.uid}:${e.group.index}:${e.range.index}`,uid:e.uid,start:e.start,end:e.end,originalStart:e.originalStart,startTimezone:e.startTimezone,endTimezone:e.endTimezone,isAllDay:e.isAllDay,title:e.title,description:e.description,occurrenceId:e.occurrenceId,recurrenceExceptions:e.recurrenceExceptions,recurrenceRule:e.recurrenceRule,recurrenceId:e.recurrenceId,dataItem:e.dataItem,itemRef:e.itemRef,head:e.head,tail:e.tail,order:e.order,zonedStart:e.zonedStart,zonedEnd:e.zonedEnd,slots:e.slots,group:e.group,range:e.range,isException:e.isException,isRecurring:e.isRecurring,readonly:e.readonly,format:"t",form:this.$props.form,onDragitemchange:this.handleDragItemChange,onResizeitemchange:this.handleResizeItemChange,onDataaction:this.handleDataAction,item:this.$props.item,viewItem:this.$props.viewItem,editable:this.$props.editable,ignoreIsAllDay:!0,vertical:!1},null)},this)])]})},methods:{scheduleRowSync(){this.rowSyncTimeout!==void 0&&window.cancelAnimationFrame(this.rowSyncTimeout),this.rowSyncTimeout=window.requestAnimationFrame(()=>{this.rowSyncTimeout=window.requestAnimationFrame(()=>{this.runRowSync()})})},runRowSync(){const t=this.$el?this.$el.closest(".k-scheduler-layout"):null;t&&V.useRowSync({element:t,selector:".k-resource-row",horizontalAttribute:"data-depth-index",verticalAttribute:"data-resource-index",applyTo:".k-resource-cell"})},observeSlotChanges(){const t=this.$el?this.$el.querySelector(".k-scheduler-body"):null;t&&(this.rowSyncObserver=new MutationObserver(n=>{n.some(u=>u.target instanceof HTMLElement&&u.target.classList.contains("k-slot-cell"))&&this.scheduleRowSync()}),this.rowSyncObserver.observe(t,{attributes:!0,attributeFilter:["style"],subtree:!0}))},handleDataAction(t){c.emitDataAction(this,t)},handleDragItemChange(t){this.currentDragItem=t},handleResizeItemChange(t){this.currentResizeItem=t}}}),M=({date:t,numberOfDays:n=1,timezone:l})=>{const u=s.ZonedDate.fromLocalDate(t,l),p=s.getDate(u),o=s.addDays(p,n),d=s.ZonedDate.fromUTCDate(c.toUTCDateTime(p),l),i=s.ZonedDate.fromUTCDate(c.toUTCDateTime(o),l),e=new Date(d.getTime()),h=new Date(i.getTime());return{start:e,end:h,zonedStart:d,zonedEnd:i}};exports.MultiDayTimelineView=N;