@progress/kendo-vue-scheduler 10.0.1-develop.2 → 10.0.1-develop.4

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.
@@ -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 d=require("vue"),A=require("../constants/main.js"),h=require("@progress/kendo-vue-common"),C=require("./SchedulerViewItem.js"),g=require("../views/common/SchedulerDrag.js"),y=require("../views/common/SchedulerResize.js"),o=require("./hooks/use-form-item.js"),s=require("./hooks/use-show-occurrence-dialog.js"),n=require("./hooks/use-remove-item.js"),l=require("./hooks/use-show-remove-item-dialog.js"),a=require("./hooks/use-drag-item.js"),r=require("./hooks/use-resize-item.js"),I=require("./hooks/use-series.js"),m=require("../hooks/use-items-selection.js"),u=require("../utils/main.js"),p=require("../hooks/use-slots-focus.js"),E=require("../hooks/use-items-focus.js"),T=d.defineComponent({name:"KendoSchedulerEditItem",inheritAttrs:!1,props:{tabIndex:{type:Number,default:void 0},item:[String,Function,Object],viewItem:[String,Function,Object],drag:[String,Function,Object],resize:[String,Function,Object],form:[String,Function,Object],removeDialog:[String,Function,Object],occurrenceDialog:[String,Function,Object],formItem:Object,dragItem:Object,resizeItem:Object,removeItem:Object,showOccurrenceDialog:{type:Boolean,default:void 0},showRemoveDialog:{type:Boolean,default:void 0},series:{type:Boolean,default:void 0},uid:[String,Number],start:Date,end:Date,originalStart:Date,startTimezone:String,endTimezone:String,isAllDay:Boolean,title:String,description:String,occurrenceId:String,recurrenceExceptions:Array,recurrenceRule:String,recurrenceId:[String,Number],dataItem:Object,head:Boolean,tail:Boolean,order:Number,zonedStart:Object,zonedEnd:Object,slots:Array,group:Object,range:Object,isException:Boolean,isRecurring:Boolean,id:String,className:String,itemStyle:Object,editable:[Object,Boolean],readonly:Boolean,selected:Boolean,vertical:Boolean,dragHint:Boolean,resizeHint:Boolean,format:String,ignoreIsAllDay:Boolean,itemRef:Object,onRemoveclick:Function,onDataaction:Function,onFormItemChange:Function,onDragitemchange:Function,onResizeitemchange:Function},inject:{bv:{default:null},ks:{default:null},dispatchFocusedItems:{default:null},dispatchFocusedSlots:{default:null},dispatchSelectedItems:{default:null}},provide(){return{ei:this.ei,ksCancel:this.handleCancel,ksFormSubmit:this.handleFormSubmit,ksOccurrenceClick:this.handleOccurrenceClick,ksSeriesClick:this.handleSeriesClick,ksRemoveConfirm:this.handleRemoveConfirm,ksRemoveDialogCancel:this.handleRemoveDialogCancel,ksDeleteItem:this.handleDeleteItem,ksFormDelete:this.handleFormDelete,ksIsSeries:()=>this.compSeries===!0}},data(){return{ei:{props:this.$props,form:this.$props.formItem,drag:this.drag,resize:this.resize,remove:this.remove,showRemoveDialog:this.showRemoveDialog,showOccurrenceDialog:this.showOccurrenceDialog},currentFormItem:null,currentSelected:null,currentSeries:null,currentRemoveItem:null,currentDragItem:null,currentResizeItem:null,currentShowRemoveDialog:null,currentShowOccurrenceDialog:null}},computed:{currentTabIndex(){const t=this.bv.items.length&&this.bv.items[0].dataItem.id===this.dataItem.id;return this.$props.tabIndex!==void 0?this.$props.tabIndex===null?void 0:this.$props.tabIndex:this.bv.selectedItems.length===0&&t?0:void 0},compSelected(){return this.selected!==void 0?this.selected:this.currentSelected},compSeries(){return this.series!==void 0?this.series:this.currentSeries},compFormItem(){return this.formItem!==void 0?this.formItem:this.currentFormItem},compRemoveItem(){return this.removeItem!==void 0?this.removeItem:this.currentRemoveItem},compDragItem(){return this.dragItem!==void 0?this.dragItem:this.currentDragItem},compResizeItem(){return this.resizeItem!==void 0?this.resizeItem:this.currentResizeItem},compShowRemoveDialog(){return this.showRemoveDialog!==void 0?this.showRemoveDialog:this.currentShowRemoveDialog},compShowOccurrenceDialog(){return this.showOccurrenceDialog!==void 0?this.showOccurrenceDialog:this.currentShowOccurrenceDialog},actionsReducerMap(){return{[I.SERIES_ACTION.set]:this.dispatchSeries,[I.SERIES_ACTION.toggle]:this.dispatchSeries,[I.SERIES_ACTION.reset]:this.dispatchSeries,[m.ITEMS_SELECT_ACTION.select]:this.dispatchItemSelection,[m.ITEMS_SELECT_ACTION.add]:this.dispatchItemSelection,[m.ITEMS_SELECT_ACTION.remove]:this.dispatchItemSelection,[m.ITEMS_SELECT_ACTION.reset]:this.dispatchItemSelection,[m.ITEMS_SELECT_ACTION.selectNext]:this.dispatchItemSelection,[m.ITEMS_SELECT_ACTION.selectPrev]:this.dispatchItemSelection,[o.FORM_ITEM_ACTION.set]:this.dispatchFormItem,[o.FORM_ITEM_ACTION.setMaster]:this.dispatchFormItem,[o.FORM_ITEM_ACTION.reset]:this.dispatchFormItem,[o.FORM_ITEM_ACTION.complete]:this.dispatchFormItem,[n.REMOVE_ITEM_ACTION.set]:this.dispatchRemoveItem,[n.REMOVE_ITEM_ACTION.reset]:this.dispatchRemoveItem,[n.REMOVE_ITEM_ACTION.complete]:this.dispatchRemoveItem,[s.SHOW_OCCURRENCE_DIALOG_ACTION.close]:this.dispatchShowOccurrenceDialog,[s.SHOW_OCCURRENCE_DIALOG_ACTION.open]:this.dispatchShowOccurrenceDialog,[s.SHOW_OCCURRENCE_DIALOG_ACTION.set]:this.dispatchShowOccurrenceDialog,[s.SHOW_OCCURRENCE_DIALOG_ACTION.toggle]:this.dispatchShowOccurrenceDialog,[s.SHOW_OCCURRENCE_DIALOG_ACTION.reset]:this.dispatchShowOccurrenceDialog,[l.SHOW_REMOVE_DIALOG_ACTION.close]:this.dispatchShowRemoveDialog,[l.SHOW_REMOVE_DIALOG_ACTION.open]:this.dispatchShowRemoveDialog,[l.SHOW_REMOVE_DIALOG_ACTION.set]:this.dispatchShowRemoveDialog,[l.SHOW_REMOVE_DIALOG_ACTION.toggle]:this.dispatchShowRemoveDialog,[l.SHOW_REMOVE_DIALOG_ACTION.reset]:this.dispatchShowRemoveDialog,[a.DRAG_ITEM_ACTION.start]:this.dispatchDragItem,[a.DRAG_ITEM_ACTION.drag]:this.dispatchDragItem,[a.DRAG_ITEM_ACTION.complete]:this.dispatchDragItem,[a.DRAG_ITEM_ACTION.completeOccurrence]:this.dispatchDragItem,[a.DRAG_ITEM_ACTION.completeSeries]:this.dispatchDragItem,[a.DRAG_ITEM_ACTION.set]:this.dispatchDragItem,[a.DRAG_ITEM_ACTION.reset]:this.dispatchDragItem,[a.DRAG_ITEM_ACTION.dragSelected]:this.dispatchDragItem,[r.RESIZE_ITEM_ACTION.start]:this.dispatchResizeItem,[r.RESIZE_ITEM_ACTION.startDrag]:this.dispatchResizeItem,[r.RESIZE_ITEM_ACTION.startDragSelected]:this.dispatchResizeItem,[r.RESIZE_ITEM_ACTION.endDrag]:this.dispatchResizeItem,[r.RESIZE_ITEM_ACTION.endDragSelected]:this.dispatchResizeItem,[r.RESIZE_ITEM_ACTION.complete]:this.dispatchResizeItem,[r.RESIZE_ITEM_ACTION.completeOccurrence]:this.dispatchResizeItem,[r.RESIZE_ITEM_ACTION.completeSeries]:this.dispatchResizeItem,[r.RESIZE_ITEM_ACTION.set]:this.dispatchResizeItem,[r.RESIZE_ITEM_ACTION.reset]:this.dispatchResizeItem,[E.ITEMS_FOCUS_ACTION.next]:this.dispatchViewItemsFocus,[E.ITEMS_FOCUS_ACTION.prev]:this.dispatchViewItemsFocus,[p.SLOTS_FOCUS_ACTION.left]:this.dispatchViewSlotsFocus,[p.SLOTS_FOCUS_ACTION.right]:this.dispatchViewSlotsFocus,[p.SLOTS_FOCUS_ACTION.up]:this.dispatchViewSlotsFocus,[p.SLOTS_FOCUS_ACTION.down]:this.dispatchViewSlotsFocus,null:()=>{}}}},render(){const t=h.getDefaultSlots(this),e=this.$props.drag||g.SchedulerDrag,i=this.$props.resize||y.SchedulerResize,c=!!(this.bv.selectedItems&&this.bv.selectedItems.some(O=>u.compareItems(O,this,this.ignoreIsAllDay)));let _;const S=d.createVNode(C.SchedulerViewItem,{ignoreIsAllDay:this.ignoreIsAllDay,item:this.item,uid:this.uid,start:this.start,end:this.end,originalStart:this.originalStart,startTimezone:this.startTimezone,endTimezone:this.endTimezone,isAllDay:this.isAllDay,title:this.title,description:this.description,occurrenceId:this.occurrenceId,recurrenceExceptions:this.recurrenceExceptions,recurrenceRule:this.recurrenceRule,recurrenceId:this.recurrenceId,dataItem:this.dataItem,head:this.head,tail:this.tail,order:this.order,zonedStart:this.zonedStart,zonedEnd:this.zonedEnd,slots:this.slots,group:this.group,range:this.range,isException:this.isException,isRecurring:this.isRecurring,id:this.id,className:this.className,itemStyle:this.itemStyle,editable:this.editable,readonly:this.readonly,vertical:this.vertical,dragHint:this.dragHint,resizeHint:this.resizeHint,format:this.format,showOccurrenceDialog:this.compShowOccurrenceDialog,showRemoveDialog:this.compShowRemoveDialog,formItem:this.compFormItem,dragItem:this.compDragItem,resizeItem:this.compResizeItem,removeItem:this.compRemoveItem,itemRef:this.item,selected:c,tabIndex:this.currentTabIndex,onKeydown:this.handleKeyDown,onKeyup:this.handleKeyUp,onFocus:this.handleFocus,onMouseup:this.handleMouseUp,onMousedown:this.handleMouseDown,onClick:this.handleClick,onDoubleclick:this.handleDoubleClick,onRemoveclick:this.handleRemoveClick,onPress:this.handlePress,onDrag:this.handleDrag,onRelease:this.handleRelease,onResizepress:this.handleResizePress,onResizeenddrag:this.handleResizeEndDrag,onResizestartdrag:this.handleResizeStartDrag,onResizerelease:this.handleResizeRelease},null);return _=h.getTemplate.call(this,{h:d.h,template:this.$props.viewItem,defaultRendering:S,defaultSlots:t,additionalListeners:{doubleclick:this.handleDoubleClick,removeclick:this.handleRemoveClick,press:this.handlePress,drag:this.handleDrag,release:this.handleRelease,resizepress:this.handleResizePress,resizeenddrag:this.handleResizeEndDrag,resizestartdrag:this.handleResizeStartDrag,resizerelease:this.handleResizeRelease}}),d.createVNode(d.Fragment,null,[_,this.compDragItem&&this.$props.editable.drag&&(Array.isArray(this.compDragItem)?this.compDragItem.map((O,R)=>d.createVNode(e,{key:R,dataItem:O,ignoreIsAllDay:this.ignoreIsAllDay,vertical:this.vertical,viewItem:this.$props.viewItem,item:this.$props.item},null)):d.createVNode(e,{dataItem:this.compDragItem,ignoreIsAllDay:this.ignoreIsAllDay,vertical:this.vertical,viewItem:this.$props.viewItem,item:this.$props.item},null)),this.compResizeItem&&this.$props.editable.resize&&(Array.isArray(this.compResizeItem)?this.compResizeItem.map((O,R)=>d.createVNode(i,{key:R,dataItem:O,format:this.format,ignoreIsAllDay:this.ignoreIsAllDay,vertical:this.vertical,viewItem:this.$props.viewItem,item:this.$props.item},null)):d.createVNode(i,{dataItem:this.compResizeItem,format:this.format,ignoreIsAllDay:this.ignoreIsAllDay,vertical:this.vertical,viewItem:this.$props.viewItem,item:this.$props.item},null))])},methods:{dispatchSeries(t,e){const i=I.seriesReducer(this.compSeries,t);this.currentSeries=i,this.$emit("serieschange",i)},dispatchItemSelection(t,e){this.dispatchSelectedItems(t,e)},dispatchRemoveItem(t,e){let i;switch(t.type){case n.REMOVE_ITEM_ACTION.set:i=t.payload;break;case n.REMOVE_ITEM_ACTION.reset:i=null;break;case n.REMOVE_ITEM_ACTION.complete:this.compRemoveItem&&this.$emit("dataaction",{type:A.DATA_ACTION.remove,series:this.compSeries,dataItem:this.compRemoveItem}),i=null;break;default:i=this.compRemoveItem;break}this.currentRemoveItem=i,this.$emit("removeitemchange",i)},dispatchShowOccurrenceDialog(t,e){const i=s.showOccurrenceDialogReducer(this.compShowOccurrenceDialog,t);this.currentShowOccurrenceDialog=i,this.$emit("showoccurrencedialogchange",i)},dispatchShowRemoveDialog(t,e){const i=l.showRemoveDialogReducer(this.compShowRemoveDialog,t);this.currentShowRemoveDialog=i,this.$emit("showremovedialogchange",i)},dispatchDragItem(t,e){a.useDragItem.call(this,t)},dispatchResizeItem(t,e){r.useResizeItem.call(this,t,e)},dispatchViewSlotsFocus(t,e){this.dispatchFocusedSlots(t,e)},dispatchViewItemsFocus(t,e){this.dispatchFocusedItems(t,e)},dispatchFormItem(t,e){let i;switch(t.type){case o.FORM_ITEM_ACTION.set:i=t.payload;break;case o.FORM_ITEM_ACTION.reset:i=null;break;case o.FORM_ITEM_ACTION.setMaster:i=h.clone(u.findMaster(t.payload,this.ks.fields,this.ks.dataItems));break;case o.FORM_ITEM_ACTION.complete:this.compFormItem&&(this.$emit("dataaction",{type:A.DATA_ACTION.update,series:this.compSeries,dataItem:t.payload}),i=null);break;default:i=this.compFormItem;break}this.currentFormItem=i,this.$emit("formitemchange",i)},handleFocus(t){if(this.onFocusAction){const e=this.onFocusAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t)):this.actionsReducerMap[e.type]({...e,item:this.dataItem}))}this.$emit("focus",t)},handleMouseDown(t){if(this.onMouseDownAction){const e=this.onMouseDownAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t)):this.actionsReducerMap[e.type]({...e,item:this.dataItem}))}this.$emit("mousedown",t)},handleMouseUp(t){if(this.onMouseUpAction){const e=this.onMouseUpAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t)):this.actionsReducerMap[e.type]({...e,item:this.dataItem}))}this.$emit("mouseup",t)},handleClick(t){if(this.onClickAction){const e=this.onClickAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t)):this.actionsReducerMap[e.type]({...e,item:this.dataItem}))}this.$emit("click",t)},handleDoubleClick(t){if(this.onDoubleClickAction){const e=this.onDoubleClickAction(t,this.$props),i=this;e&&(Array.isArray(e)?e.filter(Boolean).map(c=>c&&i.actionsReducerMap[c.type]({...c,item:i.dataItem},t)):i.actionsReducerMap[e.type]({...e,item:i.dataItem}))}this.$emit("doubleclick",t)},handleRemoveClick(t){if(this.onRemoveClickAction){const e=this.onRemoveClickAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t)):this.actionsReducerMap[e.type]({...e,item:this.dataItem}))}this.$emit("removeclick",t)},handlePress(t){if(this.onPressAction){const e=this.onPressAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t)):this.actionsReducerMap[e.type]({...e,item:this.dataItem},t))}this.$emit("press",t)},handleDrag(t){if(this.onDragAction){const e=this.onDragAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t.dragEvent.originalEvent)):this.actionsReducerMap[e.type]({...e,item:this.dataItem},t.dragEvent.originalEvent))}this.$emit("drag",t)},handleRelease(t){if(this.onReleaseAction){const e=this.onReleaseAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t.dragEvent.originalEvent)):this.actionsReducerMap[e.type]({...e,item:this.dataItem},t.dragEvent.originalEvent))}this.$emit("release",t)},handleResizePress(t){if(this.onResizePressAction){const e=this.onResizePressAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t.dragEvent.originalEvent)):this.actionsReducerMap[e.type]({...e,item:this.dataItem},t.dragEvent.originalEvent))}this.$emit("resizepress",t)},handleResizeStartDrag(t){if(this.onResizeStartDragAction){const e=this.onResizeStartDragAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t.dragEvent.originalEvent)):this.actionsReducerMap[e.type]({...e,item:this.dataItem},t.dragEvent.originalEvent))}this.$emit("resizestartdrag",t)},handleResizeEndDrag(t){if(this.onResizeEndDragAction){const e=this.onResizeEndDragAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t.dragEvent.originalEvent)):this.actionsReducerMap[e.type]({...e,item:this.dataItem},t.dragEvent.originalEvent))}this.$emit("resizeenddrag",t)},handleResizeRelease(t){if(this.onResizeReleaseAction){const e=this.onResizeReleaseAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t.dragEvent.originalEvent)):this.actionsReducerMap[e.type]({...e,item:this.dataItem},t.dragEvent.originalEvent))}this.$emit("resizerelease",t)},handleFormSubmit(t){if(this.onFormSubmitAction){const e=this.onFormSubmitAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t)):this.actionsReducerMap[e.type]({...e,item:this.dataItem},t))}this.$emit("formsubmit",t)},handleCancel(t){if(this.onCancelAction){const e=this.onCancelAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t)):this.actionsReducerMap[e.type]({...e,item:this.dataItem},t))}this.$emit("cancel",t)},handleOccurrenceClick(t){if(this.onOccurrenceClickAction){const e=this.onOccurrenceClickAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t)):this.actionsReducerMap[e.type]({...e,item:this.dataItem},t))}this.$emit("occurrenceclick",t)},handleSeriesClick(t){if(this.onSeriesClickAction){const e=this.onSeriesClickAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t)):this.actionsReducerMap[e.type]({...e,item:this.dataItem},t))}this.$emit("seriesclick",t)},handleKeyDown(t){if(this.onKeyDownAction){const e=this.onKeyDownAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this},t.event)):this.actionsReducerMap[e.type]({...e,item:this},t.event))}this.$emit("keydown",t)},handleKeyUp(t){if(this.onKeyUpAction){const e=this.onKeyUpAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t.event)):this.actionsReducerMap[e.type]({...e,item:this.dataItem},t.event))}this.$emit("keyup",t)},handleRemoveConfirm(t){if(this.onRemoveConfirmAction){const e=this.onRemoveConfirmAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t.event)):this.actionsReducerMap[e.type]({...e,item:this.dataItem},t.event))}this.$emit("removeconfirm",t)},handleDeleteItem(t){this.$emit("dataaction",{type:A.DATA_ACTION.remove,series:this.compSeries,dataItem:t})},handleFormDelete(t){this.dispatchRemoveItem({type:n.REMOVE_ITEM_ACTION.set,payload:t},null),this.dispatchShowRemoveDialog({type:l.SHOW_REMOVE_DIALOG_ACTION.open},null)},handleRemoveDialogCancel(t){this.compFormItem?(this.dispatchRemoveItem({type:n.REMOVE_ITEM_ACTION.reset},null),this.dispatchShowRemoveDialog({type:l.SHOW_REMOVE_DIALOG_ACTION.close},null)):this.handleCancel(t)},onClickAction(t,e){return[{type:t.event.metaKey||t.event.ctrlKey?this.compSelected&&!this.compDragItem&&!this.compResizeItem?m.ITEMS_SELECT_ACTION.remove:m.ITEMS_SELECT_ACTION.add:m.ITEMS_SELECT_ACTION.select}]},onDoubleClickAction(t,e){return e.editable?[{type:o.FORM_ITEM_ACTION.set,payload:e.dataItem},e.isRecurring&&{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.open}].filter(Boolean):[]},onRemoveClickAction(t,e){return e.editable?[{type:n.REMOVE_ITEM_ACTION.set,payload:e.dataItem},e.isRecurring?{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.open}:{type:l.SHOW_REMOVE_DIALOG_ACTION.open}]:[]},onPressAction(t,e){return e.editable?{type:a.DRAG_ITEM_ACTION.start,payload:{x:t.dragEvent.clientX,y:t.dragEvent.clientY}}:[]},onDragAction(t,e){return e.editable?{type:t.dragEvent.originalEvent.metaKey||t.dragEvent.originalEvent.ctrlKey?a.DRAG_ITEM_ACTION.dragSelected:a.DRAG_ITEM_ACTION.drag,payload:{x:t.dragEvent.clientX,y:t.dragEvent.clientY}}:[]},onReleaseAction(t,e){return e.editable&&this.compDragItem?e.isRecurring&&!e.isException&&this.compSeries===null?{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.open}:{type:e.isRecurring?this.compSeries?a.DRAG_ITEM_ACTION.completeSeries:a.DRAG_ITEM_ACTION.completeOccurrence:a.DRAG_ITEM_ACTION.complete,payload:{x:t.dragEvent.clientX,y:t.dragEvent.clientY}}:[]},onResizePressAction(t,e){return e.editable?{type:r.RESIZE_ITEM_ACTION.start,payload:{x:t.dragEvent.clientX,y:t.dragEvent.clientY}}:[]},onResizeStartDragAction(t,e){return e.editable?{type:t.dragEvent.originalEvent.metaKey||t.dragEvent.originalEvent.ctrlKey?r.RESIZE_ITEM_ACTION.startDragSelected:r.RESIZE_ITEM_ACTION.startDrag,payload:{x:t.dragEvent.clientX,y:t.dragEvent.clientY}}:[]},onResizeEndDragAction(t,e){return e.editable?{type:t.dragEvent.originalEvent.metaKey||t.dragEvent.originalEvent.ctrlKey?r.RESIZE_ITEM_ACTION.endDragSelected:r.RESIZE_ITEM_ACTION.endDrag,payload:{x:t.dragEvent.clientX,y:t.dragEvent.clientY}}:[]},onResizeReleaseAction(t,e){return e.editable&&this.compResizeItem?e.isRecurring&&!e.isException&&this.compSeries===null?{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.open}:{type:e.isRecurring?this.compSeries?r.RESIZE_ITEM_ACTION.completeSeries:r.RESIZE_ITEM_ACTION.completeOccurrence:r.RESIZE_ITEM_ACTION.complete,payload:{x:t.dragEvent.clientX,y:t.dragEvent.clientY}}:[]},onOccurrenceClickAction(t,e){if(this.compDragItem)return[{type:a.DRAG_ITEM_ACTION.completeOccurrence},{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.close}];if(this.compResizeItem)return[{type:r.RESIZE_ITEM_ACTION.completeOccurrence},{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.close}];if(this.compFormItem)return[{type:I.SERIES_ACTION.set,payload:!1},{type:o.FORM_ITEM_ACTION.set,payload:e.dataItem},{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.close}];if(this.compRemoveItem)return[{type:I.SERIES_ACTION.set,payload:!1},{type:n.REMOVE_ITEM_ACTION.set,payload:e.dataItem},{type:l.SHOW_REMOVE_DIALOG_ACTION.open},{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.close}]},onSeriesClickAction(t,e){if(this.compDragItem)return[{type:a.DRAG_ITEM_ACTION.completeSeries},{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.close}];if(this.compResizeItem)return[{type:r.RESIZE_ITEM_ACTION.completeSeries},{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.close}];if(this.compFormItem)return[{type:I.SERIES_ACTION.set,payload:!0},{type:o.FORM_ITEM_ACTION.setMaster,payload:e.dataItem},{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.close}];if(this.compRemoveItem)return[{type:I.SERIES_ACTION.set,payload:!0},{type:n.REMOVE_ITEM_ACTION.set,payload:e.dataItem},{type:l.SHOW_REMOVE_DIALOG_ACTION.open},{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.close}]},onKeyDownAction(t,e){let i;switch(t.event.keyCode){case h.Keys.enter:return[{type:o.FORM_ITEM_ACTION.set,payload:e.dataItem},e.isRecurring&&{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.open}];case h.Keys.tab:return[{type:t.event.shiftKey?E.ITEMS_FOCUS_ACTION.prev:E.ITEMS_FOCUS_ACTION.next,ignoreIsAllDay:e.ignoreIsAllDay},{type:t.event.shiftKey?m.ITEMS_SELECT_ACTION.selectPrev:m.ITEMS_SELECT_ACTION.selectNext,ignoreIsAllDay:e.ignoreIsAllDay}];case h.Keys.up:return i=this.bv.slots.find(c=>u.compareSlots(c.cSlot,e.slots[0])),[!!(e.slots.length&&i)&&{type:p.SLOTS_FOCUS_ACTION.up,slot:i}];case h.Keys.right:return i=this.bv.slots.find(c=>u.compareSlots(c.cSlot,e.slots[0])),[!!(e.slots.length&&i)&&{type:p.SLOTS_FOCUS_ACTION.right,slot:i}];case h.Keys.down:return i=this.bv.slots.find(c=>u.compareSlots(c.cSlot,e.slots[e.slots.length-1])),[!!(e.slots.length&&i)&&{type:p.SLOTS_FOCUS_ACTION.down,slot:i}];case h.Keys.left:return i=this.bv.slots.find(c=>u.compareSlots(c.cSlot.cSlot,e.slots[0])),[!!(e.slots.length&&i)&&{type:p.SLOTS_FOCUS_ACTION.left,slot:i}];case h.Keys.delete:case h.Keys.backspace:return[{type:n.REMOVE_ITEM_ACTION.set,payload:e.dataItem},e.isRecurring?{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.open}:{type:l.SHOW_REMOVE_DIALOG_ACTION.open}];default:return}},onFormSubmitAction(t){return{type:o.FORM_ITEM_ACTION.complete,payload:t.value}},onRemoveConfirmAction(){return[{type:n.REMOVE_ITEM_ACTION.complete},{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.close}]},onCancelAction(){return[{type:I.SERIES_ACTION.reset},{type:n.REMOVE_ITEM_ACTION.reset},{type:o.FORM_ITEM_ACTION.reset},{type:a.DRAG_ITEM_ACTION.reset},{type:r.RESIZE_ITEM_ACTION.reset},{type:l.SHOW_REMOVE_DIALOG_ACTION.reset},{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.reset}]}}});exports.SchedulerEditItem=T;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("vue"),A=require("../constants/main.js"),h=require("@progress/kendo-vue-common"),C=require("./SchedulerViewItem.js"),g=require("../views/common/SchedulerDrag.js"),y=require("../views/common/SchedulerResize.js"),o=require("./hooks/use-form-item.js"),s=require("./hooks/use-show-occurrence-dialog.js"),n=require("./hooks/use-remove-item.js"),l=require("./hooks/use-show-remove-item-dialog.js"),a=require("./hooks/use-drag-item.js"),r=require("./hooks/use-resize-item.js"),I=require("./hooks/use-series.js"),m=require("../hooks/use-items-selection.js"),u=require("../utils/main.js"),p=require("../hooks/use-slots-focus.js"),E=require("../hooks/use-items-focus.js"),T=d.defineComponent({name:"KendoSchedulerEditItem",inheritAttrs:!1,props:{tabIndex:{type:Number,default:void 0},item:[String,Function,Object],viewItem:[String,Function,Object],drag:[String,Function,Object],resize:[String,Function,Object],form:[String,Function,Object],removeDialog:[String,Function,Object],occurrenceDialog:[String,Function,Object],formItem:Object,dragItem:Object,resizeItem:Object,removeItem:Object,showOccurrenceDialog:{type:Boolean,default:void 0},showRemoveDialog:{type:Boolean,default:void 0},series:{type:Boolean,default:void 0},uid:[String,Number],start:Date,end:Date,originalStart:Date,startTimezone:String,endTimezone:String,isAllDay:Boolean,title:String,description:String,occurrenceId:String,recurrenceExceptions:Array,recurrenceRule:String,recurrenceId:[String,Number],dataItem:Object,head:Boolean,tail:Boolean,order:Number,zonedStart:Object,zonedEnd:Object,slots:Array,group:Object,range:Object,isException:Boolean,isRecurring:Boolean,id:String,className:String,itemStyle:Object,editable:[Object,Boolean],readonly:Boolean,selected:Boolean,vertical:Boolean,dragHint:Boolean,resizeHint:Boolean,format:String,ignoreIsAllDay:Boolean,itemRef:Object,onRemoveclick:Function,onDataaction:Function,onFormItemChange:Function,onDragitemchange:Function,onResizeitemchange:Function},inject:{bv:{default:null},ks:{default:null},dispatchFocusedItems:{default:null},dispatchFocusedSlots:{default:null},dispatchSelectedItems:{default:null}},provide(){return{ei:this.ei,ksCancel:this.handleCancel,ksFormSubmit:this.handleFormSubmit,ksOccurrenceClick:this.handleOccurrenceClick,ksSeriesClick:this.handleSeriesClick,ksRemoveConfirm:this.handleRemoveConfirm,ksRemoveDialogCancel:this.handleRemoveDialogCancel,ksDeleteItem:this.handleDeleteItem,ksFormDelete:this.handleFormDelete,ksIsSeries:()=>this.compSeries===!0}},data(){return{ei:{props:this.$props,form:this.$props.formItem,drag:this.drag,resize:this.resize,remove:this.remove,showRemoveDialog:this.showRemoveDialog,showOccurrenceDialog:this.showOccurrenceDialog},currentFormItem:null,currentSelected:null,currentSeries:null,currentRemoveItem:null,currentDragItem:null,currentResizeItem:null,currentShowRemoveDialog:null,currentShowOccurrenceDialog:null}},computed:{currentTabIndex(){const t=this.bv.items.length&&this.bv.items[0].dataItem.id===this.dataItem.id;return this.$props.tabIndex!==void 0?this.$props.tabIndex===null?void 0:this.$props.tabIndex:this.bv.selectedItems.length===0&&t?0:void 0},compSelected(){return this.selected!==void 0?this.selected:this.currentSelected},compSeries(){return this.series!==void 0?this.series:this.currentSeries},compFormItem(){return this.formItem!==void 0?this.formItem:this.currentFormItem},compRemoveItem(){return this.removeItem!==void 0?this.removeItem:this.currentRemoveItem},compDragItem(){return this.dragItem!==void 0?this.dragItem:this.currentDragItem},compResizeItem(){return this.resizeItem!==void 0?this.resizeItem:this.currentResizeItem},compShowRemoveDialog(){return this.showRemoveDialog!==void 0?this.showRemoveDialog:this.currentShowRemoveDialog},compShowOccurrenceDialog(){return this.showOccurrenceDialog!==void 0?this.showOccurrenceDialog:this.currentShowOccurrenceDialog},actionsReducerMap(){return{[I.SERIES_ACTION.set]:this.dispatchSeries,[I.SERIES_ACTION.toggle]:this.dispatchSeries,[I.SERIES_ACTION.reset]:this.dispatchSeries,[m.ITEMS_SELECT_ACTION.select]:this.dispatchItemSelection,[m.ITEMS_SELECT_ACTION.add]:this.dispatchItemSelection,[m.ITEMS_SELECT_ACTION.remove]:this.dispatchItemSelection,[m.ITEMS_SELECT_ACTION.reset]:this.dispatchItemSelection,[m.ITEMS_SELECT_ACTION.selectNext]:this.dispatchItemSelection,[m.ITEMS_SELECT_ACTION.selectPrev]:this.dispatchItemSelection,[o.FORM_ITEM_ACTION.set]:this.dispatchFormItem,[o.FORM_ITEM_ACTION.setMaster]:this.dispatchFormItem,[o.FORM_ITEM_ACTION.reset]:this.dispatchFormItem,[o.FORM_ITEM_ACTION.complete]:this.dispatchFormItem,[n.REMOVE_ITEM_ACTION.set]:this.dispatchRemoveItem,[n.REMOVE_ITEM_ACTION.reset]:this.dispatchRemoveItem,[n.REMOVE_ITEM_ACTION.complete]:this.dispatchRemoveItem,[s.SHOW_OCCURRENCE_DIALOG_ACTION.close]:this.dispatchShowOccurrenceDialog,[s.SHOW_OCCURRENCE_DIALOG_ACTION.open]:this.dispatchShowOccurrenceDialog,[s.SHOW_OCCURRENCE_DIALOG_ACTION.set]:this.dispatchShowOccurrenceDialog,[s.SHOW_OCCURRENCE_DIALOG_ACTION.toggle]:this.dispatchShowOccurrenceDialog,[s.SHOW_OCCURRENCE_DIALOG_ACTION.reset]:this.dispatchShowOccurrenceDialog,[l.SHOW_REMOVE_DIALOG_ACTION.close]:this.dispatchShowRemoveDialog,[l.SHOW_REMOVE_DIALOG_ACTION.open]:this.dispatchShowRemoveDialog,[l.SHOW_REMOVE_DIALOG_ACTION.set]:this.dispatchShowRemoveDialog,[l.SHOW_REMOVE_DIALOG_ACTION.toggle]:this.dispatchShowRemoveDialog,[l.SHOW_REMOVE_DIALOG_ACTION.reset]:this.dispatchShowRemoveDialog,[a.DRAG_ITEM_ACTION.start]:this.dispatchDragItem,[a.DRAG_ITEM_ACTION.drag]:this.dispatchDragItem,[a.DRAG_ITEM_ACTION.complete]:this.dispatchDragItem,[a.DRAG_ITEM_ACTION.completeOccurrence]:this.dispatchDragItem,[a.DRAG_ITEM_ACTION.completeSeries]:this.dispatchDragItem,[a.DRAG_ITEM_ACTION.set]:this.dispatchDragItem,[a.DRAG_ITEM_ACTION.reset]:this.dispatchDragItem,[a.DRAG_ITEM_ACTION.dragSelected]:this.dispatchDragItem,[r.RESIZE_ITEM_ACTION.start]:this.dispatchResizeItem,[r.RESIZE_ITEM_ACTION.startDrag]:this.dispatchResizeItem,[r.RESIZE_ITEM_ACTION.startDragSelected]:this.dispatchResizeItem,[r.RESIZE_ITEM_ACTION.endDrag]:this.dispatchResizeItem,[r.RESIZE_ITEM_ACTION.endDragSelected]:this.dispatchResizeItem,[r.RESIZE_ITEM_ACTION.complete]:this.dispatchResizeItem,[r.RESIZE_ITEM_ACTION.completeOccurrence]:this.dispatchResizeItem,[r.RESIZE_ITEM_ACTION.completeSeries]:this.dispatchResizeItem,[r.RESIZE_ITEM_ACTION.set]:this.dispatchResizeItem,[r.RESIZE_ITEM_ACTION.reset]:this.dispatchResizeItem,[E.ITEMS_FOCUS_ACTION.next]:this.dispatchViewItemsFocus,[E.ITEMS_FOCUS_ACTION.prev]:this.dispatchViewItemsFocus,[p.SLOTS_FOCUS_ACTION.left]:this.dispatchViewSlotsFocus,[p.SLOTS_FOCUS_ACTION.right]:this.dispatchViewSlotsFocus,[p.SLOTS_FOCUS_ACTION.up]:this.dispatchViewSlotsFocus,[p.SLOTS_FOCUS_ACTION.down]:this.dispatchViewSlotsFocus,null:()=>{}}}},render(){const t=h.getDefaultSlots(this),e=this.$props.drag||g.SchedulerDrag,i=this.$props.resize||y.SchedulerResize,c=!!(this.bv.selectedItems&&this.bv.selectedItems.some(O=>u.compareItems(O,this,this.ignoreIsAllDay)));let _;const S=d.createVNode(C.SchedulerViewItem,{ignoreIsAllDay:this.ignoreIsAllDay,item:this.item,uid:this.uid,start:this.start,end:this.end,originalStart:this.originalStart,startTimezone:this.startTimezone,endTimezone:this.endTimezone,isAllDay:this.isAllDay,title:this.title,description:this.description,occurrenceId:this.occurrenceId,recurrenceExceptions:this.recurrenceExceptions,recurrenceRule:this.recurrenceRule,recurrenceId:this.recurrenceId,dataItem:this.dataItem,head:this.head,tail:this.tail,order:this.order,zonedStart:this.zonedStart,zonedEnd:this.zonedEnd,slots:this.slots,group:this.group,range:this.range,isException:this.isException,isRecurring:this.isRecurring,id:this.id,className:this.className,itemStyle:this.itemStyle,editable:this.editable,readonly:this.readonly,vertical:this.vertical,dragHint:this.dragHint,resizeHint:this.resizeHint,format:this.format,showOccurrenceDialog:this.compShowOccurrenceDialog,showRemoveDialog:this.compShowRemoveDialog,formItem:this.compFormItem,dragItem:this.compDragItem,resizeItem:this.compResizeItem,removeItem:this.compRemoveItem,itemRef:this.item,selected:c,tabIndex:this.currentTabIndex,onKeydown:this.handleKeyDown,onKeyup:this.handleKeyUp,onFocus:this.handleFocus,onMouseup:this.handleMouseUp,onMousedown:this.handleMouseDown,onClick:this.handleClick,onDoubleclick:this.handleDoubleClick,onRemoveclick:this.handleRemoveClick,onPress:this.handlePress,onDrag:this.handleDrag,onRelease:this.handleRelease,onResizepress:this.handleResizePress,onResizeenddrag:this.handleResizeEndDrag,onResizestartdrag:this.handleResizeStartDrag,onResizerelease:this.handleResizeRelease},null);return _=h.getTemplate.call(this,{h:d.h,template:this.$props.viewItem,defaultRendering:S,defaultSlots:t,additionalListeners:{doubleclick:this.handleDoubleClick,removeclick:this.handleRemoveClick,press:this.handlePress,drag:this.handleDrag,release:this.handleRelease,resizepress:this.handleResizePress,resizeenddrag:this.handleResizeEndDrag,resizestartdrag:this.handleResizeStartDrag,resizerelease:this.handleResizeRelease}}),d.createVNode(d.Fragment,null,[_,this.compDragItem&&this.$props.editable.drag&&(Array.isArray(this.compDragItem)?this.compDragItem.map((O,R)=>d.createVNode(e,{key:R,dataItem:O,ignoreIsAllDay:this.ignoreIsAllDay,vertical:this.vertical,viewItem:this.$props.viewItem,item:this.$props.item},null)):d.createVNode(e,{dataItem:this.compDragItem,ignoreIsAllDay:this.ignoreIsAllDay,vertical:this.vertical,viewItem:this.$props.viewItem,item:this.$props.item},null)),this.compResizeItem&&this.$props.editable.resize&&(Array.isArray(this.compResizeItem)?this.compResizeItem.map((O,R)=>d.createVNode(i,{key:R,dataItem:O,format:this.format,ignoreIsAllDay:this.ignoreIsAllDay,vertical:this.vertical,viewItem:this.$props.viewItem,item:this.$props.item},null)):d.createVNode(i,{dataItem:this.compResizeItem,format:this.format,ignoreIsAllDay:this.ignoreIsAllDay,vertical:this.vertical,viewItem:this.$props.viewItem,item:this.$props.item},null))])},methods:{dispatchSeries(t,e){const i=I.seriesReducer(this.compSeries,t);this.currentSeries=i,this.$emit("serieschange",i)},dispatchItemSelection(t,e){this.dispatchSelectedItems(t,e)},dispatchRemoveItem(t,e){let i;switch(t.type){case n.REMOVE_ITEM_ACTION.set:i=t.payload;break;case n.REMOVE_ITEM_ACTION.reset:i=null;break;case n.REMOVE_ITEM_ACTION.complete:this.compRemoveItem&&this.$emit("dataaction",{type:A.DATA_ACTION.remove,series:this.compSeries,dataItem:this.compRemoveItem}),i=null;break;default:i=this.compRemoveItem;break}this.currentRemoveItem=i,this.$emit("removeitemchange",i)},dispatchShowOccurrenceDialog(t,e){const i=s.showOccurrenceDialogReducer(this.compShowOccurrenceDialog,t);this.currentShowOccurrenceDialog=i,this.$emit("showoccurrencedialogchange",i)},dispatchShowRemoveDialog(t,e){const i=l.showRemoveDialogReducer(this.compShowRemoveDialog,t);this.currentShowRemoveDialog=i,this.$emit("showremovedialogchange",i)},dispatchDragItem(t,e){a.useDragItem.call(this,t)},dispatchResizeItem(t,e){r.useResizeItem.call(this,t,e)},dispatchViewSlotsFocus(t,e){this.dispatchFocusedSlots(t,e)},dispatchViewItemsFocus(t,e){this.dispatchFocusedItems(t,e)},dispatchFormItem(t,e){let i;switch(t.type){case o.FORM_ITEM_ACTION.set:i=t.payload;break;case o.FORM_ITEM_ACTION.reset:i=null;break;case o.FORM_ITEM_ACTION.setMaster:i=h.clone(u.findMaster(t.payload,this.ks.fields,this.ks.dataItems));break;case o.FORM_ITEM_ACTION.complete:this.compFormItem&&(this.$emit("dataaction",{type:A.DATA_ACTION.update,series:this.compSeries,dataItem:t.payload}),i=null);break;default:i=this.compFormItem;break}this.currentFormItem=i,this.$emit("formitemchange",i)},handleFocus(t){if(this.onFocusAction){const e=this.onFocusAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t)):this.actionsReducerMap[e.type]({...e,item:this.dataItem}))}this.$emit("focus",t)},handleMouseDown(t){if(this.onMouseDownAction){const e=this.onMouseDownAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t)):this.actionsReducerMap[e.type]({...e,item:this.dataItem}))}this.$emit("mousedown",t)},handleMouseUp(t){if(this.onMouseUpAction){const e=this.onMouseUpAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t)):this.actionsReducerMap[e.type]({...e,item:this.dataItem}))}this.$emit("mouseup",t)},handleClick(t){if(this.onClickAction){const e=this.onClickAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this},t)):this.actionsReducerMap[e.type]({...e,item:this}))}this.$emit("click",t)},handleDoubleClick(t){if(this.onDoubleClickAction){const e=this.onDoubleClickAction(t,this.$props),i=this;e&&(Array.isArray(e)?e.filter(Boolean).map(c=>c&&i.actionsReducerMap[c.type]({...c,item:i.dataItem},t)):i.actionsReducerMap[e.type]({...e,item:i.dataItem}))}this.$emit("doubleclick",t)},handleRemoveClick(t){if(this.onRemoveClickAction){const e=this.onRemoveClickAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t)):this.actionsReducerMap[e.type]({...e,item:this.dataItem}))}this.$emit("removeclick",t)},handlePress(t){if(this.onPressAction){const e=this.onPressAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t)):this.actionsReducerMap[e.type]({...e,item:this.dataItem},t))}this.$emit("press",t)},handleDrag(t){if(this.onDragAction){const e=this.onDragAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t.dragEvent.originalEvent)):this.actionsReducerMap[e.type]({...e,item:this.dataItem},t.dragEvent.originalEvent))}this.$emit("drag",t)},handleRelease(t){if(this.onReleaseAction){const e=this.onReleaseAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t.dragEvent.originalEvent)):this.actionsReducerMap[e.type]({...e,item:this.dataItem},t.dragEvent.originalEvent))}this.$emit("release",t)},handleResizePress(t){if(this.onResizePressAction){const e=this.onResizePressAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t.dragEvent.originalEvent)):this.actionsReducerMap[e.type]({...e,item:this.dataItem},t.dragEvent.originalEvent))}this.$emit("resizepress",t)},handleResizeStartDrag(t){if(this.onResizeStartDragAction){const e=this.onResizeStartDragAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t.dragEvent.originalEvent)):this.actionsReducerMap[e.type]({...e,item:this.dataItem},t.dragEvent.originalEvent))}this.$emit("resizestartdrag",t)},handleResizeEndDrag(t){if(this.onResizeEndDragAction){const e=this.onResizeEndDragAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t.dragEvent.originalEvent)):this.actionsReducerMap[e.type]({...e,item:this.dataItem},t.dragEvent.originalEvent))}this.$emit("resizeenddrag",t)},handleResizeRelease(t){if(this.onResizeReleaseAction){const e=this.onResizeReleaseAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t.dragEvent.originalEvent)):this.actionsReducerMap[e.type]({...e,item:this.dataItem},t.dragEvent.originalEvent))}this.$emit("resizerelease",t)},handleFormSubmit(t){if(this.onFormSubmitAction){const e=this.onFormSubmitAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t)):this.actionsReducerMap[e.type]({...e,item:this.dataItem},t))}this.$emit("formsubmit",t)},handleCancel(t){if(this.onCancelAction){const e=this.onCancelAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t)):this.actionsReducerMap[e.type]({...e,item:this.dataItem},t))}this.$emit("cancel",t)},handleOccurrenceClick(t){if(this.onOccurrenceClickAction){const e=this.onOccurrenceClickAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t)):this.actionsReducerMap[e.type]({...e,item:this.dataItem},t))}this.$emit("occurrenceclick",t)},handleSeriesClick(t){if(this.onSeriesClickAction){const e=this.onSeriesClickAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t)):this.actionsReducerMap[e.type]({...e,item:this.dataItem},t))}this.$emit("seriesclick",t)},handleKeyDown(t){if(this.onKeyDownAction){const e=this.onKeyDownAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this},t.event)):this.actionsReducerMap[e.type]({...e,item:this},t.event))}this.$emit("keydown",t)},handleKeyUp(t){if(this.onKeyUpAction){const e=this.onKeyUpAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t.event)):this.actionsReducerMap[e.type]({...e,item:this.dataItem},t.event))}this.$emit("keyup",t)},handleRemoveConfirm(t){if(this.onRemoveConfirmAction){const e=this.onRemoveConfirmAction(t,this.$props);e&&(Array.isArray(e)?e.filter(Boolean).map(i=>i&&this.actionsReducerMap[i.type]({...i,item:this.dataItem},t.event)):this.actionsReducerMap[e.type]({...e,item:this.dataItem},t.event))}this.$emit("removeconfirm",t)},handleDeleteItem(t){this.$emit("dataaction",{type:A.DATA_ACTION.remove,series:this.compSeries,dataItem:t})},handleFormDelete(t){this.dispatchRemoveItem({type:n.REMOVE_ITEM_ACTION.set,payload:t},null),this.dispatchShowRemoveDialog({type:l.SHOW_REMOVE_DIALOG_ACTION.open},null)},handleRemoveDialogCancel(t){this.compFormItem?(this.dispatchRemoveItem({type:n.REMOVE_ITEM_ACTION.reset},null),this.dispatchShowRemoveDialog({type:l.SHOW_REMOVE_DIALOG_ACTION.close},null)):this.handleCancel(t)},onClickAction(t,e){return[{type:t.event.metaKey||t.event.ctrlKey?this.compSelected&&!this.compDragItem&&!this.compResizeItem?m.ITEMS_SELECT_ACTION.remove:m.ITEMS_SELECT_ACTION.add:m.ITEMS_SELECT_ACTION.select}]},onDoubleClickAction(t,e){return e.editable?[{type:o.FORM_ITEM_ACTION.set,payload:e.dataItem},e.isRecurring&&{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.open}].filter(Boolean):[]},onRemoveClickAction(t,e){return e.editable?[{type:n.REMOVE_ITEM_ACTION.set,payload:e.dataItem},e.isRecurring?{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.open}:{type:l.SHOW_REMOVE_DIALOG_ACTION.open}]:[]},onPressAction(t,e){return e.editable?{type:a.DRAG_ITEM_ACTION.start,payload:{x:t.dragEvent.clientX,y:t.dragEvent.clientY}}:[]},onDragAction(t,e){return e.editable?{type:t.dragEvent.originalEvent.metaKey||t.dragEvent.originalEvent.ctrlKey?a.DRAG_ITEM_ACTION.dragSelected:a.DRAG_ITEM_ACTION.drag,payload:{x:t.dragEvent.clientX,y:t.dragEvent.clientY}}:[]},onReleaseAction(t,e){return e.editable&&this.compDragItem?e.isRecurring&&!e.isException&&this.compSeries===null?{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.open}:{type:e.isRecurring?this.compSeries?a.DRAG_ITEM_ACTION.completeSeries:a.DRAG_ITEM_ACTION.completeOccurrence:a.DRAG_ITEM_ACTION.complete,payload:{x:t.dragEvent.clientX,y:t.dragEvent.clientY}}:[]},onResizePressAction(t,e){return e.editable?{type:r.RESIZE_ITEM_ACTION.start,payload:{x:t.dragEvent.clientX,y:t.dragEvent.clientY}}:[]},onResizeStartDragAction(t,e){return e.editable?{type:t.dragEvent.originalEvent.metaKey||t.dragEvent.originalEvent.ctrlKey?r.RESIZE_ITEM_ACTION.startDragSelected:r.RESIZE_ITEM_ACTION.startDrag,payload:{x:t.dragEvent.clientX,y:t.dragEvent.clientY}}:[]},onResizeEndDragAction(t,e){return e.editable?{type:t.dragEvent.originalEvent.metaKey||t.dragEvent.originalEvent.ctrlKey?r.RESIZE_ITEM_ACTION.endDragSelected:r.RESIZE_ITEM_ACTION.endDrag,payload:{x:t.dragEvent.clientX,y:t.dragEvent.clientY}}:[]},onResizeReleaseAction(t,e){return e.editable&&this.compResizeItem?e.isRecurring&&!e.isException&&this.compSeries===null?{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.open}:{type:e.isRecurring?this.compSeries?r.RESIZE_ITEM_ACTION.completeSeries:r.RESIZE_ITEM_ACTION.completeOccurrence:r.RESIZE_ITEM_ACTION.complete,payload:{x:t.dragEvent.clientX,y:t.dragEvent.clientY}}:[]},onOccurrenceClickAction(t,e){if(this.compDragItem)return[{type:a.DRAG_ITEM_ACTION.completeOccurrence},{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.close}];if(this.compResizeItem)return[{type:r.RESIZE_ITEM_ACTION.completeOccurrence},{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.close}];if(this.compFormItem)return[{type:I.SERIES_ACTION.set,payload:!1},{type:o.FORM_ITEM_ACTION.set,payload:e.dataItem},{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.close}];if(this.compRemoveItem)return[{type:I.SERIES_ACTION.set,payload:!1},{type:n.REMOVE_ITEM_ACTION.set,payload:e.dataItem},{type:l.SHOW_REMOVE_DIALOG_ACTION.open},{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.close}]},onSeriesClickAction(t,e){if(this.compDragItem)return[{type:a.DRAG_ITEM_ACTION.completeSeries},{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.close}];if(this.compResizeItem)return[{type:r.RESIZE_ITEM_ACTION.completeSeries},{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.close}];if(this.compFormItem)return[{type:I.SERIES_ACTION.set,payload:!0},{type:o.FORM_ITEM_ACTION.setMaster,payload:e.dataItem},{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.close}];if(this.compRemoveItem)return[{type:I.SERIES_ACTION.set,payload:!0},{type:n.REMOVE_ITEM_ACTION.set,payload:e.dataItem},{type:l.SHOW_REMOVE_DIALOG_ACTION.open},{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.close}]},onKeyDownAction(t,e){let i;switch(t.event.keyCode){case h.Keys.enter:return[{type:o.FORM_ITEM_ACTION.set,payload:e.dataItem},e.isRecurring&&{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.open}];case h.Keys.tab:return[{type:t.event.shiftKey?E.ITEMS_FOCUS_ACTION.prev:E.ITEMS_FOCUS_ACTION.next,ignoreIsAllDay:e.ignoreIsAllDay},{type:t.event.shiftKey?m.ITEMS_SELECT_ACTION.selectPrev:m.ITEMS_SELECT_ACTION.selectNext,ignoreIsAllDay:e.ignoreIsAllDay}];case h.Keys.up:return i=this.bv.slots.find(c=>u.compareSlots(c.cSlot,e.slots[0])),[!!(e.slots.length&&i)&&{type:p.SLOTS_FOCUS_ACTION.up,slot:i}];case h.Keys.right:return i=this.bv.slots.find(c=>u.compareSlots(c.cSlot,e.slots[0])),[!!(e.slots.length&&i)&&{type:p.SLOTS_FOCUS_ACTION.right,slot:i}];case h.Keys.down:return i=this.bv.slots.find(c=>u.compareSlots(c.cSlot,e.slots[e.slots.length-1])),[!!(e.slots.length&&i)&&{type:p.SLOTS_FOCUS_ACTION.down,slot:i}];case h.Keys.left:return i=this.bv.slots.find(c=>u.compareSlots(c.cSlot.cSlot,e.slots[0])),[!!(e.slots.length&&i)&&{type:p.SLOTS_FOCUS_ACTION.left,slot:i}];case h.Keys.delete:case h.Keys.backspace:return[{type:n.REMOVE_ITEM_ACTION.set,payload:e.dataItem},e.isRecurring?{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.open}:{type:l.SHOW_REMOVE_DIALOG_ACTION.open}];default:return}},onFormSubmitAction(t){return{type:o.FORM_ITEM_ACTION.complete,payload:t.value}},onRemoveConfirmAction(){return[{type:n.REMOVE_ITEM_ACTION.complete},{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.close}]},onCancelAction(){return[{type:I.SERIES_ACTION.reset},{type:n.REMOVE_ITEM_ACTION.reset},{type:o.FORM_ITEM_ACTION.reset},{type:a.DRAG_ITEM_ACTION.reset},{type:r.RESIZE_ITEM_ACTION.reset},{type:l.SHOW_REMOVE_DIALOG_ACTION.reset},{type:s.SHOW_OCCURRENCE_DIALOG_ACTION.reset}]}}});exports.SchedulerEditItem=T;
@@ -473,10 +473,10 @@ const te = /* @__PURE__ */ A({
473
473
  const e = this.onClickAction(t, this.$props);
474
474
  e && (Array.isArray(e) ? e.filter(Boolean).map((i) => i && this.actionsReducerMap[i.type]({
475
475
  ...i,
476
- item: this.dataItem
476
+ item: this
477
477
  }, t)) : this.actionsReducerMap[e.type]({
478
478
  ...e,
479
- item: this.dataItem
479
+ item: this
480
480
  }));
481
481
  }
482
482
  this.$emit("click", t);
@@ -275,6 +275,9 @@ declare const SchedulerItem: import('vue').DefineComponent<import('vue').Extract
275
275
  'k-last': boolean;
276
276
  };
