@progress/kendo-vue-scheduler 3.2.4 → 3.2.6-dev.202204251505

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 (44) hide show
  1. package/dist/cdn/js/kendo-vue-scheduler.js +1 -1
  2. package/dist/es/Scheduler.d.ts +8 -0
  3. package/dist/es/Scheduler.js +15 -1
  4. package/dist/es/additionalTypes.ts +1 -0
  5. package/dist/es/components/SchedulerForm.js +30 -22
  6. package/dist/es/editors/SchedulerFormEditor.js +25 -2
  7. package/dist/es/items/SchedulerEditItem.js +20 -151
  8. package/dist/es/items/SchedulerItem.d.ts +12 -0
  9. package/dist/es/items/SchedulerItem.js +74 -3
  10. package/dist/es/items/SchedulerViewItem.js +46 -2
  11. package/dist/es/package-metadata.js +1 -1
  12. package/dist/es/slots/SchedulerEditSlot.js +15 -32
  13. package/dist/es/slots/SchedulerSlot.d.ts +2 -0
  14. package/dist/es/slots/SchedulerSlot.js +26 -2
  15. package/dist/es/slots/SchedulerViewSlot.js +5 -2
  16. package/dist/es/tasks/SchedulerEditTask.js +14 -64
  17. package/dist/es/tasks/SchedulerTask.d.ts +12 -2
  18. package/dist/es/tasks/SchedulerTask.js +54 -3
  19. package/dist/es/tasks/SchedulerViewTask.js +21 -3
  20. package/dist/es/views/common/SchedulerDrag.js +4 -2
  21. package/dist/es/views/day/MultiDayView.d.ts +4 -0
  22. package/dist/es/views/day/MultiDayView.js +57 -5
  23. package/dist/npm/Scheduler.d.ts +8 -0
  24. package/dist/npm/Scheduler.js +15 -1
  25. package/dist/npm/additionalTypes.ts +1 -0
  26. package/dist/npm/components/SchedulerForm.js +29 -21
  27. package/dist/npm/editors/SchedulerFormEditor.js +25 -2
  28. package/dist/npm/items/SchedulerEditItem.js +20 -155
  29. package/dist/npm/items/SchedulerItem.d.ts +12 -0
  30. package/dist/npm/items/SchedulerItem.js +77 -3
  31. package/dist/npm/items/SchedulerViewItem.js +46 -2
  32. package/dist/npm/package-metadata.js +1 -1
  33. package/dist/npm/slots/SchedulerEditSlot.js +15 -33
  34. package/dist/npm/slots/SchedulerSlot.d.ts +2 -0
  35. package/dist/npm/slots/SchedulerSlot.js +27 -2
  36. package/dist/npm/slots/SchedulerViewSlot.js +5 -2
  37. package/dist/npm/tasks/SchedulerEditTask.js +14 -66
  38. package/dist/npm/tasks/SchedulerTask.d.ts +12 -2
  39. package/dist/npm/tasks/SchedulerTask.js +56 -3
  40. package/dist/npm/tasks/SchedulerViewTask.js +21 -3
  41. package/dist/npm/views/common/SchedulerDrag.js +4 -2
  42. package/dist/npm/views/day/MultiDayView.d.ts +4 -0
  43. package/dist/npm/views/day/MultiDayView.js +58 -5
  44. package/package.json +12 -12
@@ -6,7 +6,6 @@ var inject = allVue.inject;
6
6
  import { getDefaultSlots, Keys } from '@progress/kendo-vue-common';
7
7
  import { DATA_ACTION } from '../Scheduler';
8
8
  import { setField, getField, findFirstItem, isGroupped } from '../utils';
9
- import { SchedulerForm } from '../components/SchedulerForm';
10
9
  import { SchedulerViewSlot } from './SchedulerViewSlot';
11
10
  import { SLOTS_FOCUS_ACTION, useEditable } from '../hooks';
12
11
  import { SLOTS_SELECT_ACTION } from '../hooks/use-slots-selection'; // tslint:enable:max-line-length
@@ -48,6 +47,13 @@ var SchedulerEditSlotVue2 = {
48
47
  this.slot = null;
49
48
  this.editableSlot = null;
50
49
  },
