@progress/kendo-vue-scheduler 9.3.0-develop.5 → 9.3.0-develop.6

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 (160) hide show
  1. package/Scheduler.d.ts +67 -4
  2. package/Scheduler.js +1 -1
  3. package/Scheduler.mjs +267 -115
  4. package/components/BaseView.js +1 -1
  5. package/components/BaseView.mjs +10 -4
  6. package/components/CurrentTimeMarker.js +1 -1
  7. package/components/CurrentTimeMarker.mjs +9 -9
  8. package/components/CurrentTimeMarkerArrow.js +1 -1
  9. package/components/CurrentTimeMarkerArrow.mjs +3 -3
  10. package/components/DateHeaderCell.js +1 -1
  11. package/components/DateHeaderCell.mjs +22 -13
  12. package/components/MoreEventsPopover.d.ts +77 -0
  13. package/components/MoreEventsPopover.js +8 -0
  14. package/components/MoreEventsPopover.mjs +125 -0
  15. package/components/SchedulerActionButtons.d.ts +6 -0
  16. package/components/SchedulerActionButtons.js +1 -1
  17. package/components/SchedulerActionButtons.mjs +25 -19
  18. package/components/SchedulerForm.d.ts +7 -0
  19. package/components/SchedulerForm.js +1 -1
  20. package/components/SchedulerForm.mjs +69 -61
  21. package/components/SchedulerOccurrenceDialog.d.ts +4 -4
  22. package/components/SchedulerOccurrenceDialog.js +1 -1
  23. package/components/SchedulerOccurrenceDialog.mjs +35 -26
  24. package/components/SchedulerRemoveDialog.d.ts +6 -0
  25. package/components/SchedulerRemoveDialog.js +1 -1
  26. package/components/SchedulerRemoveDialog.mjs +24 -23
  27. package/components/ShowMoreItemsButton.d.ts +10 -1
  28. package/components/ShowMoreItemsButton.js +1 -1
  29. package/components/ShowMoreItemsButton.mjs +40 -18
  30. package/components/footer/bussiness-hours/BusinessHours.js +1 -1
  31. package/components/footer/bussiness-hours/BusinessHours.mjs +16 -21
  32. package/components/header/SchedulerAdaptiveHeader.js +1 -1
  33. package/components/header/SchedulerAdaptiveHeader.mjs +28 -26
  34. package/components/header/SchedulerHeader.d.ts +5 -1
  35. package/components/header/SchedulerHeader.js +1 -1
  36. package/components/header/SchedulerHeader.mjs +11 -7
  37. package/components/header/navigation/NavigationDatePicker.d.ts +22 -3
  38. package/components/header/navigation/NavigationDatePicker.js +1 -1
  39. package/components/header/navigation/NavigationDatePicker.mjs +27 -30
  40. package/components/header/view-selector/ViewSelectorList.d.ts +26 -6
  41. package/components/header/view-selector/ViewSelectorList.js +1 -1
  42. package/components/header/view-selector/ViewSelectorList.mjs +55 -49
  43. package/dist/cdn/js/kendo-vue-scheduler.js +1 -1
  44. package/editors/RemoveRecurrenceConfirmDialog.d.ts +29 -0
  45. package/editors/RemoveRecurrenceConfirmDialog.js +8 -0
  46. package/editors/RemoveRecurrenceConfirmDialog.mjs +65 -0
  47. package/editors/ResourceEditor.d.ts +3 -0
  48. package/editors/ResourceEditor.js +1 -1
  49. package/editors/ResourceEditor.mjs +12 -10
  50. package/editors/SchedulerFormEditor.d.ts +1067 -2953
  51. package/editors/SchedulerFormEditor.js +1 -1
  52. package/editors/SchedulerFormEditor.mjs +297 -365
  53. package/editors/SchedulerRecurrenceDialog.d.ts +143 -0
  54. package/editors/SchedulerRecurrenceDialog.js +8 -0
  55. package/editors/SchedulerRecurrenceDialog.mjs +575 -0
  56. package/editors/TimezoneDropDownList.d.ts +46 -0
  57. package/editors/TimezoneDropDownList.js +8 -0
  58. package/editors/TimezoneDropDownList.mjs +63 -0
  59. package/editors/ZonedSplitDateTime.d.ts +65 -0
  60. package/editors/ZonedSplitDateTime.js +8 -0
  61. package/editors/ZonedSplitDateTime.mjs +100 -0
  62. package/hooks/main.d.ts +1 -0
  63. package/hooks/useGroupRowHeightSync.d.ts +10 -0
  64. package/hooks/useRecurrenceSummary.d.ts +10 -0
  65. package/hooks/useRecurrenceSummary.js +8 -0
  66. package/hooks/useRecurrenceSummary.mjs +74 -0
  67. package/hooks/useRowSync.js +1 -1
  68. package/hooks/useRowSync.mjs +23 -4
  69. package/hooks/useSlotExpand.js +1 -1
  70. package/hooks/useSlotExpand.mjs +36 -28
  71. package/index.d.mts +9 -3
  72. package/index.d.ts +9 -3
  73. package/index.js +1 -1
  74. package/index.mjs +83 -71
  75. package/items/SchedulerEditItem.d.ts +14 -3
  76. package/items/SchedulerEditItem.js +1 -1
  77. package/items/SchedulerEditItem.mjs +130 -72
  78. package/items/SchedulerItem.d.ts +10 -0
  79. package/items/SchedulerItem.js +1 -1
  80. package/items/SchedulerItem.mjs +153 -135
  81. package/items/SchedulerProportionalViewItem.d.ts +183 -0
  82. package/items/SchedulerProportionalViewItem.js +8 -0
  83. package/items/SchedulerProportionalViewItem.mjs +378 -0
  84. package/items/SchedulerViewItem.d.ts +3 -0
  85. package/items/SchedulerViewItem.js +1 -1
  86. package/items/SchedulerViewItem.mjs +107 -67
  87. package/messages/main.d.ts +186 -0
  88. package/messages/main.js +1 -1
  89. package/messages/main.mjs +226 -102
  90. package/models/Item.d.ts +2 -0
  91. package/models/Occurrence.d.ts +2 -0
  92. package/models/SchedulerModelFields.d.ts +5 -0
  93. package/models/SchedulerResource.d.ts +6 -0
  94. package/models/SchedulerView.d.ts +2 -0
  95. package/package-metadata.js +1 -1
  96. package/package-metadata.mjs +2 -2
  97. package/package.json +12 -11
  98. package/recurrence/common.js +1 -1
  99. package/recurrence/common.mjs +36 -39
  100. package/services/itemsService.js +1 -1
  101. package/services/itemsService.mjs +31 -27
  102. package/services/occurrenceService.js +1 -1
  103. package/services/occurrenceService.mjs +41 -35
  104. package/slots/SchedulerEditSlot.d.ts +2 -0
  105. package/slots/SchedulerEditSlot.js +1 -1
  106. package/slots/SchedulerEditSlot.mjs +27 -28
  107. package/slots/SchedulerSlot.d.ts +4 -0
  108. package/slots/SchedulerSlot.js +1 -1
  109. package/slots/SchedulerSlot.mjs +10 -1
  110. package/slots/SchedulerViewSlot.d.ts +5 -0
  111. package/slots/SchedulerViewSlot.js +1 -1
  112. package/slots/SchedulerViewSlot.mjs +70 -50
  113. package/tasks/SchedulerEditTask.d.ts +6 -0
  114. package/tasks/SchedulerEditTask.js +1 -1
  115. package/tasks/SchedulerEditTask.mjs +64 -23
  116. package/tasks/SchedulerTask.d.ts +15 -0
  117. package/tasks/SchedulerTask.js +1 -1
  118. package/tasks/SchedulerTask.mjs +39 -28
  119. package/tasks/SchedulerViewTask.d.ts +9 -0
  120. package/tasks/SchedulerViewTask.js +1 -1
  121. package/tasks/SchedulerViewTask.mjs +10 -5
  122. package/utils/main.d.ts +4 -1
  123. package/utils/main.js +1 -1
  124. package/utils/main.mjs +133 -112
  125. package/views/agenda/AgendaView.js +1 -1
  126. package/views/agenda/AgendaView.mjs +28 -22
  127. package/views/agenda/AgendaViewBody.js +1 -1
  128. package/views/agenda/AgendaViewBody.mjs +44 -42
  129. package/views/agenda/AgendaViewHead.js +1 -1
  130. package/views/agenda/AgendaViewHead.mjs +14 -10
  131. package/views/common/SchedulerDrag.d.ts +12 -0
  132. package/views/common/SchedulerResize.d.ts +12 -0
  133. package/views/common/VerticalResourceIterator.d.ts +3 -0
  134. package/views/common/VerticalResourceIterator.js +1 -1
  135. package/views/common/VerticalResourceIterator.mjs +16 -9
  136. package/views/day/DayView.js +1 -1
  137. package/views/day/DayView.mjs +2 -2
  138. package/views/day/MultiDayView.js +1 -1
  139. package/views/day/MultiDayView.mjs +98 -127
  140. package/views/month/MonthView.d.ts +8 -2
  141. package/views/month/MonthView.js +1 -1
  142. package/views/month/MonthView.mjs +115 -109
  143. package/views/month/MonthViewBody.d.ts +7 -2
  144. package/views/month/MonthViewBody.js +1 -1
  145. package/views/month/MonthViewBody.mjs +15 -11
  146. package/views/time/MultiDayTimelineView.d.ts +5 -0
  147. package/views/time/MultiDayTimelineView.js +1 -1
  148. package/views/time/MultiDayTimelineView.mjs +125 -132
  149. package/views/time/TimelineView.js +1 -1
  150. package/views/time/TimelineView.mjs +2 -2
  151. package/views/week/WeekView.js +1 -1
  152. package/views/week/WeekView.mjs +2 -2
  153. package/views/week/WorkWeekView.js +1 -1
  154. package/views/week/WorkWeekView.mjs +9 -9
  155. package/components/header/navigation/DatePickerToggleButton.d.ts +0 -16
  156. package/editors/FilterableComboBox.d.ts +0 -38
  157. package/editors/FilterableComboBox.js +0 -8
  158. package/editors/FilterableComboBox.mjs +0 -61
  159. package/editors/ZonedDateTime.js +0 -8
  160. package/editors/ZonedDateTime.mjs +0 -57