277
277
  eventLabel(): string;
278
+ resizeHandleStyle(): {
279
+ visibility: string;
280
+ };
278
281
  computedStyle(): any;
279
282
  }, {
280
283
  getElement(): any;
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),l=require("../utils/main.js"),i=require("@progress/kendo-vue-common"),n=require("@progress/kendo-vue-intl"),o=require("../components/SchedulerOccurrenceDialog.js"),a=require("../components/SchedulerRemoveDialog.js"),h=require("../components/SchedulerForm.js"),d=require("../hooks/useEditable.js"),u=t.defineComponent({name:"KendoSchedulerItem",inheritAttrs:!1,emits:{focus:null,blur:null,mousedown:null,mouseup:null,mouseover:null,mouseout:null,mouseenter:null,mouseleave:null,click:null,doubleclick:null,removeclick:null,keydown:null,keypress:null,keyup:null,press:null,drag:null,release:null,resizepress:null,resizestartdrag:null,resizeenddrag:null,resizerelease:null,cancel:null,close:null,formsubmit:null},props:{uid:[String,Number],start:Date,end:Date,originalStart:Date,startTimezone:String,endTimezone:String,isAllDay:Boolean,title:String,description:String,occurrenceId:String,recurrenceExceptions:Array,recurrenceRule:String,recurrenceId:[String,Number],dataItem:Object,head:Boolean,tail:Boolean,order:Number,zonedStart:Object,zonedEnd:Object,slots:Array,group:Object,range:Object,isException:Boolean,isRecurring:Boolean,id:String,tabIndex:Number,className:String,itemStyle:Object,editable:[Object,Boolean],readonly:Boolean,selected:Boolean,vertical:Boolean,dragHint:Boolean,resizeHint:Boolean,format:String,maxSiblingsPerSlot:Number,itemTitle:String,formItem:Object,dragItem:Object,resizeItem:Object,removeItem:Object,ignoreIsAllDay:Boolean,item:[String,Function,Object],showOccurrenceDialog:{type:Boolean,default:void 0},showRemoveDialog:{type:Boolean,default:void 0}},inject:{ks:{default:null},bv:{default:null},kendoLocalizationService:{default:null},kendoIntlService:{default:null},setItems:{default:null},itemClick:{default:null},itemDoubleClick:{default:null},ksCancel:{default:null},ksFormSubmit:{default:null},ksOccurrenceClick:{default:null},ksSeriesClick:{default:null},ksRemoveConfirm:{default:null},ksRemoveDialogCancel:{default:null},ksDeleteItem:{default:null},ksFormDelete:{default:null},ksIsSeries:{default:null}},computed:{currentEditable(){const e=d.useEditable(this.$props.editable);return this.$props.readonly?{add:!1,edit:!1,drag:!1,resize:!1,remove:!1,select:e.select}:e},resource(){return this.$props.group.resources.find(e=>!!(e.colorField&&e[e.colorField]!==""&&e[e.colorField]!==void 0))},color(){return this.resource&&this.resource.colorField&&this.resource[this.resource.colorField]},currentTabIndex(){return this.$props.tabIndex!==void 0?this.$props.tabIndex===null?void 0:this.$props.tabIndex:this.$props.selected?0:-1},itemClassName(){return{"k-event":!this.$props.resizeHint,"k-selected":this.$props.selected&&this.currentEditable.select,"k-readonly":!this.$props.resizeHint&&!!this.$props.readonly,"k-event-drag-hint":this.$props.dragHint,"k-scheduler-marquee":this.$props.resizeHint,"k-marquee":this.$props.resizeHint,"k-first":this.$props.resizeHint&&!this.$props.tail,"k-last":this.$props.resizeHint&&!this.$props.head,[this.$props.className]:this.$props.className}},eventLabel(){return`${l.formatEventTime(this.intl,this.$props.zonedStart,this.$props.zonedEnd,this.$props.isAllDay)}, ${this.$props.title}`},computedStyle(){var e;return{cursor:"pointer",userSelect:"none",borderColor:this.$props.resizeHint?void 0:this.color,backgroundColor:this.$props.resizeHint?void 0:this.color,touchAction:"none",...this.$props.itemStyle,containerType:this.$props.resizeHint?void 0:((e=this.$props.itemStyle)==null?void 0:e.height)==="auto"?"normal":"size"}}},created(){this.setItems({type:l.COLLECTION_ACTION.add,item:this})},mounted(){this.element||(this.element=this.$refs.draggable&&this.$refs.draggable.element)},unmounted(){this.setItems({type:l.COLLECTION_ACTION.remove,item:this})},render(){const e=i.getDefaultSlots(this);this.intl=n.provideIntlService(this);const s=i.getTemplate.call(this,{h:t.h,template:this.bv.viewProps.resizeHint,additionalProps:{dataItem:this.dataItem,color:this.color,itemClassName:this.itemClassName}});return t.createVNode(i.Draggable,{onPress:this.handlePress,onDrag:this.handleDrag,onRelease:this.handleRelease,ref:"draggable"},{default:()=>{var r;return[t.createVNode("div",{id:this.$props.id,style:this.computedStyle,tabindex:this.currentTabIndex,class:this.itemClassName,role:"button","aria-label":this.eventLabel,"aria-disabled":this.$props.readonly?!0:void 0,onFocusin:this.handleFocus,onBlur:this.handleBlur,onMouseup:this.handleMouseUp,onMousedown:this.handleMouseDown,onClick:this.handleClick,onMouseover:this.handleMouseOver,onMouseout:this.handleMouseOut,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onDblclick:this.handleDoubleClick,onKeydown:this.handleKeyDown,onKeypress:this.handleKeyPress,onKeyup:this.handleKeyUp,"data-group-index":this.$props.group.index,"data-range-index":this.$props.range.index},[this.formItem&&!this.showOccurrenceDialog&&this.currentEditable.edit&&t.createVNode(h.SchedulerForm,{dataItem:this.formItem,onSubmit:this.handleFormSubmit,onClose:this.handleFormClose,onCancel:this.handleFormCancel,onDelete:this.currentEditable.remove?this.handleEditDialogDelete:void 0},null),this.showOccurrenceDialog&&this.currentEditable.edit&&t.createVNode(o.SchedulerOccurrenceDialog,{dataItem:this.formItem||this.dragItem||this.resizeItem||this.removeItem,isRemove:!!this.removeItem,onClose:this.ksCancel,onOccurrenceclick:this.ksOccurrenceClick,onSeriesclick:this.ksSeriesClick},null),this.showRemoveDialog&&this.removeItem&&this.currentEditable.remove&&t.createVNode(a.SchedulerRemoveDialog,{dataItem:this.removeItem,isSeries:(r=this.ksIsSeries)==null?void 0:r.call(this),onClose:this.ksRemoveDialogCancel,onCancel:this.ksRemoveDialogCancel,onConfirm:this.ksRemoveConfirm},null),e,this.currentEditable.resize&&this.$props.vertical&&[t.createVNode(i.Draggable,{onPress:this.handleResizePress,onDrag:this.handleResizeStartDrag,onRelease:this.handleResizeRelease},{default:()=>[t.createVNode("span",{class:"k-resize-handle k-resize-n"},null)]}),t.createVNode(i.Draggable,{onPress:this.handleResizePress,onDrag:this.handleResizeEndDrag,onRelease:this.handleResizeRelease},{default:()=>[t.createVNode("span",{class:"k-resize-handle k-resize-s"},null)]})],this.currentEditable.resize&&!this.$props.vertical&&[t.createVNode(i.Draggable,{onPress:this.handleResizePress,onDrag:this.handleResizeStartDrag,onRelease:this.handleResizeRelease},{default:()=>[t.createVNode("span",{class:"k-resize-handle k-resize-w"},null)]}),t.createVNode(i.Draggable,{onPress:this.handleResizePress,onDrag:this.handleResizeEndDrag,onRelease:this.handleResizeRelease},{default:()=>[t.createVNode("span",{class:"k-resize-handle k-resize-e"},null)]})],this.$props.resizeHint?this.bv.viewProps.resizeHint?s:[t.createVNode("div",{class:"k-marquee-color",style:{borderColor:this.color,backgroundColor:this.color}},null),t.createVNode("div",{class:"k-marquee-text"},[!this.$props.tail&&t.createVNode("div",{class:"k-label-top"},[this.intl.formatDate(this.$props.zonedStart,this.$props.format)]),!this.$props.head&&t.createVNode("div",{class:"k-label-bottom"},[this.intl.formatDate(this.$props.zonedEnd,this.$props.format)])])]:null])]}})},methods:{getElement(){return this.$el.nodeType===8?this.$el.parentElement:this.$el.nodeType===3?this.$el.nextElementSibling:this.$el},handleFocus(e){this.$emit("focus",{event:e,target:{props:{...this.$props},element:this.element}})},handleBlur(e){this.$emit("blur",{event:e,target:{props:{...this.$props},element:this.element}})},handleMouseDown(e){this.$emit("mousedown",{event:e,target:{props:{...this.$props},element:this.element}})},handleClick(e){const s={event:e,target:{props:{...this.$props},element:this.element}};this.$emit("click",s),this.itemClick(s)},handleMouseUp(e){this.$emit("mouseup",{event:e,target:{props:{...this.$props},element:this.element}})},handleMouseOver(e){this.$emit("mouseover",{event:e,target:{props:{...this.$props},element:this.element}})},handleMouseOut(e){this.$emit("mouseout",{event:e,target:{props:{...this.$props},element:this.element}})},handleMouseEnter(e){this.$emit("mouseenter",{event:e,target:{props:{...this.$props},element:this.element}})},handleMouseLeave(e){this.$emit("mouseleave",{event:e,target:{props:{...this.$props},element:this.element}})},handleDoubleClick(e){if(this.$props.readonly)return;const s={event:e,target:{props:{...this.$props},element:this.element}};this.$emit("doubleclick",s),this.itemDoubleClick(s)},handleRemoveClick(e){this.$emit("removeclick",{event:e,target:{props:{...this.$props},element:this.element}})},handleKeyDown(e){this.$emit("keydown",{event:e,target:{props:{...this.$props},element:this.element}})},handleKeyPress(e){this.$emit("keypress",{event:e,target:{props:{...this.$props},element:this.element}})},handleKeyUp(e){this.$emit("keyup",{event:e,target:{props:{...this.$props},element:this.element}})},handlePress(e){this.currentEditable.drag&&this.$emit("press",{dragEvent:e,target:{props:{...this.$props},element:this.element}})},handleDrag(e){this.currentEditable.drag&&this.$emit("drag",{dragEvent:e,target:{props:{...this.$props},element:this.element}})},handleRelease(e){this.currentEditable.drag&&this.$emit("release",{dragEvent:e,target:{props:{...this.$props},element:this.element}})},handleResizePress(e){this.$emit("resizepress",{dragEvent:e,target:{props:{...this.$props},element:this.element}})},handleResizeStartDrag(e){this.$emit("resizestartdrag",{dragEvent:e,target:{props:{...this.$props},element:this.element}})},handleResizeEndDrag(e){this.$emit("resizeenddrag",{dragEvent:e,target:{props:{...this.$props},element:this.element}})},handleResizeRelease(e){this.$emit("resizerelease",{dragEvent:e,target:{props:{...this.$props},element:this.element}})},handleFormClose(e){this.ksCancel(e),this.$emit("close",e)},handleFormSubmit(e){this.ksFormSubmit(e),this.$emit("formsubmit",e)},handleFormCancel(e){this.ksCancel(e),this.$emit("cancel",e)},handleEditDialogSave(e){const s={value:e,event:null,target:this};this.ksFormSubmit(s),this.$emit("formsubmit",s)},handleEditDialogCancel(){const e={value:null,event:null,target:this};this.ksCancel(e),this.$emit("cancel",e)},handleEditDialogDelete(e){this.ksFormDelete&&this.ksFormDelete(e)}}});exports.SchedulerItem=u;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),r=require("../utils/main.js"),i=require("@progress/kendo-vue-common"),n=require("@progress/kendo-vue-intl"),o=require("../components/SchedulerOccurrenceDialog.js"),a=require("../components/SchedulerRemoveDialog.js"),h=require("../components/SchedulerForm.js"),d=require("../hooks/useEditable.js"),u=t.defineComponent({name:"KendoSchedulerItem",inheritAttrs:!1,emits:{focus:null,blur:null,mousedown:null,mouseup:null,mouseover:null,mouseout:null,mouseenter:null,mouseleave:null,click:null,doubleclick:null,removeclick:null,keydown:null,keypress:null,keyup:null,press:null,drag:null,release:null,resizepress:null,resizestartdrag:null,resizeenddrag:null,resizerelease:null,cancel:null,close:null,formsubmit:null},props:{uid:[String,Number],start:Date,end:Date,originalStart:Date,startTimezone:String,endTimezone:String,isAllDay:Boolean,title:String,description:String,occurrenceId:String,recurrenceExceptions:Array,recurrenceRule:String,recurrenceId:[String,Number],dataItem:Object,head:Boolean,tail:Boolean,order:Number,zonedStart:Object,zonedEnd:Object,slots:Array,group:Object,range:Object,isException:Boolean,isRecurring:Boolean,id:String,tabIndex:Number,className:String,itemStyle:Object,editable:[Object,Boolean],readonly:Boolean,selected:Boolean,vertical:Boolean,dragHint:Boolean,resizeHint:Boolean,format:String,maxSiblingsPerSlot:Number,itemTitle:String,formItem:Object,dragItem:Object,resizeItem:Object,removeItem:Object,ignoreIsAllDay:Boolean,item:[String,Function,Object],showOccurrenceDialog:{type:Boolean,default:void 0},showRemoveDialog:{type:Boolean,default:void 0}},inject:{ks:{default:null},bv:{default:null},kendoLocalizationService:{default:null},kendoIntlService:{default:null},setItems:{default:null},itemClick:{default:null},itemDoubleClick:{default:null},ksMobile:{default:null},ksCancel:{default:null},ksFormSubmit:{default:null},ksOccurrenceClick:{default:null},ksSeriesClick:{default:null},ksRemoveConfirm:{default:null},ksRemoveDialogCancel:{default:null},ksDeleteItem:{default:null},ksFormDelete:{default:null},ksIsSeries:{default:null}},computed:{currentEditable(){const e=d.useEditable(this.$props.editable);return this.$props.readonly?{add:!1,edit:!1,drag:!1,resize:!1,remove:!1,select:e.select}:e},resource(){return this.$props.group.resources.find(e=>!!(e.colorField&&e[e.colorField]!==""&&e[e.colorField]!==void 0))},color(){return this.resource&&this.resource.colorField&&this.resource[this.resource.colorField]},currentTabIndex(){return this.$props.tabIndex!==void 0?this.$props.tabIndex===null?void 0:this.$props.tabIndex:this.$props.selected?0:-1},itemClassName(){return{"k-event":!this.$props.resizeHint,"k-selected":this.$props.selected&&this.currentEditable.select,"k-readonly":!this.$props.resizeHint&&!!this.$props.readonly,"k-event-drag-hint":this.$props.dragHint,"k-scheduler-marquee":this.$props.resizeHint,"k-marquee":this.$props.resizeHint,"k-first":this.$props.resizeHint&&!this.$props.tail,"k-last":this.$props.resizeHint&&!this.$props.head,[this.$props.className]:this.$props.className}},eventLabel(){return`${r.formatEventTime(this.intl,this.$props.zonedStart,this.$props.zonedEnd,this.$props.isAllDay)}, ${this.$props.title}`},resizeHandleStyle(){var e;return this.$props.selected&&this.currentEditable.select&&((e=this.ksMobile)!=null&&e.call(this))?{visibility:"visible"}:void 0},computedStyle(){var e;return{cursor:"pointer",userSelect:"none",borderColor:this.$props.resizeHint?void 0:this.color,backgroundColor:this.$props.resizeHint?void 0:this.color,touchAction:"none",...this.$props.itemStyle,containerType:this.$props.resizeHint?void 0:((e=this.$props.itemStyle)==null?void 0:e.height)==="auto"?"normal":"size"}}},created(){this.setItems({type:r.COLLECTION_ACTION.add,item:this})},mounted(){this.element||(this.element=this.$refs.draggable&&this.$refs.draggable.element)},unmounted(){this.setItems({type:r.COLLECTION_ACTION.remove,item:this})},render(){const e=i.getDefaultSlots(this);this.intl=n.provideIntlService(this);const s=i.getTemplate.call(this,{h:t.h,template:this.bv.viewProps.resizeHint,additionalProps:{dataItem:this.dataItem,color:this.color,itemClassName:this.itemClassName}});return t.createVNode(i.Draggable,{onPress:this.handlePress,onDrag:this.handleDrag,onRelease:this.handleRelease,ref:"draggable"},{default:()=>{var l;return[t.createVNode("div",{id:this.$props.id,style:this.computedStyle,tabindex:this.currentTabIndex,class:this.itemClassName,role:"button","aria-label":this.eventLabel,"aria-disabled":this.$props.readonly?!0:void 0,onFocusin:this.handleFocus,onBlur:this.handleBlur,onMouseup:this.handleMouseUp,onMousedown:this.handleMouseDown,onClick:this.handleClick,onMouseover:this.handleMouseOver,onMouseout:this.handleMouseOut,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onDblclick:this.handleDoubleClick,onKeydown:this.handleKeyDown,onKeypress:this.handleKeyPress,onKeyup:this.handleKeyUp,"data-group-index":this.$props.group.index,"data-range-index":this.$props.range.index},[this.formItem&&!this.showOccurrenceDialog&&this.currentEditable.edit&&t.createVNode(h.SchedulerForm,{dataItem:this.formItem,onSubmit:this.handleFormSubmit,onClose:this.handleFormClose,onCancel:this.handleFormCancel,onDelete:this.currentEditable.remove?this.handleEditDialogDelete:void 0},null),this.showOccurrenceDialog&&this.currentEditable.edit&&t.createVNode(o.SchedulerOccurrenceDialog,{dataItem:this.formItem||this.dragItem||this.resizeItem||this.removeItem,isRemove:!!this.removeItem,onClose:this.ksCancel,onOccurrenceclick:this.ksOccurrenceClick,onSeriesclick:this.ksSeriesClick},null),this.showRemoveDialog&&this.removeItem&&this.currentEditable.remove&&t.createVNode(a.SchedulerRemoveDialog,{dataItem:this.removeItem,isSeries:(l=this.ksIsSeries)==null?void 0:l.call(this),onClose:this.ksRemoveDialogCancel,onCancel:this.ksRemoveDialogCancel,onConfirm:this.ksRemoveConfirm},null),e,this.currentEditable.resize&&this.$props.vertical&&[t.createVNode(i.Draggable,{onPress:this.handleResizePress,onDrag:this.handleResizeStartDrag,onRelease:this.handleResizeRelease},{default:()=>[t.createVNode("span",{class:"k-resize-handle k-resize-n",style:this.resizeHandleStyle},null)]}),t.createVNode(i.Draggable,{onPress:this.handleResizePress,onDrag:this.handleResizeEndDrag,onRelease:this.handleResizeRelease},{default:()=>[t.createVNode("span",{class:"k-resize-handle k-resize-s",style:this.resizeHandleStyle},null)]})],this.currentEditable.resize&&!this.$props.vertical&&[t.createVNode(i.Draggable,{onPress:this.handleResizePress,onDrag:this.handleResizeStartDrag,onRelease:this.handleResizeRelease},{default:()=>[t.createVNode("span",{class:"k-resize-handle k-resize-w",style:this.resizeHandleStyle},null)]}),t.createVNode(i.Draggable,{onPress:this.handleResizePress,onDrag:this.handleResizeEndDrag,onRelease:this.handleResizeRelease},{default:()=>[t.createVNode("span",{class:"k-resize-handle k-resize-e",style:this.resizeHandleStyle},null)]})],this.$props.resizeHint?this.bv.viewProps.resizeHint?s:[t.createVNode("div",{class:"k-marquee-color",style:{borderColor:this.color,backgroundColor:this.color}},null),t.createVNode("div",{class:"k-marquee-text"},[!this.$props.tail&&t.createVNode("div",{class:"k-label-top"},[this.intl.formatDate(this.$props.zonedStart,this.$props.format)]),!this.$props.head&&t.createVNode("div",{class:"k-label-bottom"},[this.intl.formatDate(this.$props.zonedEnd,this.$props.format)])])]:null])]}})},methods:{getElement(){return this.$el.nodeType===8?this.$el.parentElement:this.$el.nodeType===3?this.$el.nextElementSibling:this.$el},handleFocus(e){this.$emit("focus",{event:e,target:{props:{...this.$props},element:this.element}})},handleBlur(e){this.$emit("blur",{event:e,target:{props:{...this.$props},element:this.element}})},handleMouseDown(e){this.$emit("mousedown",{event:e,target:{props:{...this.$props},element:this.element}})},handleClick(e){var l;const s={event:e,target:{props:{...this.$props},element:this.element}};this.$emit("click",s),this.itemClick(s),(l=this.ksMobile)!=null&&l.call(this)&&this.$props.selected&&this.handleDoubleClick(e)},handleMouseUp(e){this.$emit("mouseup",{event:e,target:{props:{...this.$props},element:this.element}})},handleMouseOver(e){this.$emit("mouseover",{event:e,target:{props:{...this.$props},element:this.element}})},handleMouseOut(e){this.$emit("mouseout",{event:e,target:{props:{...this.$props},element:this.element}})},handleMouseEnter(e){this.$emit("mouseenter",{event:e,target:{props:{...this.$props},element:this.element}})},handleMouseLeave(e){this.$emit("mouseleave",{event:e,target:{props:{...this.$props},element:this.element}})},handleDoubleClick(e){if(this.$props.readonly)return;const s={event:e,target:{props:{...this.$props},element:this.element}};this.$emit("doubleclick",s),this.itemDoubleClick(s)},handleRemoveClick(e){this.$emit("removeclick",{event:e,target:{props:{...this.$props},element:this.element}})},handleKeyDown(e){this.$emit("keydown",{event:e,target:{props:{...this.$props},element:this.element}})},handleKeyPress(e){this.$emit("keypress",{event:e,target:{props:{...this.$props},element:this.element}})},handleKeyUp(e){this.$emit("keyup",{event:e,target:{props:{...this.$props},element:this.element}})},handlePress(e){this.currentEditable.drag&&this.$emit("press",{dragEvent:e,target:{props:{...this.$props},element:this.element}})},handleDrag(e){this.currentEditable.drag&&this.$emit("drag",{dragEvent:e,target:{props:{...this.$props},element:this.element}})},handleRelease(e){this.currentEditable.drag&&this.$emit("release",{dragEvent:e,target:{props:{...this.$props},element:this.element}})},handleResizePress(e){this.$emit("resizepress",{dragEvent:e,target:{props:{...this.$props},element:this.element}})},handleResizeStartDrag(e){this.$emit("resizestartdrag",{dragEvent:e,target:{props:{...this.$props},element:this.element}})},handleResizeEndDrag(e){this.$emit("resizeenddrag",{dragEvent:e,target:{props:{...this.$props},element:this.element}})},handleResizeRelease(e){this.$emit("resizerelease",{dragEvent:e,target:{props:{...this.$props},element:this.element}})},handleFormClose(e){this.ksCancel(e),this.$emit("close",e)},handleFormSubmit(e){this.ksFormSubmit(e),this.$emit("formsubmit",e)},handleFormCancel(e){this.ksCancel(e),this.$emit("cancel",e)},handleEditDialogSave(e){const s={value:e,event:null,target:this};this.ksFormSubmit(s),this.$emit("formsubmit",s)},handleEditDialogCancel(){const e={value:null,event:null,target:this};this.ksCancel(e),this.$emit("cancel",e)},handleEditDialogDelete(e){this.ksFormDelete&&this.ksFormDelete(e)}}});exports.SchedulerItem=u;
@@ -7,13 +7,13 @@
7
7
  */