50
+ provide: function provide() {
51
+ return {
52
+ ksEditFormSubmit: this.handleEditFormSubmit,
53
+ ksEditFormCancel: this.handleEditFormCancel,
54
+ ksEditFormClose: this.handleEditFormClose
55
+ };
56
+ },
51
57
  inject: {
52
58
  bv: {
53
59
  default: null
@@ -68,6 +74,9 @@ var SchedulerEditSlotVue2 = {
68
74
  },
69
75
  computedEditable: function computedEditable() {
70
76
  return useEditable(this.$props.editable);
77
+ },
78
+ compFormItem: function compFormItem() {
79
+ return this.formItem !== undefined ? this.formItem : this.currentFormItem;
71
80
  }
72
81
  },
73
82
  // @ts-ignore
@@ -79,8 +88,6 @@ var SchedulerEditSlotVue2 = {
79
88
  },
80
89
  // @ts-ignore
81
90
  render: function render(createElement) {
82
- var _this2 = this;
83
-
84
91
  var _this = this;
85
92
 
86
93
  var h = gh || createElement;
@@ -136,7 +143,8 @@ var SchedulerEditSlotVue2 = {
136
143
  selected: selected,
137
144
  navDay: navDay,
138
145
  itemsPerSlot: itemsPerSlot,
139
- tabIndex: this.currentTabIndex // Focus
146
+ tabIndex: this.currentTabIndex,
147
+ formItem: this.compFormItem // Focus
140
148
 
141
149
  },
142
150
  isAllDay: this.isAllDay,
@@ -158,6 +166,7 @@ var SchedulerEditSlotVue2 = {
158
166
  navDay: navDay,
159
167
  itemsPerSlot: itemsPerSlot,
160
168
  tabIndex: this.currentTabIndex,
169
+ formItem: this.compFormItem,
161
170
  onFocus: this.handleFocus // Mouse
162
171
  ,
163
172
  on: this.v3 ? undefined : {
@@ -171,34 +180,8 @@ var SchedulerEditSlotVue2 = {
171
180
  onKeydown: this.handleKeyDown,
172
181
  onShowmoreitems: this.handleShowMoreItemsClick
173
182
  }, this.v3 ? function () {
174
- return [defaultSlot, _this2.currentFormItem && h(SchedulerForm, {
175
- dataItem: _this2.currentFormItem,
176
- attrs: _this2.v3 ? undefined : {
177
- dataItem: _this2.currentFormItem
178
- },
179
- onSubmit: _this2.handleEditFormSubmit,
180
- on: _this2.v3 ? undefined : {
181
- "submit": _this2.handleEditFormSubmit,
182
- "close": _this2.handleEditFormClose,
183
- "cancel": _this2.handleEditFormCancel
184
- },
185
- onClose: _this2.handleEditFormClose,
186
- onCancel: _this2.handleEditFormCancel
187
- })];
188
- } : [defaultSlot, _this2.currentFormItem && h(SchedulerForm, {
189
- dataItem: _this2.currentFormItem,
190
- attrs: _this2.v3 ? undefined : {
191
- dataItem: _this2.currentFormItem
192
- },
193
- onSubmit: _this2.handleEditFormSubmit,
194
- on: _this2.v3 ? undefined : {
195
- "submit": _this2.handleEditFormSubmit,
196
- "close": _this2.handleEditFormClose,
197
- "cancel": _this2.handleEditFormCancel
198
- },
199
- onClose: _this2.handleEditFormClose,
200
- onCancel: _this2.handleEditFormCancel
201
- })])
183
+ return [defaultSlot];
184
+ } : [defaultSlot])
202
185
  );
203
186
  },
