@progress/kendo-vue-scheduler 3.2.4-dev.202204201306 → 3.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/js/kendo-vue-scheduler.js +1 -1
- package/dist/es/Scheduler.d.ts +8 -0
- package/dist/es/Scheduler.js +15 -1
- package/dist/es/additionalTypes.ts +1 -0
- package/dist/es/components/SchedulerForm.js +30 -22
- package/dist/es/items/SchedulerEditItem.js +20 -151
- package/dist/es/items/SchedulerItem.d.ts +12 -0
- package/dist/es/items/SchedulerItem.js +74 -3
- package/dist/es/items/SchedulerViewItem.js +46 -2
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/views/common/SchedulerDrag.js +4 -2
- package/dist/es/views/day/MultiDayView.d.ts +4 -0
- package/dist/es/views/day/MultiDayView.js +57 -5
- package/dist/npm/Scheduler.d.ts +8 -0
- package/dist/npm/Scheduler.js +15 -1
- package/dist/npm/additionalTypes.ts +1 -0
- package/dist/npm/components/SchedulerForm.js +29 -21
- package/dist/npm/items/SchedulerEditItem.js +20 -155
- package/dist/npm/items/SchedulerItem.d.ts +12 -0
- package/dist/npm/items/SchedulerItem.js +77 -3
- package/dist/npm/items/SchedulerViewItem.js +46 -2
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/views/common/SchedulerDrag.js +4 -2
- package/dist/npm/views/day/MultiDayView.d.ts +4 -0
- package/dist/npm/views/day/MultiDayView.js +58 -5
- package/package.json +12 -12
|
@@ -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)
|
|
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
|
};
|
package/dist/npm/Scheduler.d.ts
CHANGED
|
@@ -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
|
*/
|
package/dist/npm/Scheduler.js
CHANGED
|
@@ -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() {
|
|
@@ -53,13 +53,7 @@ var SchedulerFormVue2 = {
|
|
|
53
53
|
dataItem: Object,
|
|
54
54
|
renderForm: Object,
|
|
55
55
|
editor: [String, Function, Object],
|
|
56
|
-
dialog: [String, Function, Object]
|
|
57
|
-
validator: {
|
|
58
|
-
type: Function,
|
|
59
|
-
default: function _default() {
|
|
60
|
-
return {};
|
|
61
|
-
}
|
|
62
|
-
}
|
|
56
|
+
dialog: [String, Function, Object]
|
|
63
57
|
},
|
|
64
58
|
inject: {
|
|
65
59
|
ks: {
|
|
@@ -67,6 +61,12 @@ var SchedulerFormVue2 = {
|
|
|
67
61
|
},
|
|
68
62
|
kendoLocalizationService: {
|
|
69
63
|
default: null
|
|
64
|
+
},
|
|
65
|
+
ksValidator: {
|
|
66
|
+
default: null
|
|
67
|
+
},
|
|
68
|
+
ksModifyInitialFormValues: {
|
|
69
|
+
default: null
|
|
70
70
|
}
|
|
71
71
|
},
|
|
72
72
|
// @ts-ignore
|
|
@@ -114,9 +114,9 @@ var SchedulerFormVue2 = {
|
|
|
114
114
|
}, this.v3 ? function () {
|
|
115
115
|
return [// @ts-ignore function children
|
|
116
116
|
h(kendo_vue_form_1.Form, {
|
|
117
|
-
initialValues: _this.$props.dataItem,
|
|
117
|
+
initialValues: _this.ksModifyInitialFormValues(_this.$props.dataItem),
|
|
118
118
|
attrs: _this.v3 ? undefined : {
|
|
119
|
-
initialValues: _this.$props.dataItem,
|
|
119
|
+
initialValues: _this.ksModifyInitialFormValues(_this.$props.dataItem),
|
|
120
120
|
validator: _this.formValidator
|
|
121
121
|
},
|
|
122
122
|
onSubmit: _this.handleSubmit,
|
|
@@ -127,11 +127,13 @@ var SchedulerFormVue2 = {
|
|
|
127
127
|
}, _this.v3 ? function () {
|
|
128
128
|
return [// @ts-ignore function children
|
|
129
129
|
h(SchedulerFormEditor_1.SchedulerFormEditor, {
|
|
130
|
-
// {...this.renderProps}
|
|
131
|
-
|
|
130
|
+
renderForm: _this.renderForm // {...this.renderProps}
|
|
131
|
+
,
|
|
132
132
|
attrs: _this.v3 ? undefined : {
|
|
133
|
+
renderForm: _this.renderForm,
|
|
133
134
|
as: Editor
|
|
134
|
-
}
|
|
135
|
+
},
|
|
136
|
+
as: Editor
|
|
135
137
|
}, _this.v3 ? function () {
|
|
136
138
|
return [h(SchedulerActionButtons_1.SchedulerActionButtons, {
|
|
137
139
|
editSaveMessage: editSaveMessage,
|
|
@@ -158,10 +160,12 @@ var SchedulerFormVue2 = {
|
|
|
158
160
|
}
|
|
159
161
|
})])];
|
|
160
162
|
} : [h(SchedulerFormEditor_1.SchedulerFormEditor, {
|
|
161
|
-
|
|
163
|
+
renderForm: _this.renderForm,
|
|
162
164
|
attrs: _this.v3 ? undefined : {
|
|
165
|
+
renderForm: _this.renderForm,
|
|
163
166
|
as: Editor
|
|
164
|
-
}
|
|
167
|
+
},
|
|
168
|
+
as: Editor
|
|
165
169
|
}, _this.v3 ? function () {
|
|
166
170
|
return [h(SchedulerActionButtons_1.SchedulerActionButtons, {
|
|
167
171
|
editSaveMessage: editSaveMessage,
|
|
@@ -188,9 +192,9 @@ var SchedulerFormVue2 = {
|
|
|
188
192
|
}
|
|
189
193
|
})])])];
|
|
190
194
|
} : [h(kendo_vue_form_1.Form, {
|
|
191
|
-
initialValues: _this.$props.dataItem,
|
|
195
|
+
initialValues: _this.ksModifyInitialFormValues(_this.$props.dataItem),
|
|
192
196
|
attrs: _this.v3 ? undefined : {
|
|
193
|
-
initialValues: _this.$props.dataItem,
|
|
197
|
+
initialValues: _this.ksModifyInitialFormValues(_this.$props.dataItem),
|
|
194
198
|
validator: _this.formValidator
|
|
195
199
|
},
|
|
196
200
|
onSubmit: _this.handleSubmit,
|
|
@@ -200,10 +204,12 @@ var SchedulerFormVue2 = {
|
|
|
200
204
|
validator: _this.formValidator
|
|
201
205
|
}, _this.v3 ? function () {
|
|
202
206
|
return [h(SchedulerFormEditor_1.SchedulerFormEditor, {
|
|
203
|
-
|
|
207
|
+
renderForm: _this.renderForm,
|
|
204
208
|
attrs: _this.v3 ? undefined : {
|
|
209
|
+
renderForm: _this.renderForm,
|
|
205
210
|
as: Editor
|
|
206
|
-
}
|
|
211
|
+
},
|
|
212
|
+
as: Editor
|
|
207
213
|
}, _this.v3 ? function () {
|
|
208
214
|
return [h(SchedulerActionButtons_1.SchedulerActionButtons, {
|
|
209
215
|
editSaveMessage: editSaveMessage,
|
|
@@ -230,10 +236,12 @@ var SchedulerFormVue2 = {
|
|
|
230
236
|
}
|
|
231
237
|
})])];
|
|
232
238
|
} : [h(SchedulerFormEditor_1.SchedulerFormEditor, {
|
|
233
|
-
|
|
239
|
+
renderForm: _this.renderForm,
|
|
234
240
|
attrs: _this.v3 ? undefined : {
|
|
241
|
+
renderForm: _this.renderForm,
|
|
235
242
|
as: Editor
|
|
236
|
-
}
|
|
243
|
+
},
|
|
244
|
+
as: Editor
|
|
237
245
|
}, _this.v3 ? function () {
|
|
238
246
|
return [h(SchedulerActionButtons_1.SchedulerActionButtons, {
|
|
239
247
|
editSaveMessage: editSaveMessage,
|
|
@@ -301,7 +309,7 @@ var SchedulerFormVue2 = {
|
|
|
301
309
|
result[this.ks.fields.end] = [this.requiredValidator(formValueGetter(this.ks.fields.start)), this.endAfterStartValidator(formValueGetter(this.ks.fields.start), formValueGetter)].filter(Boolean).reduce(function (current, acc) {
|
|
302
310
|
return current || acc;
|
|
303
311
|
}, '');
|
|
304
|
-
var additionalValidator = this
|
|
312
|
+
var additionalValidator = this.ksValidator(_dataItem, formValueGetter);
|
|
305
313
|
return __assign(__assign({}, result), additionalValidator);
|
|
306
314
|
}
|
|
307
315
|
}
|
|
@@ -27,18 +27,10 @@ var allVue = Vue;
|
|
|
27
27
|
var gh = allVue.h;
|
|
28
28
|
var inject = allVue.inject;
|
|
29
29
|
|
|
30
|
-
var SchedulerOccurrenceDialog_1 = require("../components/SchedulerOccurrenceDialog");
|
|
31
|
-
|
|
32
|
-
var SchedulerForm_1 = require("../components/SchedulerForm");
|
|
33
|
-
|
|
34
|
-
var SchedulerRemoveDialog_1 = require("../components/SchedulerRemoveDialog");
|
|
35
|
-
|
|
36
30
|
var Scheduler_1 = require("../Scheduler");
|
|
37
31
|
|
|
38
32
|
var kendo_vue_common_1 = require("@progress/kendo-vue-common");
|
|
39
33
|
|
|
40
|
-
var SchedulerDrag_1 = require("../views/common/SchedulerDrag");
|
|
41
|
-
|
|
42
34
|
var SchedulerViewItem_1 = require("./SchedulerViewItem");
|
|
43
35
|
|
|
44
36
|
var hooks_1 = require("../hooks");
|
|
@@ -134,7 +126,12 @@ var SchedulerEditItemVue2 = {
|
|
|
134
126
|
},
|
|
135
127
|
provide: function provide() {
|
|
136
128
|
return {
|
|
137
|
-
ei: this.ei
|
|
129
|
+
ei: this.ei,
|
|
130
|
+
ksCancel: this.handleCancel,
|
|
131
|
+
ksFormSubmit: this.handleFormSubmit,
|
|
132
|
+
ksOccurrenceClick: this.handleOccurrenceClick,
|
|
133
|
+
ksSeriesClick: this.handleSeriesClick,
|
|
134
|
+
ksRemoveConfirm: this.handleRemoveConfirm
|
|
138
135
|
};
|
|
139
136
|
},
|
|
140
137
|
data: function data() {
|
|
@@ -204,8 +201,6 @@ var SchedulerEditItemVue2 = {
|
|
|
204
201
|
},
|
|
205
202
|
// @ts-ignore
|
|
206
203
|
render: function render(createElement) {
|
|
207
|
-
var _this2 = this;
|
|
208
|
-
|
|
209
204
|
var _this = this;
|
|
210
205
|
|
|
211
206
|
var h = gh || createElement; // tslint:enable:max-line-length
|
|
@@ -325,7 +320,13 @@ var SchedulerEditItemVue2 = {
|
|
|
325
320
|
vertical: this.vertical,
|
|
326
321
|
dragHint: this.dragHint,
|
|
327
322
|
resizeHint: this.resizeHint,
|
|
328
|
-
format: this.format
|
|
323
|
+
format: this.format,
|
|
324
|
+
showOccurrenceDialog: this.compShowOccurrenceDialog,
|
|
325
|
+
showRemoveDialog: this.compShowRemoveDialog,
|
|
326
|
+
formItem: this.compFormItem,
|
|
327
|
+
dragItem: this.compDragItem,
|
|
328
|
+
resizeItem: this.compResizeItem,
|
|
329
|
+
removeItem: this.compRemoveItem // refTo={this}
|
|
329
330
|
,
|
|
330
331
|
itemRef: this.item,
|
|
331
332
|
selected: selected,
|
|
@@ -365,6 +366,12 @@ var SchedulerEditItemVue2 = {
|
|
|
365
366
|
dragHint: this.dragHint,
|
|
366
367
|
resizeHint: this.resizeHint,
|
|
367
368
|
format: this.format,
|
|
369
|
+
showOccurrenceDialog: this.compShowOccurrenceDialog,
|
|
370
|
+
showRemoveDialog: this.compShowRemoveDialog,
|
|
371
|
+
formItem: this.compFormItem,
|
|
372
|
+
dragItem: this.compDragItem,
|
|
373
|
+
resizeItem: this.compResizeItem,
|
|
374
|
+
removeItem: this.compRemoveItem,
|
|
368
375
|
itemRef: this.item,
|
|
369
376
|
selected: selected,
|
|
370
377
|
tabIndex: this.tabIndex,
|
|
@@ -404,149 +411,7 @@ var SchedulerEditItemVue2 = {
|
|
|
404
411
|
onResizeenddrag: this.handleResizeEndDrag,
|
|
405
412
|
onResizestartdrag: this.handleResizeStartDrag,
|
|
406
413
|
onResizeselease: this.handleResizeRelease
|
|
407
|
-
}
|
|
408
|
-
return [_this2.compFormItem && !showOccurrenceDialog && editable.edit && h(SchedulerForm_1.SchedulerForm, {
|
|
409
|
-
dataItem: _this2.compFormItem,
|
|
410
|
-
attrs: _this2.v3 ? undefined : {
|
|
411
|
-
dataItem: _this2.compFormItem
|
|
412
|
-
},
|
|
413
|
-
onSubmit: _this2.handleFormSubmit,
|
|
414
|
-
on: _this2.v3 ? undefined : {
|
|
415
|
-
"submit": _this2.handleFormSubmit,
|
|
416
|
-
"close": _this2.handleCancel,
|
|
417
|
-
"cancel": _this2.handleCancel
|
|
418
|
-
},
|
|
419
|
-
onClose: _this2.handleCancel,
|
|
420
|
-
onCancel: _this2.handleCancel
|
|
421
|
-
}), _this2.compDragItem && editable.drag && (Array.isArray(_this2.compDragItem) ? _this2.compDragItem.map(function (di, idx) {
|
|
422
|
-
return h(SchedulerDrag_1.SchedulerDrag, {
|
|
423
|
-
key: idx,
|
|
424
|
-
ignoreIsAllDay: ignoreIsAllDay,
|
|
425
|
-
attrs: this.v3 ? undefined : {
|
|
426
|
-
ignoreIsAllDay: ignoreIsAllDay,
|
|
427
|
-
dataItem: di,
|
|
428
|
-
vertical: this.$props.vertical,
|
|
429
|
-
viewItem: ViewItem,
|
|
430
|
-
item: this.$props.dataItem
|
|
431
|
-
},
|
|
432
|
-
dataItem: di,
|
|
433
|
-
vertical: this.$props.vertical,
|
|
434
|
-
viewItem: ViewItem,
|
|
435
|
-
item: this.$props.dataItem
|
|
436
|
-
});
|
|
437
|
-
}, _this2) : h(SchedulerDrag_1.SchedulerDrag, {
|
|
438
|
-
ignoreIsAllDay: ignoreIsAllDay,
|
|
439
|
-
attrs: _this2.v3 ? undefined : {
|
|
440
|
-
ignoreIsAllDay: ignoreIsAllDay,
|
|
441
|
-
dataItem: _this2.compDragItem,
|
|
442
|
-
vertical: _this2.$props.vertical,
|
|
443
|
-
viewItem: ViewItem,
|
|
444
|
-
item: _this2.$props.dataItem
|
|
445
|
-
},
|
|
446
|
-
dataItem: _this2.compDragItem,
|
|
447
|
-
vertical: _this2.$props.vertical,
|
|
448
|
-
viewItem: ViewItem,
|
|
449
|
-
item: _this2.$props.dataItem
|
|
450
|
-
})), _this2.compShowOccurrenceDialog && h(SchedulerOccurrenceDialog_1.SchedulerOccurrenceDialog, {
|
|
451
|
-
dataItem: _this2.compFormItem || _this2.compDragItem || _this2.compResizeItem || _this2.compRemoveItem,
|
|
452
|
-
attrs: _this2.v3 ? undefined : {
|
|
453
|
-
dataItem: _this2.compFormItem || _this2.compDragItem || _this2.compResizeItem || _this2.compRemoveItem,
|
|
454
|
-
isRemove: !!_this2.compRemoveItem
|
|
455
|
-
},
|
|
456
|
-
isRemove: !!_this2.compRemoveItem,
|
|
457
|
-
onClose: _this2.handleCancel,
|
|
458
|
-
on: _this2.v3 ? undefined : {
|
|
459
|
-
"close": _this2.handleCancel,
|
|
460
|
-
"occurrenceclose": _this2.handleOccurrenceClick,
|
|
461
|
-
"seriesclose": _this2.handleSeriesClick
|
|
462
|
-
},
|
|
463
|
-
onOccurrenceclose: _this2.handleOccurrenceClick,
|
|
464
|
-
onSeriesclose: _this2.handleSeriesClick
|
|
465
|
-
}), _this2.compShowRemoveDialog && _this2.compRemoveItem && editable.remove && h(SchedulerRemoveDialog_1.SchedulerRemoveDialog, {
|
|
466
|
-
dataItem: _this2.compRemoveItem,
|
|
467
|
-
attrs: _this2.v3 ? undefined : {
|
|
468
|
-
dataItem: _this2.compRemoveItem
|
|
469
|
-
},
|
|
470
|
-
onClose: _this2.handleCancel,
|
|
471
|
-
on: _this2.v3 ? undefined : {
|
|
472
|
-
"close": _this2.handleCancel,
|
|
473
|
-
"cancel": _this2.handleCancel,
|
|
474
|
-
"confirm": _this2.handleRemoveConfirm
|
|
475
|
-
},
|
|
476
|
-
onCancel: _this2.handleCancel,
|
|
477
|
-
onConfirm: _this2.handleRemoveConfirm
|
|
478
|
-
})];
|
|
479
|
-
} : [_this2.compFormItem && !showOccurrenceDialog && editable.edit && h(SchedulerForm_1.SchedulerForm, {
|
|
480
|
-
dataItem: _this2.compFormItem,
|
|
481
|
-
attrs: _this2.v3 ? undefined : {
|
|
482
|
-
dataItem: _this2.compFormItem
|
|
483
|
-
},
|
|
484
|
-
onSubmit: _this2.handleFormSubmit,
|
|
485
|
-
on: _this2.v3 ? undefined : {
|
|
486
|
-
"submit": _this2.handleFormSubmit,
|
|
487
|
-
"close": _this2.handleCancel,
|
|
488
|
-
"cancel": _this2.handleCancel
|
|
489
|
-
},
|
|
490
|
-
onClose: _this2.handleCancel,
|
|
491
|
-
onCancel: _this2.handleCancel
|
|
492
|
-
}), _this2.compDragItem && editable.drag && (Array.isArray(_this2.compDragItem) ? _this2.compDragItem.map(function (di, idx) {
|
|
493
|
-
return h(SchedulerDrag_1.SchedulerDrag, {
|
|
494
|
-
key: idx,
|
|
495
|
-
ignoreIsAllDay: ignoreIsAllDay,
|
|
496
|
-
attrs: this.v3 ? undefined : {
|
|
497
|
-
ignoreIsAllDay: ignoreIsAllDay,
|
|
498
|
-
dataItem: di,
|
|
499
|
-
vertical: this.$props.vertical,
|
|
500
|
-
viewItem: ViewItem,
|
|
501
|
-
item: this.$props.dataItem
|
|
502
|
-
},
|
|
503
|
-
dataItem: di,
|
|
504
|
-
vertical: this.$props.vertical,
|
|
505
|
-
viewItem: ViewItem,
|
|
506
|
-
item: this.$props.dataItem
|
|
507
|
-
});
|
|
508
|
-
}, _this2) : h(SchedulerDrag_1.SchedulerDrag, {
|
|
509
|
-
ignoreIsAllDay: ignoreIsAllDay,
|
|
510
|
-
attrs: _this2.v3 ? undefined : {
|
|
511
|
-
ignoreIsAllDay: ignoreIsAllDay,
|
|
512
|
-
dataItem: _this2.compDragItem,
|
|
513
|
-
vertical: _this2.$props.vertical,
|
|
514
|
-
viewItem: ViewItem,
|
|
515
|
-
item: _this2.$props.dataItem
|
|
516
|
-
},
|
|
517
|
-
dataItem: _this2.compDragItem,
|
|
518
|
-
vertical: _this2.$props.vertical,
|
|
519
|
-
viewItem: ViewItem,
|
|
520
|
-
item: _this2.$props.dataItem
|
|
521
|
-
})), _this2.compShowOccurrenceDialog && h(SchedulerOccurrenceDialog_1.SchedulerOccurrenceDialog, {
|
|
522
|
-
dataItem: _this2.compFormItem || _this2.compDragItem || _this2.compResizeItem || _this2.compRemoveItem,
|
|
523
|
-
attrs: _this2.v3 ? undefined : {
|
|
524
|
-
dataItem: _this2.compFormItem || _this2.compDragItem || _this2.compResizeItem || _this2.compRemoveItem,
|
|
525
|
-
isRemove: !!_this2.compRemoveItem
|
|
526
|
-
},
|
|
527
|
-
isRemove: !!_this2.compRemoveItem,
|
|
528
|
-
onClose: _this2.handleCancel,
|
|
529
|
-
on: _this2.v3 ? undefined : {
|
|
530
|
-
"close": _this2.handleCancel,
|
|
531
|
-
"occurrenceclose": _this2.handleOccurrenceClick,
|
|
532
|
-
"seriesclose": _this2.handleSeriesClick
|
|
533
|
-
},
|
|
534
|
-
onOccurrenceclose: _this2.handleOccurrenceClick,
|
|
535
|
-
onSeriesclose: _this2.handleSeriesClick
|
|
536
|
-
}), _this2.compShowRemoveDialog && _this2.compRemoveItem && editable.remove && h(SchedulerRemoveDialog_1.SchedulerRemoveDialog, {
|
|
537
|
-
dataItem: _this2.compRemoveItem,
|
|
538
|
-
attrs: _this2.v3 ? undefined : {
|
|
539
|
-
dataItem: _this2.compRemoveItem
|
|
540
|
-
},
|
|
541
|
-
onClose: _this2.handleCancel,
|
|
542
|
-
on: _this2.v3 ? undefined : {
|
|
543
|
-
"close": _this2.handleCancel,
|
|
544
|
-
"cancel": _this2.handleCancel,
|
|
545
|
-
"confirm": _this2.handleRemoveConfirm
|
|
546
|
-
},
|
|
547
|
-
onCancel: _this2.handleCancel,
|
|
548
|
-
onConfirm: _this2.handleRemoveConfirm
|
|
549
|
-
})]) // {((resizeItem && editable.resize)) && (Array.isArray(resizeItem)
|
|
414
|
+
}) // {((resizeItem && editable.resize)) && (Array.isArray(resizeItem)
|
|
550
415
|
// ? (resizeItem as any).map((ri, idx) => (
|
|
551
416
|
// <Resize
|
|
552
417
|
// key={idx}
|
|
@@ -179,6 +179,18 @@ export interface SchedulerItemProps extends Item {
|
|
|
179
179
|
maxSiblingsPerSlot?: number;
|
|
180
180
|
/** @hidden */
|
|
181
181
|
itemTitle?: string;
|
|
182
|
+
/** @hidden */
|
|
183
|
+
showRemoveDialog?: boolean;
|
|
184
|
+
/** @hidden */
|
|
185
|
+
showOccurrenceDialog?: boolean;
|
|
186
|
+
/** @hidden */
|
|
187
|
+
formItem?: object;
|
|
188
|
+
/** @hidden */
|
|
189
|
+
dragItem?: object;
|
|
190
|
+
/** @hidden */
|
|
191
|
+
resizeItem?: object;
|
|
192
|
+
/** @hidden */
|
|
193
|
+
removeItem?: object;
|
|
182
194
|
}
|
|
183
195
|
/**
|
|
184
196
|
* Represents the object which is returned from the `ref` callback of the [SchedulerItem]({% slug api_scheduler_scheduleritem %}).
|
|
@@ -37,7 +37,13 @@ var messages_1 = require("../messages");
|
|
|
37
37
|
|
|
38
38
|
var hooks_1 = require("../hooks");
|
|
39
39
|
|
|
40
|
-
var utils_2 = require("../utils");
|
|
40
|
+
var utils_2 = require("../utils");
|
|
41
|
+
|
|
42
|
+
var SchedulerOccurrenceDialog_1 = require("../components/SchedulerOccurrenceDialog");
|
|
43
|
+
|
|
44
|
+
var SchedulerRemoveDialog_1 = require("../components/SchedulerRemoveDialog");
|
|
45
|
+
|
|
46
|
+
var SchedulerForm_1 = require("../components/SchedulerForm"); // tslint:enable:max-line-length
|
|
41
47
|
|
|
42
48
|
|
|
43
49
|
var SchedulerItemVue2 = {
|
|
@@ -102,7 +108,19 @@ var SchedulerItemVue2 = {
|
|
|
102
108
|
resizeHint: Boolean,
|
|
103
109
|
format: String,
|
|
104
110
|
maxSiblingsPerSlot: Number,
|
|
105
|
-
itemTitle: String
|
|
111
|
+
itemTitle: String,
|
|
112
|
+
formItem: Object,
|
|
113
|
+
dragItem: Object,
|
|
114
|
+
resizeItem: Object,
|
|
115
|
+
removeItem: Object,
|
|
116
|
+
showOccurrenceDialog: {
|
|
117
|
+
type: Boolean,
|
|
118
|
+
default: undefined
|
|
119
|
+
},
|
|
120
|
+
showRemoveDialog: {
|
|
121
|
+
type: Boolean,
|
|
122
|
+
default: undefined
|
|
123
|
+
}
|
|
106
124
|
},
|
|
107
125
|
data: function data() {
|
|
108
126
|
return {
|
|
@@ -127,6 +145,21 @@ var SchedulerItemVue2 = {
|
|
|
127
145
|
},
|
|
128
146
|
itemDoubleClick: {
|
|
129
147
|
default: null
|
|
148
|
+
},
|
|
149
|
+
ksCancel: {
|
|
150
|
+
default: null
|
|
151
|
+
},
|
|
152
|
+
ksFormSubmit: {
|
|
153
|
+
default: null
|
|
154
|
+
},
|
|
155
|
+
ksOccurrenceClick: {
|
|
156
|
+
default: null
|
|
157
|
+
},
|
|
158
|
+
ksSeriesClick: {
|
|
159
|
+
default: null
|
|
160
|
+
},
|
|
161
|
+
ksRemoveConfirm: {
|
|
162
|
+
default: null
|
|
130
163
|
}
|
|
131
164
|
},
|
|
132
165
|
computed: {
|
|
@@ -295,7 +328,48 @@ var SchedulerItemVue2 = {
|
|
|
295
328
|
"class": "k-icon k-i-reload"
|
|
296
329
|
}), !this.$props.isRecurring && this.$props.isException && h("span", {
|
|
297
330
|
"class": "k-icon k-i-non-recurrence"
|
|
298
|
-
})]),
|
|
331
|
+
})]), this.formItem && !this.showOccurrenceDialog && editable.edit && h(SchedulerForm_1.SchedulerForm, {
|
|
332
|
+
dataItem: this.formItem,
|
|
333
|
+
attrs: this.v3 ? undefined : {
|
|
334
|
+
dataItem: this.formItem
|
|
335
|
+
},
|
|
336
|
+
onSubmit: this.ksFormSubmit,
|
|
337
|
+
on: this.v3 ? undefined : {
|
|
338
|
+
"submit": this.ksFormSubmit,
|
|
339
|
+
"close": this.ksCancel,
|
|
340
|
+
"cancel": this.ksCancel
|
|
341
|
+
},
|
|
342
|
+
onClose: this.ksCancel,
|
|
343
|
+
onCancel: this.ksCancel
|
|
344
|
+
}), this.showOccurrenceDialog && h(SchedulerOccurrenceDialog_1.SchedulerOccurrenceDialog, {
|
|
345
|
+
dataItem: this.formItem || this.dragItem || this.resizeItem || this.removeItem,
|
|
346
|
+
attrs: this.v3 ? undefined : {
|
|
347
|
+
dataItem: this.formItem || this.dragItem || this.resizeItem || this.removeItem,
|
|
348
|
+
isRemove: !!this.removeItem
|
|
349
|
+
},
|
|
350
|
+
isRemove: !!this.removeItem,
|
|
351
|
+
onClose: this.ksCancel,
|
|
352
|
+
on: this.v3 ? undefined : {
|
|
353
|
+
"close": this.ksCancel,
|
|
354
|
+
"occurrenceclose": this.ksOccurrenceClick,
|
|
355
|
+
"seriesclose": this.ksSeriesClick
|
|
356
|
+
},
|
|
357
|
+
onOccurrenceclose: this.ksOccurrenceClick,
|
|
358
|
+
onSeriesclose: this.ksSeriesClick
|
|
359
|
+
}), this.showRemoveDialog && this.removeItem && editable.remove && h(SchedulerRemoveDialog_1.SchedulerRemoveDialog, {
|
|
360
|
+
dataItem: this.removeItem,
|
|
361
|
+
attrs: this.v3 ? undefined : {
|
|
362
|
+
dataItem: this.removeItem
|
|
363
|
+
},
|
|
364
|
+
onClose: this.ksCancel,
|
|
365
|
+
on: this.v3 ? undefined : {
|
|
366
|
+
"close": this.ksCancel,
|
|
367
|
+
"cancel": this.ksCancel,
|
|
368
|
+
"confirm": this.ksRemoveConfirm
|
|
369
|
+
},
|
|
370
|
+
onCancel: this.ksCancel,
|
|
371
|
+
onConfirm: this.ksRemoveConfirm
|
|
372
|
+
}), defaultSlot, !this.$props.resizeHint && h("span", {
|
|
299
373
|
"class": "k-event-actions"
|
|
300
374
|
}, [editable.remove && h("a", {
|
|
301
375
|
tabIndex: -1,
|