8
8
  import { defineComponent as n, h as o, createVNode as t } from "vue";
9
9
  import { COLLECTION_ACTION as r, formatEventTime as a } from "../utils/main.mjs";
10
- import { getDefaultSlots as h, getTemplate as d, Draggable as i } from "@progress/kendo-vue-common";
10
+ import { getDefaultSlots as h, getTemplate as d, Draggable as l } from "@progress/kendo-vue-common";
11
11
  import { provideIntlService as u } from "@progress/kendo-vue-intl";
12
12
  import { SchedulerOccurrenceDialog as m } from "../components/SchedulerOccurrenceDialog.mjs";
13
13
  import { SchedulerRemoveDialog as p } from "../components/SchedulerRemoveDialog.mjs";
14
14
  import { SchedulerForm as c } from "../components/SchedulerForm.mjs";
15
15
  import { useEditable as g } from "../hooks/useEditable.mjs";
16
- const C = /* @__PURE__ */ n({
16
+ const y = /* @__PURE__ */ n({
17
17
  name: "KendoSchedulerItem",
18
18
  inheritAttrs: !1,
19
19
  emits: {
@@ -117,6 +117,9 @@ const C = /* @__PURE__ */ n({
117
117
  itemDoubleClick: {
118
118
  default: null
119
119
  },
120
+ ksMobile: {
121
+ default: null
122
+ },
120
123
  ksCancel: {
121
124
  default: null
122
125
  },
@@ -182,6 +185,12 @@ const C = /* @__PURE__ */ n({
182
185
  eventLabel() {
183
186
  return `${a(this.intl, this.$props.zonedStart, this.$props.zonedEnd, this.$props.isAllDay)}, ${this.$props.title}`;
184
187
  },
188
+ resizeHandleStyle() {
189
+ var e;
190
+ return this.$props.selected && this.currentEditable.select && ((e = this.ksMobile) != null && e.call(this)) ? {
191
+ visibility: "visible"
192
+ } : void 0;
193
+ },
185
194
  computedStyle() {
186
195
  var e;
187
196
  return {
@@ -222,14 +231,14 @@ const C = /* @__PURE__ */ n({
222
231
  itemClassName: this.itemClassName
223
232
  }
224
233
  });
225
- return t(i, {
234
+ return t(l, {
226
235
  onPress: this.handlePress,
227
236
  onDrag: this.handleDrag,
228
237
  onRelease: this.handleRelease,
229
238
  ref: "draggable"
230
239
  }, {
231
240
  default: () => {
232
- var l;
241
+ var i;
233
242
  return [t("div", {
234
243
  id: this.$props.id,
235
244
  style: this.computedStyle,
@@ -267,41 +276,45 @@ const C = /* @__PURE__ */ n({
267
276
  onSeriesclick: this.ksSeriesClick
268
277
  }, null), this.showRemoveDialog && this.removeItem && this.currentEditable.remove && t(p, {
269
278
  dataItem: this.removeItem,
270
- isSeries: (l = this.ksIsSeries) == null ? void 0 : l.call(this),
279
+ isSeries: (i = this.ksIsSeries) == null ? void 0 : i.call(this),
271
280
  onClose: this.ksRemoveDialogCancel,
272
281
  onCancel: this.ksRemoveDialogCancel,
273
282
  onConfirm: this.ksRemoveConfirm
274
- }, null), e, this.currentEditable.resize && this.$props.vertical && [t(i, {
283
+ }, null), e, this.currentEditable.resize && this.$props.vertical && [t(l, {
275
284
  onPress: this.handleResizePress,
276
285
  onDrag: this.handleResizeStartDrag,
277
286
  onRelease: this.handleResizeRelease
278
287
  }, {
279
288
  default: () => [t("span", {
280
- class: "k-resize-handle k-resize-n"
289
+ class: "k-resize-handle k-resize-n",
290
+ style: this.resizeHandleStyle
281
291
  }, null)]
282
- }), t(i, {
292
+ }), t(l, {
283
293
  onPress: this.handleResizePress,
284
294
  onDrag: this.handleResizeEndDrag,
285
295
  onRelease: this.handleResizeRelease
286
296
  }, {
287
297
  default: () => [t("span", {
288
- class: "k-resize-handle k-resize-s"
298
+ class: "k-resize-handle k-resize-s",
299
+ style: this.resizeHandleStyle
289
300
  }, null)]
290
- })], this.currentEditable.resize && !this.$props.vertical && [t(i, {
301
+ })], this.currentEditable.resize && !this.$props.vertical && [t(l, {
291
302
  onPress: this.handleResizePress,
292
303
  onDrag: this.handleResizeStartDrag,
293
304
  onRelease: this.handleResizeRelease
294
305
  }, {
295
306
  default: () => [t("span", {
296
- class: "k-resize-handle k-resize-w"
307
+ class: "k-resize-handle k-resize-w",
308
+ style: this.resizeHandleStyle
297
309
  }, null)]
298
- }), t(i, {
310
+ }), t(l, {
299
311
  onPress: this.handleResizePress,
300
312
  onDrag: this.handleResizeEndDrag,
301
313
  onRelease: this.handleResizeRelease
302
314
  }, {
303
315
  default: () => [t("span", {
304
- class: "k-resize-handle k-resize-e"
316
+ class: "k-resize-handle k-resize-e",
317
+ style: this.resizeHandleStyle
305
318
  }, null)]
306
319
  })], this.$props.resizeHint ? this.bv.viewProps.resizeHint ? s : [t("div", {
307
320
  class: "k-marquee-color",
@@ -359,6 +372,7 @@ const C = /* @__PURE__ */ n({
359
372
  });
360
373
  },
361
374
  handleClick(e) {
375
+ var i;
362
376
  const s = {
363
377
  event: e,
364
378
  target: {
@@ -368,7 +382,7 @@ const C = /* @__PURE__ */ n({
368
382
  element: this.element
369
383
  }
370
384
  };
371
- this.$emit("click", s), this.itemClick(s);
385
+ this.$emit("click", s), this.itemClick(s), (i = this.ksMobile) != null && i.call(this) && this.$props.selected && this.handleDoubleClick(e);
372
386
  },
373
387
  handleMouseUp(e) {
374
388
  this.$emit("mouseup", {
@@ -593,5 +607,5 @@ const C = /* @__PURE__ */ n({
593
607
  }
594
608
  });
595
609
  export {
596
- C as SchedulerItem
610
+ y as SchedulerItem
597
611
  };
@@ -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 e={name:"@progress/kendo-vue-scheduler",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate: 1788964513,version:"10.0.1-develop.2",licensingDocsUrl:"https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=vue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"};exports.packageMetadata=e;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-vue-scheduler",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate: 1789130335,version:"10.0.1-develop.4",licensingDocsUrl:"https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=vue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"};exports.packageMetadata=e;
@@ -10,8 +10,8 @@ const e = {
10
10
  productName: "Kendo UI for Vue",
11
11
  productCode: "KENDOUIVUE",
12
12
  productCodes: ["KENDOUIVUE"],
13
- publishDate: 1788964513,
14
- version: "10.0.1-develop.2",
13
+ publishDate: 1789130335,
14
+ version: "10.0.1-develop.4",
15
15
  licensingDocsUrl: "https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=vue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"
16
16
  };
17
17
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-vue-scheduler",
3
- "version": "10.0.1-develop.2",
3
+ "version": "10.0.1-develop.4",
4
4
  "description": "TODO",
5
5
  "author": "Progress",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -27,16 +27,16 @@
27
27
  "@progress/kendo-date-math": "^1.5.13",
28
28
  "@progress/kendo-drawing": "^1.20.1",
29
29
  "@progress/kendo-licensing": "^1.7.2",
30
- "@progress/kendo-vue-common": "10.0.1-develop.2",
31
- "@progress/kendo-vue-buttons": "10.0.1-develop.2",
32
- "@progress/kendo-vue-dateinputs": "10.0.1-develop.2",
33
- "@progress/kendo-vue-dialogs": "10.0.1-develop.2",
34
- "@progress/kendo-vue-dropdowns": "10.0.1-develop.2",
35
- "@progress/kendo-vue-form": "10.0.1-develop.2",
36
- "@progress/kendo-vue-inputs": "10.0.1-develop.2",
37
- "@progress/kendo-vue-intl": "10.0.1-develop.2",
38
- "@progress/kendo-vue-popup": "10.0.1-develop.2",
39
- "@progress/kendo-vue-tooltip": "10.0.1-develop.2",
30
+ "@progress/kendo-vue-common": "10.0.1-develop.4",
31
+ "@progress/kendo-vue-buttons": "10.0.1-develop.4",
32
+ "@progress/kendo-vue-dateinputs": "10.0.1-develop.4",
33
+ "@progress/kendo-vue-dialogs": "10.0.1-develop.4",
34
+ "@progress/kendo-vue-dropdowns": "10.0.1-develop.4",
35
+ "@progress/kendo-vue-form": "10.0.1-develop.4",
36
+ "@progress/kendo-vue-inputs": "10.0.1-develop.4",
37
+ "@progress/kendo-vue-intl": "10.0.1-develop.4",
38
+ "@progress/kendo-vue-popup": "10.0.1-develop.4",
39
+ "@progress/kendo-vue-tooltip": "10.0.1-develop.4",
40
40
  "@progress/kendo-svg-icons": "^4.9.0 || ^5.0.0",
41
41
  "vue": "^3.0.2"
42
42
  },
@@ -61,7 +61,7 @@
61
61
  "package": {
62
62
  "productName": "Kendo UI for Vue",
63
63
  "productCode": "KENDOUIVUE",
64
- "publishDate": 1788964513,
64
+ "publishDate": 1789130335,
65
65
  "licensingDocsUrl": "https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=vue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"
66
66
  }
67
67
  },
@@ -112,6 +112,9 @@ declare const SchedulerDrag: import('vue').DefineComponent<import('vue').Extract
112
112
  'k-last': boolean;
113
113
  };
114
114
  eventLabel(): string;
115
+ resizeHandleStyle(): {
116
+ visibility: string;
117
+ };
115
118
  computedStyle(): any;
116
119
  }, {
117
120
  getElement(): any;
@@ -328,6 +331,9 @@ declare const SchedulerDrag: import('vue').DefineComponent<import('vue').Extract
328
331
  'k-last': boolean;
329
332
  };
330
333
  eventLabel(): string;
334
+ resizeHandleStyle(): {
335
+ visibility: string;
336
+ };
331
337
  computedStyle(): any;
332
338
  }, {
333
339
  getElement(): any;
@@ -114,6 +114,9 @@ declare const SchedulerResize: import('vue').DefineComponent<import('vue').Extra
114
114
  'k-last': boolean;
115
115
  };
116
116
  eventLabel(): string;
117
+ resizeHandleStyle(): {
118
+ visibility: string;
119
+ };
117
120
  computedStyle(): any;
118
121
  }, {
119
122
  getElement(): any;
@@ -331,6 +334,9 @@ declare const SchedulerResize: import('vue').DefineComponent<import('vue').Extra
331
334
  'k-last': boolean;
332
335
  };
333
336
  eventLabel(): string;
337
+ resizeHandleStyle(): {
338
+ visibility: string;
339
+ };
334
340
  computedStyle(): any;
335
341
  }, {
336
342
  getElement(): any;
@@ -1,44 +0,0 @@
1
- /**
2
- * @license
3
- *-------------------------------------------------------------------------------------------
4
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
- * Licensed under commercial license. See LICENSE.md in the package root for more information
6
- *-------------------------------------------------------------------------------------------
7
- */
8
- import { PropType } from 'vue';
9
- /**
10
- * @hidden
11
- */
12
- export interface SchedulerAdaptiveHeaderProps {
13
- isRtl?: boolean;
14
- onPrevclick?: (e: any) => void;
15
- onNextclick?: (e: any) => void;
16
- onTodayclick?: (e: any) => void;
17
- onCreateclick?: (e: any) => void;
18
- onCalendarclick?: (e: any) => void;
19
- onPdfclick?: (e: any) => void;
20
- }
21
- /**
22
- * @hidden
23
- */
24
- declare const SchedulerAdaptiveHeader: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
25
- isRtl: PropType<boolean>;
26
- onPrevclick: PropType<(e: any) => void>;
27
- onNextclick: PropType<(e: any) => void>;
28
- onTodayclick: PropType<(e: any) => void>;
29
- onCreateclick: PropType<(e: any) => void>;
30
- onCalendarclick: PropType<(e: any) => void>;
31
- onPdfclick: PropType<(e: any) => void>;
32
- }>, {}, {}, {}, {
33
- handlePrevClick(e: any): void;
34
- handleNextClick(e: any): void;
35
- }, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
36
- isRtl: PropType<boolean>;
37
- onPrevclick: PropType<(e: any) => void>;
38
- onNextclick: PropType<(e: any) => void>;
39
- onTodayclick: PropType<(e: any) => void>;
40
- onCreateclick: PropType<(e: any) => void>;
41
- onCalendarclick: PropType<(e: any) => void>;
42
- onPdfclick: PropType<(e: any) => void>;
43
- }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
44
- export { SchedulerAdaptiveHeader };
@@ -1,8 +0,0 @@
1
- /**
2
- * @license
3
- *-------------------------------------------------------------------------------------------
4
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
- * Licensed under commercial license. See LICENSE.md in the package root for more information
6
- *-------------------------------------------------------------------------------------------
7
- */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("@progress/kendo-vue-buttons"),s=require("@progress/kendo-vue-intl"),r=require("../../messages/main.js"),c=require("@progress/kendo-svg-icons"),u=require("./view-selector/ViewSelectorList.js");function d(n){return typeof n=="function"||Object.prototype.toString.call(n)==="[object Object]"&&!e.isVNode(n)}const v=e.defineComponent({name:"KendoSchedulerAdaptiveHeader",props:{isRtl:Boolean,onPrevclick:Function,onNextclick:Function,onTodayclick:Function,onCreateclick:Function,onCalendarclick:Function,onPdfclick:Function},inject:{ks:{default:null},kendoLocalizationService:{default:null},kendoIntlService:{default:null}},render(){const n=s.provideLocalizationService(this),l=s.provideIntlService(this),o=n.toLanguageString(r.previousTitle,r.messages[r.previousTitle]),a=n.toLanguageString(r.nextTitle,r.messages[r.nextTitle]),i=l.formatDate(this.ks.currentDate,this.ks.shortDateFormat);return e.createVNode("div",null,[e.createVNode(t.Toolbar,{overflow:"none",class:"k-scheduler-toolbar"},{default:()=>[e.createVNode(t.ButtonGroup,{class:"k-scheduler-tools"},{default:()=>[e.createVNode(t.Button,{class:"k-pdf",icon:"file-pdf",svgIcon:c.filePdfIcon,tabIndex:-1,onClick:this.$props.onPdfclick},null),e.createVNode(t.Button,{class:"k-nav-calendar",icon:"calendar",svgIcon:c.calendarIcon,tabIndex:-1,onClick:this.$props.onCalendarclick},null),e.createVNode(t.Button,{class:"k-create-event",icon:"plus",svgIcon:c.plusIcon,tabIndex:-1,onClick:this.$props.onCreateclick},null)]}),e.createVNode(t.ToolbarSpacer,null,null),e.createVNode(u.ViewSelectorList,null,null)]}),e.createVNode(t.Toolbar,{overflow:"none",class:"k-scheduler-toolbar"},{default:()=>[e.createVNode(t.Button,{class:"k-nav-prev",icon:this.isRtl?"chevron-right":"chevron-left",svgIcon:this.isRtl?c.chevronRightIcon:c.chevronLeftIcon,title:o,"aria-label":o,tabIndex:-1,onClick:this.handlePrevClick},null),e.createVNode(t.ToolbarSpacer,null,null),e.createVNode(t.Button,{class:"k-nav-current",fillMode:"flat",tabIndex:-1},d(i)?i:{default:()=>[i]}),e.createVNode(t.ToolbarSpacer,null,null),e.createVNode(t.Button,{class:"k-nav-next",icon:this.isRtl?"chevron-left":"chevron-right",svgIcon:this.isRtl?c.chevronLeftIcon:c.chevronRightIcon,title:a,"aria-label":a,tabIndex:-1,onClick:this.handleNextClick},null)]})])},methods:{handlePrevClick(n){var l,o;(o=(l=this.$props).onPrevclick)==null||o.call(l,n)},handleNextClick(n){var l,o;(o=(l=this.$props).onNextclick)==null||o.call(l,n)}}});exports.SchedulerAdaptiveHeader=v;
@@ -1,110 +0,0 @@
1
- /**
2
- * @license
3
- *-------------------------------------------------------------------------------------------
4
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
- * Licensed under commercial license. See LICENSE.md in the package root for more information
6
- *-------------------------------------------------------------------------------------------
7
- */
8
- import { defineComponent as k, createVNode as e, isVNode as v } from "vue";
9
- import { Toolbar as a, ButtonGroup as f, Button as o, ToolbarSpacer as i } from "@progress/kendo-vue-buttons";
10
- import { provideLocalizationService as m, provideIntlService as I } from "@progress/kendo-vue-intl";
11
- import { previousTitle as s, messages as u, nextTitle as d } from "../../messages/main.mjs";
12
- import { filePdfIcon as x, calendarIcon as g, plusIcon as b, chevronRightIcon as p, chevronLeftIcon as h } from "@progress/kendo-svg-icons";
13
- import { ViewSelectorList as C } from "./view-selector/ViewSelectorList.mjs";
14
- function S(n) {
15
- return typeof n == "function" || Object.prototype.toString.call(n) === "[object Object]" && !v(n);
16
- }
17
- const $ = /* @__PURE__ */ k({
18
- name: "KendoSchedulerAdaptiveHeader",
19
- props: {
20
- isRtl: Boolean,
21
- onPrevclick: Function,
22
- onNextclick: Function,
23
- onTodayclick: Function,
24
- onCreateclick: Function,
25
- onCalendarclick: Function,
26
- onPdfclick: Function
27
- },
28
- inject: {
29
- ks: {
30
- default: null
31
- },
32
- kendoLocalizationService: {
33
- default: null
34
- },
35
- kendoIntlService: {
36
- default: null
37
- }
38
- },
39
- render() {
40
- const n = m(this), l = I(this), t = n.toLanguageString(s, u[s]), r = n.toLanguageString(d, u[d]), c = l.formatDate(this.ks.currentDate, this.ks.shortDateFormat);
41
- return e("div", null, [e(a, {
42
- overflow: "none",
43
- class: "k-scheduler-toolbar"
44
- }, {
45
- default: () => [e(f, {
46
- class: "k-scheduler-tools"
47
- }, {
48
- default: () => [e(o, {
49
- class: "k-pdf",
50
- icon: "file-pdf",
51
- svgIcon: x,
52
- tabIndex: -1,
53
- onClick: this.$props.onPdfclick
54
- }, null), e(o, {
55
- class: "k-nav-calendar",
56
- icon: "calendar",
57
- svgIcon: g,
58
- tabIndex: -1,
59
- onClick: this.$props.onCalendarclick
60
- }, null), e(o, {
61
- class: "k-create-event",
62
- icon: "plus",
63
- svgIcon: b,
64
- tabIndex: -1,
65
- onClick: this.$props.onCreateclick
66
- }, null)]
67
- }), e(i, null, null), e(C, null, null)]
68
- }), e(a, {
69
- overflow: "none",
70
- class: "k-scheduler-toolbar"
71
- }, {
72
- default: () => [e(o, {
73
- class: "k-nav-prev",
74
- icon: this.isRtl ? "chevron-right" : "chevron-left",
75
- svgIcon: this.isRtl ? p : h,
76
- title: t,
77
- "aria-label": t,
78
- tabIndex: -1,
79
- onClick: this.handlePrevClick
80
- }, null), e(i, null, null), e(o, {
81
- class: "k-nav-current",
82
- fillMode: "flat",
83
- tabIndex: -1
84
- }, S(c) ? c : {
85
- default: () => [c]
86
- }), e(i, null, null), e(o, {
87
- class: "k-nav-next",
88
- icon: this.isRtl ? "chevron-left" : "chevron-right",
89
- svgIcon: this.isRtl ? h : p,
90
- title: r,
91
- "aria-label": r,
92
- tabIndex: -1,
93
- onClick: this.handleNextClick
94
- }, null)]
95
- })]);
96
- },
97
- methods: {
98
- handlePrevClick(n) {
99
- var l, t;
100
- (t = (l = this.$props).onPrevclick) == null || t.call(l, n);
101
- },
102
- handleNextClick(n) {
103
- var l, t;
104
- (t = (l = this.$props).onNextclick) == null || t.call(l, n);
105
- }
106
- }
107
- });
108
- export {
109
- $ as SchedulerAdaptiveHeader
110
- };