204
187
  methods: {
@@ -14,6 +14,8 @@ export interface SchedulerSlotProps extends Slot {
14
14
  navDay?: boolean;
15
15
  /** @hidden */
16
16
  itemsPerSlot?: number;
17
+ /** @hidden */
18
+ formItem?: object;
17
19
  /**
18
20
  * Specifies the `id` of the wrapping element of the SchedulerSlot.
19
21
  */
@@ -23,6 +23,7 @@ import { getDefaultSlots } from '@progress/kendo-vue-common';
23
23
  import { COLLECTION_ACTION, formatEventTime } from '../utils';
24
24
  import { provideIntlService } from '@progress/kendo-vue-intl';
25
25
  import { ShowMoreItemsButton } from '../components/ShowMoreItemsButton';
26
+ import { SchedulerForm } from '../components/SchedulerForm';
26
27
  var DAY_FORMAT = {
27
28
  skeleton: 'dd'
28
29
  }; // tslint:enable:max-line-length
@@ -53,7 +54,8 @@ var SchedulerSlotVue2 = {
53
54
  isAllDay: Boolean,
54
55
  navDay: Boolean,
55
56
  editable: [Object, Boolean],
56
- itemsPerSlot: Number
57
+ itemsPerSlot: Number,
58
+ formItem: Object
57
59
  },
58
60
  computed: {
59
61
  currentTabIndex: function currentTabIndex() {
@@ -82,6 +84,15 @@ var SchedulerSlotVue2 = {
82
84
  },
83
85
  slotDoubleClick: {
84
86
  default: null
87
+ },
88
+ ksEditFormSubmit: {
89
+ default: null
90
+ },
91
+ ksEditFormCancel: {
92
+ default: null
93
+ },
94
+ ksEditFormClose: {
95
+ default: null
85
96
  }
86
97
  },
87
98
  created: function created() {
@@ -179,7 +190,20 @@ var SchedulerSlotVue2 = {
179
190
  on: this.v3 ? undefined : {
180
191
  "click": this.handleShowMoreItemsClick
181
192
  }
182
- }), defaultSlot]);
193
+ }), defaultSlot, this.formItem && h(SchedulerForm, {
194
+ dataItem: this.formItem,
195
+ attrs: this.v3 ? undefined : {
196
+ dataItem: this.formItem
197
+ },
198
+ onSubmit: this.ksEditFormSubmit,
199
+ on: this.v3 ? undefined : {
200
+ "submit": this.ksEditFormSubmit,
201
+ "close": this.ksEditFormClose,
202
+ "cancel": this.ksEditFormCancel
203
+ },
204
+ onClose: this.ksEditFormClose,
205
+ onCancel: this.ksEditFormCancel
206
+ })]);
183
207
  },