package/Scheduler.mjs CHANGED
@@ -5,33 +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 B, createVNode as n, h as w, isVNode as _ } from "vue";
9
- import { getToday as U, findMaster as p, setField as l, getField as a, toSchedulerGroups as G, getModelFields as D } from "./utils/main.mjs";
10
- import { canUseDOM as b, clone as c, validatePackage as K, shouldShowValidationUI as q, getLicenseMessage as J, templateRendering as d, getListeners as V, getTemplate as C, WatermarkOverlay as Q, isRtl as X } from "@progress/kendo-vue-common";
11
- import { SchedulerHeader as Y } from "./components/header/SchedulerHeader.mjs";
12
- import { SchedulerAdaptiveHeader as Z } from "./components/header/SchedulerAdaptiveHeader.mjs";
13
- import { provideIntlService as S, provideLocalizationService as ee } from "@progress/kendo-vue-intl";
14
- import { SchedulerNavigation as te } from "./components/header/navigation/SchedulerNavigation.mjs";
15
- import { addMonths as I, addDays as y } from "@progress/kendo-date-math";
16
- import { SchedulerFooter as ie } from "./components/footer/SchedulerFooter.mjs";
17
- import { ToolbarSpacer as $, Button as se } from "@progress/kendo-vue-buttons";
18
- import { NavigationDatePicker as ae } from "./components/header/navigation/NavigationDatePicker.mjs";
19
- import { ViewSelectorList as re } from "./components/header/view-selector/ViewSelectorList.mjs";
20
- import { BusinessHours as le } from "./components/footer/bussiness-hours/BusinessHours.mjs";
21
- import { today as R, messages as oe } from "./messages/main.mjs";
22
- import { packageMetadata as g } from "./package-metadata.mjs";
23
- import { AgendaView as ne } from "./views/agenda/AgendaView.mjs";
24
- import { TimelineView as he } from "./views/time/TimelineView.mjs";
25
- import { DayView as m } from "./views/day/DayView.mjs";
26
- import { WeekView as de } from "./views/week/WeekView.mjs";
27
- import { WorkWeekView as ce } from "./views/week/WorkWeekView.mjs";
28
- import { MonthView as ue } from "./views/month/MonthView.mjs";
29
- import { DATA_ACTION as v } from "./constants/main.mjs";
30
- import { useEditable as pe } from "./hooks/useEditable.mjs";
31
- function me(e) {
32
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !_(e);
8
+ import { defineComponent as le, createVNode as d, h as R, isVNode as ce } from "vue";
9
+ import { findMaster as v, setField as l, getField as r, toSchedulerGroups as he, getModelFields as P } from "./utils/main.mjs";
10
+ import { canUseDOM as $, clone as w, validatePackage as de, shouldShowValidationUI as ue, getLicenseMessage as me, templateRendering as k, getListeners as M, getTemplate as W, WatermarkOverlay as pe, isRtl as fe } from "@progress/kendo-vue-common";
11
+ import { SchedulerHeader as we } from "./components/header/SchedulerHeader.mjs";
12
+ import { SchedulerAdaptiveHeader as ke } from "./components/header/SchedulerAdaptiveHeader.mjs";
13
+ import { provideIntlService as L, provideLocalizationService as ge } from "@progress/kendo-vue-intl";
14
+ import { ZonedDate as be, addMonths as H, addDays as A } from "@progress/kendo-date-math";
15
+ import { SchedulerFooter as ve } from "./components/footer/SchedulerFooter.mjs";
16
+ import { Button as V, ButtonGroup as De, ToolbarSpacer as z } from "@progress/kendo-vue-buttons";
17
+ import { NavigationDatePicker as Se } from "./components/header/navigation/NavigationDatePicker.mjs";
18
+ import { ViewSelectorList as Ie } from "./components/header/view-selector/ViewSelectorList.mjs";
19
+ import { BusinessHours as Ce } from "./components/footer/bussiness-hours/BusinessHours.mjs";
20
+ import { today as j, messages as C, previousTitle as B, nextTitle as U, newEvent as _, newEventLabel as K, toolbarLabel as G } from "./messages/main.mjs";
21
+ import { packageMetadata as x } from "./package-metadata.mjs";
22
+ import { AgendaView as Ve } from "./views/agenda/AgendaView.mjs";
23
+ import { TimelineView as Ee } from "./views/time/TimelineView.mjs";
24
+ import { DayView as y } from "./views/day/DayView.mjs";
25
+ import { WeekView as ye } from "./views/week/WeekView.mjs";
26
+ import { WorkWeekView as Re } from "./views/week/WorkWeekView.mjs";
27
+ import { MonthView as $e } from "./views/month/MonthView.mjs";
28
+ import { DATA_ACTION as O } from "./constants/main.mjs";
29
+ import { plusIcon as xe, chevronRightIcon as Y, chevronLeftIcon as q } from "@progress/kendo-svg-icons";
30
+ import { SchedulerForm as Oe } from "./components/SchedulerForm.mjs";
31
+ import { parseRule as Te, serializeRule as Ne } from "@progress/kendo-recurrence";
32
+ import { useEditable as Fe } from "./hooks/useEditable.mjs";
33
+ function Z(e) {
34
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !ce(e);
33
35
  }
34
- const P = "{0:D}", x = "{0:d}", We = /* @__PURE__ */ B({
36
+ const J = "{0:D}", Q = "{0:d}", X = (e, i) => {
37
+ const s = Math.round(i / 864e5), t = Te({
38
+ recurrenceRule: e
39
+ });
40
+ if (s % 7 === 0 || (t == null ? void 0 : t.freq) !== "weekly" || !t.byWeekDay)
41
+ return e;
42
+ const a = Ne({
43
+ ...t,
44
+ byWeekDay: t.byWeekDay.map((o) => ({
45
+ ...o,
46
+ day: (o.day + s + 7) % 7
47
+ }))
48
+ });
49
+ return e.toUpperCase().includes("WKST=") ? a : a.replace(";WKST=SU", "");
50
+ }, nt = /* @__PURE__ */ le({
35
51
  name: "KendoScheduler",
36
52
  emits: ["datechange", "viewchange", "datachange", "itemclick", "itemdoubleclick", "slotclick", "slotdoubleclick", "taskclick", "taskdoubleclick"],
37
53
  props: {
@@ -90,6 +106,11 @@ const P = "{0:D}", x = "{0:d}", We = /* @__PURE__ */ B({
90
106
  task: [String, Function, Object],
91
107
  form: [String, Function, Object],
92
108
  resizeHint: [String, Function, Object],
109
+ editItem: [String, Function, Object],
110
+ viewTask: [String, Function, Object],
111
+ editTask: [String, Function, Object],
112
+ editSlot: [String, Function, Object],
113
+ className: String,
93
114
  dialogProps: Object,
94
115
  formProps: Object,
95
116
  dateHeaderCell: [String, Function, Object],
@@ -106,22 +127,26 @@ const P = "{0:D}", x = "{0:d}", We = /* @__PURE__ */ B({
106
127
  isMobile() {
107
128
  return this.$props.adaptive && this.media === "mobile";
108
129
  },
130
+ canAdd() {
131
+ return typeof this.$props.editable == "object" ? this.$props.editable.add : !!this.$props.editable;
132
+ },
109
133
  wrapperClassName() {
110
134
  return {
111
135
  "k-rtl": this.isRtl,
112
136
  "k-scheduler": !0,
113
- "k-scheduler-mobile": this.isMobile
137
+ "k-scheduler-mobile": this.isMobile,
138
+ [this.$props.className]: !!this.$props.className
114
139
  };
115
140
  },
116
141
  fields() {
117
- return D(this.$props.modelFields).fields;
142
+ return P(this.$props.modelFields).fields;
118
143
  }
119
144
  },
120
145
  mounted() {
121
- this.currentRtl = X(this.$el), this.calculateMedia(), this.$props.adaptive && b && window.ResizeObserver && (this.resizeObserver = new window.ResizeObserver(this.calculateMedia), this.resizeObserver.observe(this.$el));
146
+ this.currentRtl = fe(this.$el), this.calculateMedia(), this.$props.adaptive && $ && window.ResizeObserver && (this.resizeObserver = new window.ResizeObserver(this.calculateMedia), this.resizeObserver.observe(this.$el)), $ && window.ResizeObserver && (this.toolbarObserver = new window.ResizeObserver(this.measureToolbar), this.toolbarElement && this.toolbarObserver.observe(this.toolbarElement));
122
147
  },
123
148
  unmounted() {
124
- this.resizeObserver && this.resizeObserver.disconnect();
149
+ this.resizeObserver && this.resizeObserver.disconnect(), this.toolbarObserver && this.toolbarObserver.disconnect();
125
150
  },
126
151
  provide() {
127
152
  return {
@@ -148,7 +173,7 @@ const P = "{0:D}", x = "{0:d}", We = /* @__PURE__ */ B({
148
173
  }
149
174
  },
150
175
  data() {
151
- const e = S(this), i = this.$props.date || this.$props.defaultDate, s = this.$props.view || this.$props.defaultView || this.views[0] && this.views[0].name || "day", t = this.views.find((u) => u.name === s) || this.views[0] || n(m, null, null), r = this.getViewPropValue(t, "selectedDateFormat", s) || P, o = this.getViewPropValue(t, "selectedShortDateFormat", s) || x, h = this.getViewComponentByName(s).props.dateRange.default()({
176
+ const e = L(this), i = this.$props.date || this.$props.defaultDate, s = this.$props.view || this.$props.defaultView || this.views[0] && this.views[0].name || "day", t = this.views.find((c) => c.name === s) || this.views[0] || d(y, null, null), a = this.getViewPropValue(t, "selectedDateFormat", s) || J, o = this.getViewPropValue(t, "selectedShortDateFormat", s) || Q, n = this.getViewComponentByName(s).props.dateRange.default()({
152
177
  intl: e,
153
178
  date: i,
154
179
  timezone: this.$props.timezone,
@@ -158,6 +183,9 @@ const P = "{0:D}", x = "{0:d}", We = /* @__PURE__ */ B({
158
183
  });
159
184
  return {
160
185
  media: "desktop",
186
+ toolbarLevel: 0,
187
+ toolbarBreakpoints: [1 / 0, 1 / 0, 1 / 0],
188
+ newEventDialogItem: null,
161
189
  ks: {
162
190
  activeViewName: s,
163
191
  currentDate: i,
@@ -168,11 +196,11 @@ const P = "{0:D}", x = "{0:d}", We = /* @__PURE__ */ B({
168
196
  },
169
197
  views: this.views,
170
198
  view: t,
171
- fields: D(this.$props.modelFields).fields,
172
- groups: G(this.$props.group, this.$props.resources),
173
- dateRange: h,
199
+ fields: P(this.$props.modelFields).fields,
200
+ groups: he(this.$props.group, this.$props.resources),
201
+ dateRange: n,
174
202
  orientation: this.$props.group && this.$props.group.orientation ? this.$props.group.orientation : "horizontal",
175
- dateFormat: r,
203
+ dateFormat: a,
176
204
  shortDateFormat: o,
177
205
  scheduler: this,
178
206
  dataItems: this.dataItems
@@ -197,10 +225,10 @@ const P = "{0:D}", x = "{0:d}", We = /* @__PURE__ */ B({
197
225
  }
198
226
  },
199
227
  render() {
200
- K(g), this.showLicenseWatermark = q(g), this.licenseMessage = J(g);
201
- const e = this.views.find((L) => L.name === this.ks.activeViewName) || this.views[0] || n(m, null, null), i = this.getViewPropValue(this.ks.view, "slotDuration", this.ks.activeViewName), s = d.call(this, e.header || this.$props.header, V.call(this)), t = d.call(this, e.footer || this.$props.footer, V.call(this)), r = d.call(this, e.slot || this.$props.slotRender, {}), o = d.call(this, e.viewSlot || this.$props.viewSlot, {}), h = d.call(this, e.item || this.$props.item, {}), u = d.call(this, e.viewItem || this.$props.viewItem, {}), k = d.call(this, e.task || this.$props.task, {}), F = d.call(this, e.dateHeaderCell || this.$props.dateHeaderCell, {}), O = d.call(this, e.timeHeaderCell || this.$props.timeHeaderCell, {}), N = d.call(this, e.resizeHint || this.$props.resizeHint, {});
202
- this.ks.form = d.call(this, e.form || this.$props.form, {}), this.ks.dialogProps = e.dialogProps || this.$props.dialogProps, this.ks.formProps = e.formProps || this.$props.formProps;
203
- const E = pe(e.editable !== void 0 ? e.editable : this.$props.editable), M = this.getViewComponentByName(this.ks.activeViewName || e.name), H = {
228
+ de(x), this.showLicenseWatermark = ue(x), this.licenseMessage = me(x);
229
+ const e = this.views.find((oe) => oe.name === this.ks.activeViewName) || this.views[0] || d(y, null, null), i = this.getViewPropValue(this.ks.view, "slotDuration", this.ks.activeViewName), s = k.call(this, e.header || this.$props.header, M.call(this)), t = k.call(this, e.footer || this.$props.footer, M.call(this)), a = k.call(this, e.slot || this.$props.slotRender, {}), o = k.call(this, e.viewSlot || this.$props.viewSlot, {}), n = k.call(this, e.item || this.$props.item, {}), c = k.call(this, e.viewItem || this.$props.viewItem, {}), h = k.call(this, e.task || this.$props.task, {}), p = e.form || this.$props.form || Oe, f = k.call(this, e.dateHeaderCell || this.$props.dateHeaderCell, {}), u = k.call(this, e.timeHeaderCell || this.$props.timeHeaderCell, {}), m = k.call(this, e.resizeHint || this.$props.resizeHint, {});
230
+ this.ks.form = k.call(this, e.form || this.$props.form, {}), this.ks.dialogProps = e.dialogProps || this.$props.dialogProps, this.ks.formProps = e.formProps || this.$props.formProps;
231
+ const g = Fe(e.editable !== void 0 ? e.editable : this.$props.editable), S = this.getViewComponentByName(this.ks.activeViewName || e.name), E = {
204
232
  ...this.$props,
205
233
  ...this.ks.view,
206
234
  showWorkHours: this.ks.showWorkHours,
@@ -208,33 +236,71 @@ const P = "{0:D}", x = "{0:d}", We = /* @__PURE__ */ B({
208
236
  views: void 0,
209
237
  defaultDate: void 0,
210
238
  dateRange: this.ks.dateRange,
211
- slotRender: r,
239
+ slotRender: a,
212
240
  viewSlot: o,
213
- item: h,
214
- viewItem: u,
215
- task: k,
216
- dateHeaderCell: F,
217
- timeHeaderCell: O,
218
- resizeHint: N,
219
- editable: E
220
- }, z = this.isMobile ? n(Z, {
241
+ item: n,
242
+ viewItem: c,
243
+ task: h,
244
+ dateHeaderCell: f,
245
+ timeHeaderCell: u,
246
+ resizeHint: m,
247
+ editable: g
248
+ }, b = ge(this), D = b.toLanguageString(j, C[j]), T = b.toLanguageString(B, C[B]), N = b.toLanguageString(U, C[U]), ee = b.toLanguageString(_, C[_]), te = b.toLanguageString(K, C[K]), F = b.toLanguageString(G, C[G]), I = this.toolbarLevel, ie = this.isMobile ? d(ke, {
221
249
  isRtl: this.isRtl,
222
250
  onPrevclick: this.handlePrevClick,
223
251
  onNextclick: this.handleNextClick
224
- }, null) : n(Y, null, {
225
- default: () => [n(te, {
226
- isRtl: this.isRtl,
227
- onPrevclick: this.handlePrevClick,
228
- onNextclick: this.handleNextClick,
229
- onTodayclick: this.handleTodayClick
230
- }, null), n(ae, {
252
+ }, null) : d(we, {
253
+ ref: this.setToolbarRef,
254
+ ariaLabel: F
255
+ }, {
256
+ default: () => [this.canAdd && d(V, {
257
+ class: "k-toolbar-button",
258
+ themeColor: "primary",
259
+ svgIcon: xe,
260
+ "aria-label": te,
261
+ tabIndex: -1,
262
+ onClick: this.handleNewEventClick
263
+ }, {
264
+ default: () => [I < 2 && ee]
265
+ }), I < 2 && d(V, {
266
+ class: "k-toolbar-button",
267
+ fillMode: "flat",
268
+ tabIndex: -1,
269
+ title: D,
270
+ onClick: this.handleTodayClick
271
+ }, Z(D) ? D : {
272
+ default: () => [D]
273
+ }), I < 3 && d(De, {
274
+ class: "k-button-group-flat k-toolbar-button-group"
275
+ }, {
276
+ default: () => [d(V, {
277
+ fillMode: "flat",
278
+ tabIndex: -1,
279
+ svgIcon: this.isRtl ? Y : q,
280
+ "aria-label": T,
281
+ title: T,
282
+ onClick: this.handlePrevClick
283
+ }, null), d(V, {
284
+ fillMode: "flat",
285
+ tabIndex: -1,
286
+ svgIcon: this.isRtl ? q : Y,
287
+ "aria-label": N,
288
+ title: N,
289
+ onClick: this.handleNextClick
290
+ }, null)]
291
+ }), d(Se, {
231
292
  value: this.ks.currentDate,
232
- onChange: this.handleDatePickerChange
233
- }, null), n($, null, null), n(re, null, null)]
234
- }), A = C.call(this, {
235
- h: w,
293
+ onChange: this.handleDatePickerChange,
294
+ level: I
295
+ }, null), d(z, null, null), I === 1 && d("span", {
296
+ class: "k-separator"
297
+ }, null), d(Ie, {
298
+ level: I
299
+ }, null)]
300
+ }), se = W.call(this, {
301
+ h: R,
236
302
  template: s,
237
- defaultRendering: z,
303
+ defaultRendering: ie,
238
304
  additionalProps: {
239
305
  currentDate: this.ks.currentDate
240
306
  },
@@ -244,31 +310,33 @@ const P = "{0:D}", x = "{0:d}", We = /* @__PURE__ */ B({
244
310
  todayclick: this.handleTodayClick,
245
311
  datepickerchange: this.handleDatePickerChange
246
312
  }
247
- }), f = ee(this).toLanguageString(R, oe[R]), W = n(ie, null, {
248
- default: () => [this.isMobile && n(se, {
313
+ }), re = d(ve, {
314
+ "aria-label": F
315
+ }, {
316
+ default: () => [this.isMobile && d(V, {
249
317
  class: "k-scheduler-today",
250
318
  tabIndex: -1,
251
319
  onClick: this.handleTodayClick
252
- }, me(f) ? f : {
253
- default: () => [f]
254
- }), this.isMobile && n($, null, null), n(le, {
320
+ }, Z(D) ? D : {
321
+ default: () => [D]
322
+ }), this.isMobile && d(z, null, null), d(Ce, {
255
323
  slotDuration: i,
256
324
  onClick: this.handleShowWorkHoursClick
257
325
  }, null)]
258
- }), T = C.call(this, {
259
- h: w,
326
+ }), ae = W.call(this, {
327
+ h: R,
260
328
  template: t,
261
- defaultRendering: W,
329
+ defaultRendering: re,
262
330
  additionalProps: {
263
331
  slotDuration: i
264
332
  },
265
333
  additionalListeners: {
266
334
  showworkhoursclick: this.handleShowWorkHoursClick
267
335
  }
268
- }), j = this.showLicenseWatermark ? n(Q, {
336
+ }), ne = this.showLicenseWatermark ? d(pe, {
269
337
  message: this.licenseMessage
270
338
  }, null) : null;
271
- return n("div", {
339
+ return d("div", {
272
340
  id: this.$props.id,
273
341
  style: {
274
342
  height: this.$props.height + "px"
@@ -281,27 +349,32 @@ const P = "{0:D}", x = "{0:d}", We = /* @__PURE__ */ B({
281
349
  "aria-labelledby": this.$props.ariaLabelledby,
282
350
  onFocusin: this.handleFocus,
283
351
  onFocusout: this.handleBlur
284
- }, [A, w(M, {
285
- key: this.ks.view.name,
352
+ }, [se, R(S, {
353
+ key: `${this.ks.view.name}-${this.ks.showWorkHours}`,
286
354
  onDataaction: this.handleDataAction,
287
- ...H
288
- }), T, j]);
355
+ ...E
356
+ }), !["agenda", "month"].includes(this.ks.activeViewName) && ae, ne, this.newEventDialogItem && d(p, {
357
+ dataItem: this.newEventDialogItem,
358
+ onSubmit: this.handleNewEventFormSubmit,
359
+ onCancel: this.handleNewEventFormCancel,
360
+ onClose: this.handleNewEventFormCancel
361
+ }, null)]);
289
362
  },
290
363
  methods: {
291
364
  getViewComponentByName(e) {
292
365
  switch (e.toLowerCase()) {
293
366
  case "week":
294
- return de;
367
+ return ye;
295
368
  case "workweek":
296
- return ce;
369
+ return Re;
297
370
  case "agenda":
298
- return ne;
371
+ return Ve;
299
372
  case "timeline":
300
- return he;
373
+ return Ee;
301
374
  case "month":
302
- return ue;
375
+ return $e;
303
376
  default:
304
- return m;
377
+ return y;
305
378
  }
306
379
  },
307
380
  getViewPropValue(e, i, s) {
@@ -320,6 +393,29 @@ const P = "{0:D}", x = "{0:d}", We = /* @__PURE__ */ B({
320
393
  };
321
394
  this.$emit("datachange", t);
322
395
  },
396
+ handleNewEventClick(e) {
397
+ e.preventDefault();
398
+ const i = /* @__PURE__ */ new Date(), s = this.getViewPropValue(this.ks.view, "slotDuration", this.ks.activeViewName) || 30, t = s * 60 * 1e3, a = i.getMinutes(), o = Math.ceil(a / s) * s;
399
+ let n = new Date(i);
400
+ n.setHours(i.getHours() + Math.floor(o / 60), o % 60, 0, 0);
401
+ const c = this.$props.dataItems || [], h = this.fields, p = (m, g) => c.some((S) => {
402
+ const E = r(S, h.start), b = r(S, h.end);
403
+ return !E || !b ? !1 : E.getTime() < g.getTime() && b.getTime() > m.getTime();
404
+ });
405
+ let f = new Date(n.getTime() + t);
406
+ for (let m = 0; m < 48 && p(n, f); m++)
407
+ n = new Date(n.getTime() + t), f = new Date(n.getTime() + t);
408
+ const u = {};
409
+ l(u, h.start, n), l(u, h.end, f), l(u, h.isAllDay, !1), l(u, h.title, ""), l(u, h.description, ""), this.newEventDialogItem = u;
410
+ },
411
+ handleNewEventFormSubmit(e) {
412
+ this.handleDataChange({
413
+ created: [e.value]
414
+ }), this.newEventDialogItem = null;
415
+ },
416
+ handleNewEventFormCancel() {
417
+ this.newEventDialogItem = null;
418
+ },
323
419
  handleCreate(e) {
324
420
  const i = [e.dataItem];
325
421
  this.handleDataChange({
@@ -329,29 +425,67 @@ const P = "{0:D}", x = "{0:d}", We = /* @__PURE__ */ B({
329
425
  handleUpdate(e) {
330
426
  const i = [], s = [];
331
427
  if (e.series)
332
- if (Array.isArray(e.dataItem))
333
- e.dataItem.map((t) => {
334
- const r = c(p(e.dataItem, this.fields, this.dataItems)), o = c(t);
335
- l(o, this.fields.originalStart, a(r, this.fields.originalStart)), l(o, this.fields.recurrenceId, a(r, this.fields.recurrenceId)), l(o, this.fields.recurrenceExceptions, a(r, this.fields.recurrenceExceptions)), s.push(o);
336
- });
337
- else {
338
- const t = c(p(e.dataItem, this.fields, this.dataItems)), r = c(e.dataItem);
339
- l(r, this.fields.originalStart, a(t, this.fields.originalStart)), l(r, this.fields.recurrenceId, a(t, this.fields.recurrenceId)), l(r, this.fields.recurrenceExceptions, a(t, this.fields.recurrenceExceptions)), s.push(r);
428
+ if (Array.isArray(e.dataItem)) {
429
+ const t = e.dataItem[0];
430
+ if (r(t, this.fields.recurrenceId) !== null && r(t, this.fields.recurrenceId) !== void 0) {
431
+ const o = w(v(t, this.fields, this.dataItems)), n = new Date(r(t, this.fields.originalStart)).getTime(), c = new Date(r(t, this.fields.start)).getTime(), h = new Date(r(t, this.fields.end)).getTime(), p = c - n, f = h - c, u = new Date(r(o, this.fields.start)).getTime();
432
+ l(o, this.fields.start, new Date(u + p)), l(o, this.fields.end, new Date(u + p + f));
433
+ const m = r(o, this.fields.recurrenceExceptions) || [];
434
+ if (m.length > 0 && p !== 0) {
435
+ const g = m.map((S) => new Date(new Date(S).getTime() + p));
436
+ l(o, this.fields.recurrenceExceptions, g);
437
+ }
438
+ l(o, this.fields.recurrenceRule, X(r(o, this.fields.recurrenceRule), p)), s.push(o);
439
+ } else
440
+ e.dataItem.forEach((o) => {
441
+ const n = w(v(o, this.fields, this.dataItems)), c = w(o);
442
+ l(c, this.fields.originalStart, r(n, this.fields.originalStart)), l(c, this.fields.recurrenceId, r(n, this.fields.recurrenceId));
443
+ const h = r(n, this.fields.recurrenceExceptions) || [], p = new Date(r(n, this.fields.start)).getTime(), u = new Date(r(c, this.fields.start)).getTime() - p;
444
+ if (h.length > 0 && u !== 0) {
445
+ const m = h.map((g) => new Date(new Date(g).getTime() + u));
446
+ l(c, this.fields.recurrenceExceptions, m);
447
+ } else
448
+ l(c, this.fields.recurrenceExceptions, h);
449
+ s.push(c);
450
+ });
451
+ } else if (r(e.dataItem, this.fields.recurrenceId) !== null && r(e.dataItem, this.fields.recurrenceId) !== void 0) {
452
+ const a = w(v(e.dataItem, this.fields, this.dataItems)), o = new Date(r(e.dataItem, this.fields.originalStart)).getTime(), n = new Date(r(e.dataItem, this.fields.start)).getTime(), c = new Date(r(e.dataItem, this.fields.end)).getTime(), h = n - o, p = c - n, f = new Date(r(a, this.fields.start)).getTime();
453
+ l(a, this.fields.start, new Date(f + h)), l(a, this.fields.end, new Date(f + h + p));
454
+ const u = r(a, this.fields.recurrenceExceptions) || [];
455
+ if (u.length > 0 && h !== 0) {
456
+ const m = u.map((g) => new Date(new Date(g).getTime() + h));
457
+ l(a, this.fields.recurrenceExceptions, m);
458
+ }
459
+ l(a, this.fields.recurrenceRule, X(r(a, this.fields.recurrenceRule), h)), s.push(a);
460
+ } else {
461
+ const a = w(e.dataItem);
462
+ if (r(a, this.fields.recurrenceRule)) {
463
+ const n = w(v(e.dataItem, this.fields, this.dataItems));
464
+ l(a, this.fields.originalStart, r(n, this.fields.originalStart)), l(a, this.fields.recurrenceId, r(n, this.fields.recurrenceId));
465
+ const c = r(n, this.fields.recurrenceExceptions) || [], h = new Date(r(n, this.fields.start)).getTime(), f = new Date(r(a, this.fields.start)).getTime() - h;
466
+ if (c.length > 0 && f !== 0) {
467
+ const u = c.map((m) => new Date(new Date(m).getTime() + f));
468
+ l(a, this.fields.recurrenceExceptions, u);
469
+ } else
470
+ l(a, this.fields.recurrenceExceptions, c);
471
+ } else
472
+ l(a, this.fields.recurrenceExceptions, null);
473
+ s.push(a);
340
474
  }
341
475
  else if (Array.isArray(e.dataItem))
342
- e.dataItem.map((t) => {
343
- const r = a(t, this.fields.recurrenceRule) !== null && a(t, this.fields.recurrenceRule) !== void 0;
344
- if (a(t, this.fields.recurrenceId) !== null && a(t, this.fields.recurrenceId) !== void 0 && r) {
345
- const h = c(p(t, this.fields, this.dataItems)), u = a(t, this.fields.originalStart), k = a(h, this.fields.recurrenceExceptions) || [];
346
- l(h, this.fields.recurrenceExceptions, [...k, u]), l(t, this.fields.recurrenceRule, null), s.push(h), i.push(t);
476
+ e.dataItem.forEach((t) => {
477
+ const a = r(t, this.fields.recurrenceRule) !== null && r(t, this.fields.recurrenceRule) !== void 0;
478
+ if (r(t, this.fields.recurrenceId) !== null && r(t, this.fields.recurrenceId) !== void 0 && a) {
479
+ const n = w(v(t, this.fields, this.dataItems)), c = r(t, this.fields.originalStart), h = r(n, this.fields.recurrenceExceptions) || [];
480
+ l(n, this.fields.recurrenceExceptions, [...h, c]), l(t, this.fields.recurrenceRule, null), s.push(n), i.push(t);
347
481
  } else
348
482
  s.push(t);
349
483
  });
350
484
  else {
351
- const t = a(e.dataItem, this.fields.recurrenceRule) !== null && a(e.dataItem, this.fields.recurrenceRule) !== void 0;
352
- if (a(e.dataItem, this.fields.recurrenceId) !== null && a(e.dataItem, this.fields.recurrenceId) !== void 0 && t) {
353
- const o = c(p(e.dataItem, this.fields, this.dataItems)), h = a(e.dataItem, this.fields.originalStart), u = a(o, this.fields.recurrenceExceptions) || [];
354
- l(o, this.fields.recurrenceExceptions, [...u, h]), l(e.dataItem, this.fields.recurrenceRule, null), s.push(o), i.push(e.dataItem);
485
+ const t = r(e.dataItem, this.fields.recurrenceRule) !== null && r(e.dataItem, this.fields.recurrenceRule) !== void 0;
486
+ if (r(e.dataItem, this.fields.recurrenceId) !== null && r(e.dataItem, this.fields.recurrenceId) !== void 0 && t) {
487
+ const o = w(v(e.dataItem, this.fields, this.dataItems)), n = r(e.dataItem, this.fields.originalStart), c = r(o, this.fields.recurrenceExceptions) || [];
488
+ l(o, this.fields.recurrenceExceptions, [...c, n]), l(e.dataItem, this.fields.recurrenceRule, null), s.push(o), i.push(e.dataItem);
355
489
  } else
356
490
  s.push(e.dataItem);
357
491
  }
@@ -363,13 +497,13 @@ const P = "{0:D}", x = "{0:d}", We = /* @__PURE__ */ B({
363
497
  handleRemove(e) {
364
498
  const i = [], s = [];
365
499
  if (e.series) {
366
- const t = c(p(e.dataItem, this.fields, this.dataItems)), r = c(e.dataItem);
367
- l(r, this.fields.originalStart, a(t, this.fields.originalStart)), l(r, this.fields.recurrenceId, a(t, this.fields.recurrenceId)), l(r, this.fields.recurrenceRule, a(t, this.fields.recurrenceRule)), l(r, this.fields.recurrenceExceptions, a(t, this.fields.recurrenceExceptions)), s.push(r);
368
- } else if (!(a(e.dataItem, this.fields.recurrenceRule) !== null && a(e.dataItem, this.fields.recurrenceRule) !== void 0))
500
+ const t = w(v(e.dataItem, this.fields, this.dataItems)), a = w(e.dataItem);
501
+ l(a, this.fields.originalStart, r(t, this.fields.originalStart)), l(a, this.fields.recurrenceId, r(t, this.fields.recurrenceId)), l(a, this.fields.recurrenceRule, r(t, this.fields.recurrenceRule)), l(a, this.fields.recurrenceExceptions, r(t, this.fields.recurrenceExceptions)), s.push(a);
502
+ } else if (!(r(e.dataItem, this.fields.recurrenceRule) !== null && r(e.dataItem, this.fields.recurrenceRule) !== void 0))
369
503
  s.push(e.dataItem);
370
504
  else {
371
- const r = c(p(e.dataItem, this.fields, this.dataItems)), o = a(e.dataItem, this.fields.originalStart), h = a(r, this.fields.recurrenceExceptions) || [];
372
- l(r, this.fields.recurrenceExceptions, [...h, o]), l(e.dataItem, this.fields.recurrenceRule, null), i.push(r);
505
+ const a = w(v(e.dataItem, this.fields, this.dataItems)), o = r(e.dataItem, this.fields.originalStart), n = r(a, this.fields.recurrenceExceptions) || [];
506
+ l(a, this.fields.recurrenceExceptions, [...n, o]), l(e.dataItem, this.fields.recurrenceRule, null), i.push(a);
373
507
  }
374
508
  this.handleDataChange({
375
509
  updated: i,
@@ -378,24 +512,28 @@ const P = "{0:D}", x = "{0:d}", We = /* @__PURE__ */ B({
378
512
  },
379
513
  handleDataAction(e) {
380
514
  switch (e.type) {
381
- case v.create:
515
+ case O.create:
382
516
  this.handleCreate(e);
383
517
  break;
384
- case v.update:
518
+ case O.update:
385
519
  this.handleUpdate(e);
386
520
  break;
387
- case v.remove:
521
+ case O.remove:
388
522
  this.handleRemove(e);
389
523
  break;
390
524
  }
391
525
  },
392
526
  handleActiveViewNameChange(e, i) {
393
- this.updatePassedState(e), this.$emit("viewchange", {
527
+ this.$props.view === void 0 && this.updatePassedState(e), this.$emit("viewchange", {
394
528
  viewName: e,
395
529
  ...i,
396
530
  target: this.ks.scheduler.$el
397
531
  });
398
532
  },
533
+ setToolbarRef(e) {
534
+ const i = (e == null ? void 0 : e.$el) || null;
535
+ i !== this.toolbarElement && (this.toolbarObserver && this.toolbarElement && this.toolbarObserver.unobserve(this.toolbarElement), this.toolbarElement = i, this.toolbarObserver && i && this.toolbarObserver.observe(i));
536
+ },
399
537
  handleDateChange(e, i) {
400
538
  this.setDate(e, {
401
539
  ...i,
@@ -411,18 +549,18 @@ const P = "{0:D}", x = "{0:d}", We = /* @__PURE__ */ B({
411
549
  },
412
550
  handleNextClick(e) {
413
551
  e.preventDefault();
414
- const i = this.getViewPropValue(this.ks.view, "step", this.ks.activeViewName) || this.getViewPropValue(this.ks.view, "numberOfDays", this.ks.activeViewName) || 1, t = i > 27 ? I(this.ks.currentDate, Math.round(i / 27)) : y(this.ks.currentDate, i);
552
+ const i = this.getViewPropValue(this.ks.view, "step", this.ks.activeViewName) || this.getViewPropValue(this.ks.view, "numberOfDays", this.ks.activeViewName) || 1, t = i > 27 ? H(this.ks.currentDate, Math.round(i / 27)) : A(this.ks.currentDate, i);
415
553
  this.setDate(t, e);
416
554
  },
417
555
  handlePrevClick(e) {
418
556
  e.preventDefault();
419
- const i = this.getViewPropValue(this.ks.view, "step", this.ks.activeViewName) || this.getViewPropValue(this.ks.view, "numberOfDays", this.ks.activeViewName) || 1, t = i > 27 ? I(this.ks.currentDate, -Math.round(i / 27)) : y(this.ks.currentDate, -i);
557
+ const i = this.getViewPropValue(this.ks.view, "step", this.ks.activeViewName) || this.getViewPropValue(this.ks.view, "numberOfDays", this.ks.activeViewName) || 1, t = i > 27 ? H(this.ks.currentDate, -Math.round(i / 27)) : A(this.ks.currentDate, -i);
420
558
  this.setDate(t, e);
421
559
  },
422
560
  handleTodayClick(e) {
423
561
  e.preventDefault();
424
- const i = U();
425
- this.setDate(i, e);
562
+ const i = be.fromLocalDate(/* @__PURE__ */ new Date(), this.ks.timezone);
563
+ this.setDate(new Date(i.getTime()), e);
426
564
  },
427
565
  handleShowWorkHoursClick() {
428
566
  this.ks.showWorkHours = !this.ks.showWorkHours;
@@ -452,14 +590,14 @@ const P = "{0:D}", x = "{0:d}", We = /* @__PURE__ */ B({
452
590
  this.$emit("taskdoubleclick", e);
453
591
  },
454
592
  setDate(e, i) {
455
- this.ks.currentDate = e, this.updatePassedState(), this.$emit("datechange", {
593
+ this.$props.date === void 0 && (this.ks.currentDate = e, this.updatePassedState()), this.$emit("datechange", {
456
594
  date: e,
457
595
  event: i
458
596
  });
459
597
  },
460
598
  updatePassedState(e) {
461
- const i = S(this), s = e || this.ks.activeViewName;
462
- this.ks.activeViewName = s, this.ks.view = this.views.find((t) => t.name === s) || this.views[0] || n(m, null, null), this.ks.dateFormat = this.getViewPropValue(this.ks.view, "selectedDateFormat", s) || P, this.ks.shortDateFormat = this.getViewPropValue(this.ks.view, "selectedShortDateFormat", s) || x, this.ks.dateRange = this.getViewComponentByName(s).props.dateRange.default()({
599
+ const i = L(this), s = e || this.ks.activeViewName;
600
+ this.ks.activeViewName = s, this.ks.view = this.views.find((t) => t.name === s) || this.views[0] || d(y, null, null), this.ks.dateFormat = this.getViewPropValue(this.ks.view, "selectedDateFormat", s) || J, this.ks.shortDateFormat = this.getViewPropValue(this.ks.view, "selectedShortDateFormat", s) || Q, this.ks.dateRange = this.getViewComponentByName(s).props.dateRange.default()({
463
601
  intl: i,
464
602
  date: this.ks.currentDate,
465
603
  timezone: this.$props.timezone,
@@ -469,10 +607,24 @@ const P = "{0:D}", x = "{0:d}", We = /* @__PURE__ */ B({
469
607
  });
470
608
  },
471
609
  calculateMedia() {
472
- b && window.matchMedia && (this.media = window.matchMedia("(min-width: 1024px)").matches ? "desktop" : "mobile");
610
+ $ && window.matchMedia && (this.media = window.matchMedia("(min-width: 1024px)").matches ? "desktop" : "mobile");
611
+ },
612
+ measureToolbar() {
613
+ const i = this.toolbarElement;
614
+ if (!i)
615
+ return;
616
+ const s = i.clientWidth;
617
+ if (!s)
618
+ return;
619
+ const t = parseInt(window.getComputedStyle(i).gap || "0", 10), a = Array.from(i.children), o = a.reduce((c, h) => c + h.offsetWidth, 0) + (a.length - 1) * t, n = this.toolbarLevel;
620
+ if (o > s && n < 3) {
621
+ this.toolbarBreakpoints[n] = s, this.toolbarLevel = n + 1;
622
+ return;
623
+ }
624
+ n > 0 && s > this.toolbarBreakpoints[n - 1] + 20 && (this.toolbarLevel = n - 1);
473
625
  }
474
626
  }
475
627
  });
476
628
  export {
477
- We as Scheduler
629
+ nt as Scheduler
478
630
  };
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("vue"),l=require("../hooks/use-items-selection.js"),i=require("../hooks/use-slots-selection.js"),o=require("@progress/kendo-vue-common"),s=require("../utils/main.js"),r=require("../hooks/use-slots-focus.js"),a=require("../hooks/use-items-focus.js"),d=require("../hooks/useCellSync.js"),h=c.defineComponent({name:"KendoBaseView",props:{viewProps:Object,baseSlots:Array,ranges:Array,id:String,isAgendaView:{type:Boolean,default:!1}},provide(){return{bv:this.bv,setItems:this.dispatchItems,setSlots:this.dispatchSlots,dispatchSelectedSlots:this.handleSchedulerSlotsSelectAction,dispatchSelectedItems:this.handleSchedulerItemsSelectAction,dispatchFocusedItems:this.setFocusedItems,dispatchFocusedSlots:this.setFocusedSlots}},data(){return{bv:{viewProps:this.viewProps,ranges:this.ranges,items:[],slots:[],focusedItems:[],focusedSlots:[],selectedItems:[],selectedSlots:[]}}},mounted(){this.syncCells()},updated(){this.syncCells()},render(){const e=o.getDefaultSlots(this);return c.createVNode("div",{class:"k-scheduler-layout k-scheduler-layout-flex",role:this.$props.isAgendaView?"grid":"presentation"},[e])},methods:{syncCells(){d.useCellSync({element:this.$el,selector:".k-group-cell",attribute:"data-depth-index",explicitDepth:!0}),d.useCellSync({element:this.$el,selector:".k-side-cell",attribute:"data-depth-index",explicitDepth:!1})},handleSchedulerItemsSelectAction(e,t){i.dispatchSelectedSlots.call(this,{type:i.SLOTS_SELECT_ACTION.reset}),l.dispatchSelectedItems.call(this,e,t)},handleSchedulerSlotsSelectAction(e,t){l.dispatchSelectedItems.call(this,{type:l.ITEMS_SELECT_ACTION.reset},t),i.dispatchSelectedSlots.call(this,e)},setFocusedItems(e,t){a.dispatchFocusedItems.call(this,e,t)},setFocusedSlots(e,t){r.dispatchFocusedSlots.call(this,e,t)},dispatchItems(e){let t;switch(e.type){case s.COLLECTION_ACTION.add:this.bv.items.push(e.item);break;case s.COLLECTION_ACTION.remove:t=this.bv.items.indexOf(e.item),this.bv.items.splice(t,1);break}},dispatchSlots(e){let t;switch(e.type){case s.COLLECTION_ACTION.add:this.bv.slots.push(e.item);break;case s.COLLECTION_ACTION.remove:t=this.bv.slots.indexOf(e.item),this.bv.slots.splice(t,1);break}}}});exports.BaseView=h;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("vue"),l=require("../hooks/use-items-selection.js"),i=require("../hooks/use-slots-selection.js"),o=require("@progress/kendo-vue-common"),s=require("../utils/main.js"),a=require("../hooks/use-slots-focus.js"),r=require("../hooks/use-items-focus.js"),d=require("../hooks/useCellSync.js"),h=c.defineComponent({name:"KendoBaseView",inheritAttrs:!1,props:{viewProps:Object,baseSlots:Array,ranges:Array,id:String,isAgendaView:{type:Boolean,default:!1}},provide(){return{bv:this.bv,setItems:this.dispatchItems,setSlots:this.dispatchSlots,dispatchSelectedSlots:this.handleSchedulerSlotsSelectAction,dispatchSelectedItems:this.handleSchedulerItemsSelectAction,dispatchFocusedItems:this.setFocusedItems,dispatchFocusedSlots:this.setFocusedSlots}},data(){return{bv:{viewProps:this.viewProps,ranges:this.ranges,items:[],slots:[],focusedItems:[],focusedSlots:[],selectedItems:[],selectedSlots:[]}}},mounted(){this.syncCells()},watch:{ranges(e){this.bv.ranges=e}},updated(){this.syncCells()},render(){const e=o.getDefaultSlots(this);return c.createVNode("div",{class:["k-scheduler-layout k-scheduler-layout-flex",this.$attrs.class],role:this.$props.isAgendaView?"grid":"none"},[e])},methods:{syncCells(){d.useCellSync({element:this.$el,selector:".k-group-cell",attribute:"data-depth-index",explicitDepth:!0}),d.useCellSync({element:this.$el,selector:".k-side-cell",attribute:"data-depth-index",explicitDepth:!1})},handleSchedulerItemsSelectAction(e,t){i.dispatchSelectedSlots.call(this,{type:i.SLOTS_SELECT_ACTION.reset}),l.dispatchSelectedItems.call(this,e,t)},handleSchedulerSlotsSelectAction(e,t){l.dispatchSelectedItems.call(this,{type:l.ITEMS_SELECT_ACTION.reset},t),i.dispatchSelectedSlots.call(this,e)},setFocusedItems(e,t){r.dispatchFocusedItems.call(this,e,t)},setFocusedSlots(e,t){a.dispatchFocusedSlots.call(this,e,t)},dispatchItems(e){let t;switch(e.type){case s.COLLECTION_ACTION.add:this.bv.items.push(e.item);break;case s.COLLECTION_ACTION.remove:t=this.bv.items.indexOf(e.item),this.bv.items.splice(t,1);break}},dispatchSlots(e){let t;switch(e.type){case s.COLLECTION_ACTION.add:this.bv.slots.push(e.item);break;case s.COLLECTION_ACTION.remove:t=this.bv.slots.indexOf(e.item),this.bv.slots.splice(t,1);break}}}});exports.BaseView=h;