184
208
  methods: {
185
209
  handleShowMoreItemsClick: function handleShowMoreItemsClick(event) {
@@ -35,7 +35,8 @@ var SchedulerViewSlotVue2 = {
35
35
  isAllDay: Boolean,
36
36
  navDay: Boolean,
37
37
  editable: [Object, Boolean],
38
- itemsPerSlot: Number
38
+ itemsPerSlot: Number,
39
+ formItem: Object
39
40
  },
40
41
  created: function created() {
41
42
  this.viewSlot = null;
@@ -103,7 +104,8 @@ var SchedulerViewSlotVue2 = {
103
104
  zonedEnd: zonedEnd,
104
105
  navDay: navDay,
105
106
  itemsPerSlot: itemsPerSlot,
106
- editable: editable
107
+ editable: editable,
108
+ formItem: this.formItem
107
109
  },
108
110
  items: items,
109
111
  row: row,
@@ -120,6 +122,7 @@ var SchedulerViewSlotVue2 = {
120
122
  navDay: navDay,
121
123
  itemsPerSlot: itemsPerSlot,
122
124
  editable: editable,
125
+ formItem: this.formItem,
123
126
  onShowmoreitems: this.handleShowMoreItemsClick,
124
127
  on: this.v3 ? undefined : {
125
128
  "showmoreitems": this.handleShowMoreItemsClick,
@@ -20,8 +20,6 @@ import { SchedulerViewTask } from './SchedulerViewTask';
20
20
  import { useEditable } from '../hooks';
21
21
  import { findMaster } from '../utils';
22
22
  import { DATA_ACTION } from '../Scheduler';
23
- import { SchedulerRemoveDialog } from '../components/SchedulerRemoveDialog';
24
- import { SchedulerOccurrenceDialog } from '../components/SchedulerOccurrenceDialog';
25
23
  import { getDefaultSlots } from '@progress/kendo-vue-common'; // tslint:enable:max-line-length
26
24
 
27
25
  var SchedulerEditTaskVue2 = {
@@ -89,7 +87,11 @@ var SchedulerEditTaskVue2 = {
89
87
  et: this.et,
90
88
  removeTask: this.handleRemoveItemChange,
91
89
  removeDialog: this.handleRemoveDialogChange,
92
- occurrenceDialog: this.handleOccurrenceDialogChange
90
+ occurrenceDialog: this.handleOccurrenceDialogChange,
91
+ ksCancel: this.handleCancel,
92
+ ksSeriesClick: this.handleSeriesClick,
93
+ ksOccurrenceClick: this.handleOccurrenceClick,
94
+ ksRemoveConfirm: this.handleRemoveConfirm
93
95
  };
94
96
  },
95
97
  data: function data() {
@@ -129,8 +131,6 @@ var SchedulerEditTaskVue2 = {
129
131
  },
130
132
  // @ts-ignore
131
133
  render: function render(createElement) {
132
- var _this = this;
133
-
134
134
  var h = gh || createElement;
135
135
  var defaultSlot = getDefaultSlots(this);
136
136
 
@@ -178,8 +178,11 @@ var SchedulerEditTaskVue2 = {
178
178
  recurrenceRule: this.$props.recurrenceRule,
179
179
  recurrenceId: this.$props.recurrenceId,
180
180
  dataItem: this.$props.dataItem,
181
+ removeItem: this.compRemoveItem,
181
182
  task: this.$props.task,
182
- editable: this.$props.editable
183
+ editable: this.$props.editable,
184
+ showOccurrenceDialog: this.compShowOccurrenceDialog,
185
+ showRemoveDialog: this.compShowRemoveDialog
183
186
  },
184
187
  tabIndex: this.$props.tabIndex,
185
188
  head: this.$props.head,
@@ -206,71 +209,18 @@ var SchedulerEditTaskVue2 = {
206
209
  recurrenceRule: this.$props.recurrenceRule,
207
210
  recurrenceId: this.$props.recurrenceId,
208
211
  dataItem: this.$props.dataItem,
212
+ removeItem: this.compRemoveItem,
209
213
  task: this.$props.task,
210
214
  editable: this.$props.editable,
215
+ showOccurrenceDialog: this.compShowOccurrenceDialog,
216
+ showRemoveDialog: this.compShowRemoveDialog,
211
217
  onRemoveclick: this.handleRemoveClick,
212
218
  on: this.v3 ? undefined : {
213
219
  "removeclick": this.handleRemoveClick
214
220
  }
215
221
  }, this.v3 ? function () {
216
- return [defaultSlot, _this.compShowOccurrenceDialog && h(SchedulerOccurrenceDialog, {
217
- dataItem: _this.compRemoveItem,
218
- attrs: _this.v3 ? undefined : {
219
- dataItem: _this.compRemoveItem,
220
- isRemove: _this.compRemoveItem !== null
221
- },
222
- isRemove: _this.compRemoveItem !== null,
223
- onClose: _this.handleCancel,
224
- on: _this.v3 ? undefined : {
225
- "close": _this.handleCancel,
226
- "occurrenceclose": _this.handleOccurrenceClick,
227
- "seriesclose": _this.handleSeriesClick
228
- },
229
- onOccurrenceclose: _this.handleOccurrenceClick,
230
- onSeriesclose: _this.handleSeriesClick
231
- }), _this.compShowRemoveDialog && h(SchedulerRemoveDialog, {
232
- dataItem: _this.compRemoveItem,
233
- attrs: _this.v3 ? undefined : {
234
- dataItem: _this.compRemoveItem
235
- },
236
- onClose: _this.handleCancel,
237
- on: _this.v3 ? undefined : {
238
- "close": _this.handleCancel,
239
- "cancel": _this.handleCancel,
240
- "confirm": _this.handleRemoveConfirm
241
- },
242
- onCancel: _this.handleCancel,
243
- onConfirm: _this.handleRemoveConfirm
244
- })];
245
- } : [defaultSlot, _this.compShowOccurrenceDialog && h(SchedulerOccurrenceDialog, {
246
- dataItem: _this.compRemoveItem,
247
- attrs: _this.v3 ? undefined : {
248
- dataItem: _this.compRemoveItem,
249
- isRemove: _this.compRemoveItem !== null
250
- },
251
- isRemove: _this.compRemoveItem !== null,
252
- onClose: _this.handleCancel,
253
- on: _this.v3 ? undefined : {
254
- "close": _this.handleCancel,
255
- "occurrenceclose": _this.handleOccurrenceClick,
256
- "seriesclose": _this.handleSeriesClick
257
- },
258
- onOccurrenceclose: _this.handleOccurrenceClick,
259
- onSeriesclose: _this.handleSeriesClick
260
- }), _this.compShowRemoveDialog && h(SchedulerRemoveDialog, {
261
- dataItem: _this.compRemoveItem,
262
- attrs: _this.v3 ? undefined : {
263
- dataItem: _this.compRemoveItem
264
- },
265
- onClose: _this.handleCancel,
266
- on: _this.v3 ? undefined : {
267
- "close": _this.handleCancel,
268
- "cancel": _this.handleCancel,
269
- "confirm": _this.handleRemoveConfirm
270
- },
271
- onCancel: _this.handleCancel,
272
- onConfirm: _this.handleRemoveConfirm
273
- })])
222
+ return [defaultSlot];
223
+ } : [defaultSlot])
274
224
  );
275
225
  },
276
226
  methods: {
@@ -8,8 +8,6 @@ import { Item, SchedulerTaskMouseEvent, EditableProp } from '../models';
8
8
  * Represents the props of the Kendo UI for Vue [SchedulerTask]({% slug api_scheduler_schedulertask %}) component.
9
9
  */
10
10
  export interface SchedulerTaskProps extends Item {
11
- /** @hidden */
12
- refTo: any;
13
11
  /**
14
12
  * Specifies the `id` of the wrapping element of the SchedulerTask.
15
13
  */
@@ -35,6 +33,18 @@ export interface SchedulerTaskProps extends Item {
35
33
  * The `delete` icon is rendered only when `props.editable` or `props.editable.remove` is `true`
36
34
  */
37
35
  onRemoveClick?: (event: SchedulerTaskMouseEvent) => void;
36
+ /** @hidden */
37
+ refTo: any;
38
+ /** @hidden */
39
+ removeDialog?: any;
40
+ /** @hidden */
41
+ occurrenceDialog?: any;
42
+ /** @hidden */
43
+ showRemoveDialog?: boolean;
44
+ /** @hidden */
45
+ showOccurrenceDialog?: boolean;
46
+ /** @hidden */
47
+ removeItem?: object;
38
48
  }
39
49
  /**
40
50
  * Represents the props of the Kendo UI for Vue [SchedulerTask]({% slug api_scheduler_schedulertask %}) component.
@@ -22,7 +22,9 @@ var inject = allVue.inject;
22
22
  import { provideLocalizationService } from '@progress/kendo-vue-intl';
23
23
  import { deleteTitle, messages } from '../messages';
24
24
  import { getDefaultSlots } from '@progress/kendo-vue-common';
25
- import { useEditable } from '../hooks'; // tslint:enable:max-line-length
25
+ import { useEditable } from '../hooks';
26
+ import { SchedulerOccurrenceDialog } from '../components/SchedulerOccurrenceDialog';
27
+ import { SchedulerRemoveDialog } from '../components/SchedulerRemoveDialog'; // tslint:enable:max-line-length
26
28
 
27
29
  var SchedulerTaskVue2 = {
28
30
  name: 'KendoSchedulerTask',
@@ -54,7 +56,16 @@ var SchedulerTaskVue2 = {
54
56
  recurrenceRule: String,
55
57
  recurrenceId: [String, Number],
56
58
  dataItem: Object,
57
- editable: [Object, Boolean]
59
+ removeItem: Object,
60
+ editable: [Object, Boolean],
61
+ showOccurrenceDialog: {
62
+ type: Boolean,
63
+ default: undefined
64
+ },
65
+ showRemoveDialog: {
66
+ type: Boolean,
67
+ default: undefined
68
+ }
58
69
  },
59
70
  inject: {
60
71
  kendoLocalizationService: {
@@ -65,6 +76,18 @@ var SchedulerTaskVue2 = {
65
76
  },
66
77
  taskDoubleClick: {
67
78
  default: null
79
+ },
80
+ ksCancel: {
81
+ default: null
82
+ },
83
+ ksSeriesClick: {
84
+ default: null
85
+ },
86
+ ksOccurrenceClick: {
87
+ default: null
88
+ },
89
+ ksRemoveConfirm: {
90
+ default: null
68
91
  }
69
92
  },
70
93
  created: function created() {
@@ -127,7 +150,35 @@ var SchedulerTaskVue2 = {
127
150
  }
128
151
  }, [h("span", {
129
152
  "class": "k-icon k-i-close"
130
- })])]);
153
+ })]), this.showOccurrenceDialog && h(SchedulerOccurrenceDialog, {
154
+ dataItem: this.removeItem,
155
+ attrs: this.v3 ? undefined : {
156
+ dataItem: this.removeItem,
157
+ isRemove: this.removeItem !== null
158
+ },
159
+ isRemove: this.removeItem !== null,
160
+ onClose: this.ksCancel,
161
+ on: this.v3 ? undefined : {
162
+ "close": this.ksCancel,
163
+ "occurrenceclose": this.ksOccurrenceClick,
164
+ "seriesclose": this.ksSeriesClick
165
+ },
166
+ onOccurrenceclose: this.ksOccurrenceClick,
167
+ onSeriesclose: this.ksSeriesClick
168
+ }), this.showRemoveDialog && h(SchedulerRemoveDialog, {
169
+ dataItem: this.removeItem,
170
+ attrs: this.v3 ? undefined : {
171
+ dataItem: this.removeItem
172
+ },
173
+ onClose: this.ksCancel,
174
+ on: this.v3 ? undefined : {
175
+ "close": this.ksCancel,
176
+ "cancel": this.ksCancel,
177
+ "confirm": this.ksRemoveConfirm
178
+ },
179
+ onCancel: this.ksCancel,
180
+ onConfirm: this.ksRemoveConfirm
181
+ })]);
131
182
  },
132
183
  methods: {
133
184
  handleRemoveClick: function handleRemoveClick(event) {
@@ -36,8 +36,17 @@ var SchedulerViewTaskVue2 = {
36
36
  recurrenceRule: String,
37
37
  recurrenceId: [String, Number],
38
38
  dataItem: Object,
39
+ removeItem: Object,
39
40
  task: [String, Function, Object],
40
- editable: [Object, Boolean]
41
+ editable: [Object, Boolean],
42
+ showOccurrenceDialog: {
43
+ type: Boolean,
44
+ default: undefined
45
+ },
46
+ showRemoveDialog: {
47
+ type: Boolean,
48
+ default: undefined
49
+ }
41
50
  },
42
51
  // @ts-ignore
43
52
  setup: !gh ? undefined : function () {
@@ -81,7 +90,10 @@ var SchedulerViewTaskVue2 = {
81
90
  recurrenceRule: this.$props.recurrenceRule,
82
91
  recurrenceId: this.$props.recurrenceId,
83
92
  dataItem: this.$props.dataItem,
84
- editable: this.$props.editable
93
+ removeItem: this.removeItem,
94
+ editable: this.$props.editable,
95
+ showOccurrenceDialog: this.showOccurrenceDialog,
96
+ showRemoveDialog: this.showRemoveDialog
85
97
  },
86
98
  tabIndex: this.$props.tabIndex,
87
99
  head: this.$props.head,
@@ -108,7 +120,10 @@ var SchedulerViewTaskVue2 = {
108
120
  recurrenceRule: this.$props.recurrenceRule,
109
121
  recurrenceId: this.$props.recurrenceId,
110
122
  dataItem: this.$props.dataItem,
123
+ removeItem: this.removeItem,
111
124
  editable: this.$props.editable,
125
+ showOccurrenceDialog: this.showOccurrenceDialog,
126
+ showRemoveDialog: this.showRemoveDialog,
112
127
  onRemoveclick: this.handleRemoveClick,
113
128
  on: this.v3 ? undefined : {
114
129
  "removeclick": this.handleRemoveClick
@@ -120,7 +135,10 @@ var SchedulerViewTaskVue2 = {
120
135
  h: h,
121
136
  template: this.$props.task,
122
137
  defaultRendering: taskRenderDefaultRendering,
123
- defaultSlots: defaultSlot
138
+ defaultSlots: defaultSlot,
139
+ additionalListeners: {
140
+ 'removeclick': this.handleRemoveClick
141
+ }
124
142
  });
125
143
  return taskRender;
126
144
  },
@@ -75,7 +75,8 @@ var SchedulerDragVue2 = {
75
75
  });
76
76
  mapItemsToSlots(this.items, slots);
77
77
  return (// fragment
78
- h("div", [this.items.map(function (item, idx) {
78
+ // <div>
79
+ this.items.map(function (item, idx) {
79
80
  return h(SchedulerViewItem, {
80
81
  key: idx,
81
82
  uid: item.uid,
@@ -138,7 +139,8 @@ var SchedulerDragVue2 = {
138
139
  vertical: this.$props.vertical,
139
140
  ignoreIsAllDay: this.$props.ignoreIsAllDay
140
141
  });
141
- }, this)])
142
+ }, this) // </div>
143
+
142
144
  );
143
145
  }
144
146
  };
@@ -102,6 +102,10 @@ export interface MultiDayViewProps extends SchedulerViewProps {
102
102
  * Overrides the `item` prop of the Scheduler for the specified view only.
103
103
  */
104
104
  item?: any;
105
+ /**
106
+ * Overrides the `dragItem` prop of the Scheduler for the specified view only.
107
+ */
108
+ dragItem?: any;
105
109
  /**
106
110
  * Overrides the `viewItem` prop of the Scheduler for the specified view only.
107
111
  */
@@ -47,6 +47,7 @@ import { mapItemsToSlots, mapSlotsToItems, isInTimeRange, toUTCDateTime, interse
47
47
  import { provideIntlService } from '@progress/kendo-vue-intl';
48
48
  import { MS_PER_MINUTE } from '../../constants';
49
49
  import { toRanges, toItems, toSlots, toOccurrences } from '../../services/';
50
+ import { SchedulerDrag } from '../../views/common/SchedulerDrag';
50
51
  import { SchedulerEditSlot } from '../../slots/SchedulerEditSlot';
51
52
  import { SchedulerEditItem } from '../../items/SchedulerEditItem';
52
53
  import { CurrentTimeMarker } from '../../components/CurrentTimeMarket';
@@ -126,6 +127,12 @@ var MultiDayViewVue2 = {
126
127
  type: String,
127
128
  default: '{0:d} - {1:d}'
128
129
  },
130
+ dragItem: {
131
+ type: Object,
132
+ default: function _default() {
133
+ return undefined;
134
+ }
135
+ },
129
136
  // showCurrentTime: {
130
137
  // type: Boolean,
131
138
  // default: true
@@ -244,8 +251,16 @@ var MultiDayViewVue2 = {
244
251
  mapItemsToSlots(timeItems, this.timeSlots, false);
245
252
  mapSlotsToItems(timeItems, this.timeSlots, false);
246
253
  return timeItems;
254
+ },
255
+ compDragItem: function compDragItem() {
256
+ return this.dragItem !== undefined ? this.dragItem : this.currentDragItem;
247
257
  }
248
258
  },
259
+ data: function data() {
260
+ return {
261
+ currentDragItem: undefined
262
+ };
263
+ },
249
264
  created: function created() {
250
265
  this.intl = provideIntlService(this);
251
266
  },
@@ -279,6 +294,34 @@ var MultiDayViewVue2 = {
279
294
  var timeItems = this.timeItems;
280
295
  var daySlots = this.daySlots;
281
296
  var timeSlots = this.timeSlots;
297
+
298
+ var dragItemClue = function dragItemClue(vertical) {
299
+ return this.compDragItem && this.$props.editable.drag && (Array.isArray(this.compDragItem) ? this.compDragItem.map(function (di, idx) {
300
+ return h(SchedulerDrag, {
301
+ key: idx // ignoreIsAllDay={ignoreIsAllDay}
302
+ ,
303
+ dataItem: di,
304
+ attrs: this.v3 ? undefined : {
305
+ dataItem: di,
306
+ vertical: vertical,
307
+ item: this.$props.dataItem
308
+ },
309
+ vertical: vertical,
310
+ item: this.$props.dataItem
311
+ });
312
+ }, this) : h(SchedulerDrag // ignoreIsAllDay={ignoreIsAllDay}
313
+ , {
314
+ dataItem: this.compDragItem,
315
+ attrs: this.v3 ? undefined : {
316
+ dataItem: this.compDragItem,
317
+ vertical: vertical,
318
+ item: this.$props.dataItem
319
+ },
320
+ vertical: vertical,
321
+ item: this.$props.dataItem
322
+ }));
323
+ };
324
+
282
325
  return (// @ts-ignore function children
283
326
  h(BaseView, {
284
327
  id: this.$props.id,
@@ -451,7 +494,9 @@ var MultiDayViewVue2 = {
451
494
  editable: this.$props.editable,
452
495
  vertical: false
453
496
  });
454
- }, _this2)] : // @ts-ignore function children
497
+ }, _this2) // ,
498
+ // dragItemClue.call(this, false)
499
+ ] : // @ts-ignore function children
455
500
  h(VerticalResourceIterator, {
456
501
  group: _this2.ks.props.group,
457
502
  attrs: _this2.v3 ? undefined : {
@@ -789,15 +834,17 @@ var MultiDayViewVue2 = {
789
834
  format: 't',
790
835
  onDataaction: this.handleDataAction,
791
836
  on: this.v3 ? undefined : {
792
- "dataaction": this.handleDataAction
837
+ "dataaction": this.handleDataAction,
838
+ "dragitemchange": this.handleDragItemChange
793
839
  },
840
+ onDragitemchange: this.handleDragItemChange,
794
841
  viewItem: this.$props.viewItem,
795
842
  item: this.$props.item,
796
843
  form: this.$props.form,
797
844
  editable: this.$props.editable,
798
845
  vertical: true
799
846
  });
800
- }, _this2)])];
847
+ }, _this2), dragItemClue.call(_this2, true)])];
801
848
  } : [h("div", {
802
849
  "class": "k-scheduler-head"
803
850
  }, [_this2.ks.orientation === 'horizontal' ? [h(HorizontalResourceIterator, {
@@ -1278,20 +1325,25 @@ var MultiDayViewVue2 = {
1278
1325
  format: 't',
1279
1326
  onDataaction: this.handleDataAction,
1280
1327
  on: this.v3 ? undefined : {
1281
- "dataaction": this.handleDataAction
1328
+ "dataaction": this.handleDataAction,
1329
+ "dragitemchange": this.handleDragItemChange
1282
1330
  },
1331
+ onDragitemchange: this.handleDragItemChange,
1283
1332
  viewItem: this.$props.viewItem,
1284
1333
  item: this.$props.item,
1285
1334
  form: this.$props.form,
1286
1335
  editable: this.$props.editable,
1287
1336
  vertical: true
1288
1337
  });
1289
- }, _this2)])])
1338
+ }, _this2), dragItemClue.call(_this2, true)])])
1290
1339
  );
1291
1340
  },
1292
1341
  methods: {
1293
1342
  handleDataAction: function handleDataAction(action) {
1294
1343
  this.$emit('dataaction', action);
1344
+ },
1345
+ handleDragItemChange: function handleDragItemChange(item) {
1346
+ this.currentDragItem = item;
1295
1347
  }
1296
1348
  }
1297
1349
  };
@@ -168,6 +168,14 @@ export interface SchedulerProps {
168
168
  * Sets a default selected `Date`. The `defaultDate` property is used to specify the initial rendered date, while still remaining in an uncontrolled mode.
169
169
  */
170
170
  defaultDate?: Date;
171
+ /**
172
+ * Function that returns custom validator for the form.
173
+ */
174
+ validator?: Function;
175
+ /**
176
+ * Function that returns custom initial values for the fields of the form.
177
+ */
178
+ modifyInitialFormValues?: Function;
171
179
  /**
172
180
  * Force a `rtl` mode. For more information refer to [RTL Support]({% slug globalization_scheduler %}#toc-right-to-left-support)
173
181
  */
@@ -127,6 +127,18 @@ var SchedulerVue2 = {
127
127
  type: Date,
128
128
  default: new Date()
129
129
  },
130
+ validator: {
131
+ type: Function,
132
+ default: function _default() {
133
+ return {};
134
+ }
135
+ },
136
+ modifyInitialFormValues: {
137
+ type: Function,
138
+ default: function _default(i) {
139
+ return i;
140
+ }
141
+ },
130
142
  header: [String, Function, Object],
131
143
  footer: [String, Function, Object],
132
144
  slotRender: [String, Function, Object],
@@ -157,7 +169,9 @@ var SchedulerVue2 = {
157
169
  slotDoubleClick: this.handleSlotDoubleClick,
158
170
  slotClick: this.handleSlotClick,
159
171
  taskDoubleClick: this.handleTaskDoubleClick,
160
- taskClick: this.handleTaskClick
172
+ taskClick: this.handleTaskClick,
173
+ ksValidator: this.validator,
174
+ ksModifyInitialFormValues: this.modifyInitialFormValues
161
175
  };
162
176
  },
163
177
  data: function data() {
@@ -6,4 +6,5 @@ import * as Vue from 'vue';
6
6
  type Vue2type = Vue.default;
7
7
  // @ts-ignore
8
8
  import { RecordPropsDefinition, ComponentOptions } from 'vue/types/options';
9
+ // @ts-ignore
9
10
  export { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type };