@progress/kendo-vue-scheduler 9.0.0-develop.1 → 9.0.0-develop.2
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/Scheduler.d.ts +38 -58
- package/Scheduler.js +1 -1
- package/Scheduler.mjs +117 -86
- package/components/footer/bussiness-hours/BusinessHours.js +1 -1
- package/components/footer/bussiness-hours/BusinessHours.mjs +6 -5
- package/components/header/SchedulerAdaptiveHeader.d.ts +44 -0
- package/components/header/SchedulerAdaptiveHeader.js +8 -0
- package/components/header/SchedulerAdaptiveHeader.mjs +108 -0
- package/dist/cdn/js/kendo-vue-scheduler.js +1 -1
- package/items/SchedulerViewItem.js +1 -1
- package/items/SchedulerViewItem.mjs +67 -52
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +11 -11
- package/slots/SchedulerEditSlot.js +1 -1
- package/slots/SchedulerEditSlot.mjs +43 -26
- package/views/agenda/AgendaViewBody.js +1 -1
- package/views/agenda/AgendaViewBody.mjs +48 -35
- package/views/agenda/AgendaViewHead.js +1 -1
- package/views/agenda/AgendaViewHead.mjs +13 -10
- package/views/day/DayViewHead.js +1 -1
- package/views/day/DayViewHead.mjs +13 -9
- package/views/month/MonthView.js +1 -1
- package/views/month/MonthView.mjs +2 -5
- package/views/month/MonthViewHead.js +1 -1
- package/views/month/MonthViewHead.mjs +18 -14
|
@@ -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
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("vue"),z=require("./SchedulerItem.js"),m=require("../utils/main.js"),u=require("../views/common/utils.js"),c=require("../constants/main.js"),D=require("@progress/kendo-vue-intl"),b=require("./SchedulerItemContent.js"),g=require("@progress/kendo-vue-common");function R(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!h.isVNode(e)}const I=1,v=h.defineComponent({name:"KendoSchedulerViewItem",inheritAttrs:!1,props:{ignoreIsAllDay:Boolean,item:[String,Function,Object],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],selected:Boolean,vertical:Boolean,dragHint:Boolean,resizeHint:Boolean,format:String,showOccurrenceDialog:{type:Boolean,default:void 0},showRemoveDialog:{type:Boolean,default:void 0},formItem:Object,dragItem:Object,resizeItem:Object,removeItem:Object,itemRef:Object,onKeydown:Function,onKeyup:Function,onFocus:Function,onMouseup:Function,onMousedown:Function,onClick:Function,onDoubleclick:Function,onRemoveclick:Function,onPress:Function,onDrag:Function,onRelease:Function,onResizepress:Function,onResizeenddrag:Function,onResizestartdrag:Function,onResizerelease:Function},inject:{kendoIntlService:{default:null},ks:{default:null},bv:{default:null}},computed:{itemTime(){return this.$props.isAllDay?this.intl.toString(this.$props.zonedStart,"t"):this.intl.format("{0:t} - {1:t}",this.$props.zonedStart,this.$props.zonedEnd)},itemTitle(){return`(${this.itemTime}): ${this.$props.title}`}},data(){return{timeout:void 0,currentItem:null,viewItem:null,display:!0,visible:!1,maxSiblingsPerSlot:0}},mounted(){if(this.element=this.getElement(),!this.ks.scheduler||!this.ks.scheduler.$el)return;g.canUseDOM&&(this.observer=new window.ResizeObserver(this.handleResize),this.observer.observe(this.ks.scheduler.$el));const e=this;this.$nextTick(function(){e.align(),e.position()})},updated(){const e=this;this.$nextTick(function(){e.align(),e.position()}),!(!this.ks.scheduler||!this.ks.scheduler.$el||this.observer)&&g.canUseDOM&&window.ResizeObserver&&(this.observer=new window.ResizeObserver(this.handleResize),this.observer.observe(this.ks.scheduler.$el))},unmounted(){this.observer&&this.observer.disconnect()},render(){const e=g.getDefaultSlots(this);this.intl=D.provideIntlService(this);let t;const n=h.createVNode(z.SchedulerItem,{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,tabIndex:this.tabIndex,className:this.className,itemStyle:{visibility:this.visible?void 0:"hidden",display:this.display?void 0:"none",...this.$props.itemStyle},editable:this.editable,selected:this.selected,vertical:this.vertical,dragHint:this.dragHint,resizeHint:this.resizeHint,format:this.format,itemTitle:this.itemTitle,showOccurrenceDialog:this.showOccurrenceDialog,showRemoveDialog:this.showRemoveDialog,formItem:this.formItem,dragItem:this.dragItem,resizeItem:this.resizeItem,removeItem:this.removeItem,maxSiblingsPerSlot:this.maxSiblingsPerSlot,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},{default:()=>[!this.$props.resizeHint&&h.createVNode("div",{title:this.itemTitle},[!this.$props.isAllDay&&h.createVNode(b.SchedulerItemContent,{title:this.itemTitle,class:"k-event-template k-event-time "},R(e)?e:{default:()=>[e]}),h.createVNode(b.SchedulerItemContent,{title:this.$props.title,class:"k-event-template"},R(e)?e:{default:()=>[e]})])]});return t=g.getTemplate.call(this,{h:h.h,template:this.$props.item,defaultRendering:n,defaultSlots:e,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}}),t},methods:{getElement(){return this.$el.nodeType===8?this.$el.parentElement:this.$el.nodeType===3?this.$el.nextElementSibling:this.$el},handleFocus(e){this.$emit("focus",e)},handleBlur(e){this.$emit("blur",e)},handleMouseDown(e){this.$emit("mousedown",e)},handleClick(e){this.$emit("click",e)},handleMouseUp(e){this.$emit("mouseup",e)},handleMouseOver(e){this.$emit("mouseover",e)},handleMouseOut(e){this.$emit("mouseout",e)},handleMouseEnter(e){this.$emit("mouseenter",e)},handleMouseLeave(e){this.$emit("mouseleave",e)},handleDoubleClick(e){this.$emit("doubleclick",e)},handleRemoveClick(e){this.$emit("removeclick",e)},handleKeyDown(e){this.$emit("keydown",e)},handleKeyPress(e){this.$emit("keypress",e)},handleKeyUp(e){this.$emit("keyup",e)},handlePress(e){this.$emit("press",e)},handleDrag(e){this.$emit("drag",e)},handleRelease(e){this.$emit("release",e)},handleResizePress(e){this.$emit("resizepress",e)},handleResizeStartDrag(e){this.$emit("resizestartdrag",e)},handleResizeEndDrag(e){this.$emit("resizeenddrag",e)},handleResizeRelease(e){this.$emit("resizerelease",e)},calculateMostSiblings(e,t){let n=1;return e.forEach(o=>{const i=t.filter(r=>this.inSlot(o.cSlot,r.$props));i.length>n&&(n=i.length)}),n},getSiblingsInAllSlots(e,t){return e.map(o=>t.filter(i=>this.inSlot(o.cSlot,i.$props)))},inSlot(e,t){return m.intersects(e.start,e.end,t.start,t.end)&&e.group.index===t.group.index&&e.range.index===t.range.index&&(this.$props.ignoreIsAllDay||e.isAllDay===t.isAllDay)},align(){if(!this.element)return;const e=(this.bv.slots||[]).filter(i=>i&&this.inSlot(i.cSlot,this.$props));if(e.length===0){this.display=!1;return}const t=m.first(e.sort(function(i,r){return i.cSlot.start&&r.cSlot.start?i.cSlot.start.getTime()-r.cSlot.start.getTime():!0}));if(!t)return;const n=u.getRect(t.$el),o=t.$el;if(o&&!this.$props.vertical){const i=o.querySelector(".k-nav-day");if(i)n.top+=i.offsetTop+parseFloat(window.getComputedStyle(i).lineHeight||"0");else if(o.firstElementChild){const r=window.getComputedStyle(o),S=parseFloat(r.paddingTop||"0"),d=parseFloat(r.lineHeight||"0");d>0&&(n.top+=S+d)}}u.setRect(this.element,n)},position(){if(!this.element)return;const e=(this.bv.slots||[]).filter(l=>l&&this.inSlot(l.cSlot,this.$props)),t=[],n=[],o=[];(this.bv.items||[]).forEach(l=>{l&&(l.$props.dragHint?n.push(l):l.$props.resizeHint?o.push(l):t.push(l))});const i=this.$props.dragHint||this.$props.resizeHint?m.calculateOrder(this,this.$props.dragHint?n:o,e,this.$props.ignoreIsAllDay):this.$props.order||0;let r=this.$props.dragHint||this.$props.resizeHint?this.calculateMostSiblings(e,this.$props.dragHint?n:o):this.calculateMostSiblings(e,t);const S=this.getSiblingsInAllSlots(e,t);let d=0;const s=u.getRect(this.element);if(S.forEach(l=>{let $=0;l.sort(function(a,p){return a.$props.order-p.$props.order}).forEach(a=>{m.intersects(a.$props.start,a.$props.end,this.$props.start,this.$props.end)&&!(this.$props.dragHint||this.$props.resizeHint)&&a.$props.maxSiblingsPerSlot&&a.$props.maxSiblingsPerSlot>r&&a.getElement()!==this.element&&(r=a.$props.maxSiblingsPerSlot);const p=u.getRect(a.getElement());a.$props.order!==null&&a.$props.order<i&&($=(p.top||s.top)+p.height-s.top-c.BORDER_WIDTH*i+I)}),$>d&&(d=$)}),e.length===0){this.display=!1;return}const f=20;s.width=this.$props.vertical?s.width/r-c.BORDER_WIDTH-f/r:s.width*e.length-c.BORDER_WIDTH-f,s.height=this.$props.vertical?s.height*e.length-c.BORDER_WIDTH:(this.$props.resizeHint||this.$props.dragHint)&&r<=1?s.height:this.$props.itemStyle&&this.$props.itemStyle.height?this.$props.itemStyle.height:25,s.left=this.$props.vertical?s.left+i*s.width+c.BORDER_WIDTH*i:s.left,s.top=this.$props.vertical?s.top:s.top+d+c.BORDER_WIDTH*i,this.maxSiblingsPerSlot=r,u.setRect(this.element,s),this.visible=!0,this.display=!0},handleResize(){this.timeout!==void 0&&window.cancelAnimationFrame(this.timeout),this.timeout=window.requestAnimationFrame(()=>{this.align(),this.position()})}}});exports.SchedulerViewItem=v;
|
|
@@ -5,18 +5,18 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { defineComponent as v, createVNode as
|
|
9
|
-
import { SchedulerItem as
|
|
8
|
+
import { defineComponent as v, createVNode as p, h as y, isVNode as I } from "vue";
|
|
9
|
+
import { SchedulerItem as D } from "./SchedulerItem.mjs";
|
|
10
10
|
import { calculateOrder as w, intersects as S, first as k } from "../utils/main.mjs";
|
|
11
|
-
import { getRect as
|
|
12
|
-
import { BORDER_WIDTH as
|
|
13
|
-
import { provideIntlService as
|
|
14
|
-
import { SchedulerItemContent as
|
|
15
|
-
import { getDefaultSlots as
|
|
16
|
-
function
|
|
17
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
11
|
+
import { getRect as g, setRect as $ } from "../views/common/utils.mjs";
|
|
12
|
+
import { BORDER_WIDTH as d } from "../constants/main.mjs";
|
|
13
|
+
import { provideIntlService as E } from "@progress/kendo-vue-intl";
|
|
14
|
+
import { SchedulerItemContent as b } from "./SchedulerItemContent.mjs";
|
|
15
|
+
import { getDefaultSlots as O, getTemplate as F, canUseDOM as z } from "@progress/kendo-vue-common";
|
|
16
|
+
function R(e) {
|
|
17
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !I(e);
|
|
18
18
|
}
|
|
19
|
-
const
|
|
19
|
+
const T = 1, N = /* @__PURE__ */ v({
|
|
20
20
|
name: "KendoSchedulerViewItem",
|
|
21
21
|
inheritAttrs: !1,
|
|
22
22
|
props: {
|
|
@@ -115,22 +115,28 @@ const x = 1, N = /* @__PURE__ */ v({
|
|
|
115
115
|
};
|
|
116
116
|
},
|
|
117
117
|
mounted() {
|
|
118
|
-
this.element = this.getElement(), !
|
|
118
|
+
if (this.element = this.getElement(), !this.ks.scheduler || !this.ks.scheduler.$el)
|
|
119
|
+
return;
|
|
120
|
+
z && (this.observer = new window.ResizeObserver(this.handleResize), this.observer.observe(this.ks.scheduler.$el));
|
|
121
|
+
const e = this;
|
|
122
|
+
this.$nextTick(function() {
|
|
123
|
+
e.align(), e.position();
|
|
124
|
+
});
|
|
119
125
|
},
|
|
120
126
|
updated() {
|
|
121
127
|
const e = this;
|
|
122
128
|
this.$nextTick(function() {
|
|
123
129
|
e.align(), e.position();
|
|
124
|
-
}), !(!this.ks.scheduler || !this.ks.scheduler.$el || this.observer) &&
|
|
130
|
+
}), !(!this.ks.scheduler || !this.ks.scheduler.$el || this.observer) && z && window.ResizeObserver && (this.observer = new window.ResizeObserver(this.handleResize), this.observer.observe(this.ks.scheduler.$el));
|
|
125
131
|
},
|
|
126
132
|
unmounted() {
|
|
127
133
|
this.observer && this.observer.disconnect();
|
|
128
134
|
},
|
|
129
135
|
render() {
|
|
130
|
-
const e =
|
|
131
|
-
this.intl =
|
|
136
|
+
const e = O(this);
|
|
137
|
+
this.intl = E(this);
|
|
132
138
|
let t;
|
|
133
|
-
const
|
|
139
|
+
const n = p(D, {
|
|
134
140
|
ignoreIsAllDay: this.ignoreIsAllDay,
|
|
135
141
|
item: this.item,
|
|
136
142
|
uid: this.uid,
|
|
@@ -195,24 +201,24 @@ const x = 1, N = /* @__PURE__ */ v({
|
|
|
195
201
|
onResizestartdrag: this.handleResizeStartDrag,
|
|
196
202
|
onResizerelease: this.handleResizeRelease
|
|
197
203
|
}, {
|
|
198
|
-
default: () => [!this.$props.resizeHint &&
|
|
204
|
+
default: () => [!this.$props.resizeHint && p("div", {
|
|
199
205
|
title: this.itemTitle
|
|
200
|
-
}, [!this.$props.isAllDay &&
|
|
206
|
+
}, [!this.$props.isAllDay && p(b, {
|
|
201
207
|
title: this.itemTitle,
|
|
202
208
|
class: "k-event-template k-event-time "
|
|
203
|
-
},
|
|
209
|
+
}, R(e) ? e : {
|
|
204
210
|
default: () => [e]
|
|
205
|
-
}),
|
|
211
|
+
}), p(b, {
|
|
206
212
|
title: this.$props.title,
|
|
207
213
|
class: "k-event-template"
|
|
208
|
-
},
|
|
214
|
+
}, R(e) ? e : {
|
|
209
215
|
default: () => [e]
|
|
210
216
|
})])]
|
|
211
217
|
});
|
|
212
218
|
return t = F.call(this, {
|
|
213
|
-
h:
|
|
219
|
+
h: y,
|
|
214
220
|
template: this.$props.item,
|
|
215
|
-
defaultRendering:
|
|
221
|
+
defaultRendering: n,
|
|
216
222
|
defaultSlots: e,
|
|
217
223
|
additionalListeners: {
|
|
218
224
|
// keydown: this.handleKeyDown,
|
|
@@ -309,14 +315,14 @@ const x = 1, N = /* @__PURE__ */ v({
|
|
|
309
315
|
this.$emit("resizerelease", e);
|
|
310
316
|
},
|
|
311
317
|
calculateMostSiblings(e, t) {
|
|
312
|
-
let
|
|
313
|
-
return e.forEach((
|
|
314
|
-
const
|
|
315
|
-
|
|
316
|
-
}),
|
|
318
|
+
let n = 1;
|
|
319
|
+
return e.forEach((o) => {
|
|
320
|
+
const i = t.filter((r) => this.inSlot(o.cSlot, r.$props));
|
|
321
|
+
i.length > n && (n = i.length);
|
|
322
|
+
}), n;
|
|
317
323
|
},
|
|
318
324
|
getSiblingsInAllSlots(e, t) {
|
|
319
|
-
return e.map((
|
|
325
|
+
return e.map((o) => t.filter((i) => this.inSlot(o.cSlot, i.$props)));
|
|
320
326
|
},
|
|
321
327
|
inSlot(e, t) {
|
|
322
328
|
return S(e.start, e.end, t.start, t.end) && e.group.index === t.group.index && e.range.index === t.range.index && (this.$props.ignoreIsAllDay || e.isAllDay === t.isAllDay);
|
|
@@ -324,46 +330,55 @@ const x = 1, N = /* @__PURE__ */ v({
|
|
|
324
330
|
align() {
|
|
325
331
|
if (!this.element)
|
|
326
332
|
return;
|
|
327
|
-
const e = (this.bv.slots || []).filter((
|
|
333
|
+
const e = (this.bv.slots || []).filter((i) => i && this.inSlot(i.cSlot, this.$props));
|
|
328
334
|
if (e.length === 0) {
|
|
329
335
|
this.display = !1;
|
|
330
336
|
return;
|
|
331
337
|
}
|
|
332
|
-
const t = k(e.sort(function(
|
|
333
|
-
return
|
|
338
|
+
const t = k(e.sort(function(i, r) {
|
|
339
|
+
return i.cSlot.start && r.cSlot.start ? i.cSlot.start.getTime() - r.cSlot.start.getTime() : !0;
|
|
334
340
|
}));
|
|
335
341
|
if (!t)
|
|
336
342
|
return;
|
|
337
|
-
const
|
|
338
|
-
|
|
343
|
+
const n = g(t.$el), o = t.$el;
|
|
344
|
+
if (o && !this.$props.vertical) {
|
|
345
|
+
const i = o.querySelector(".k-nav-day");
|
|
346
|
+
if (i)
|
|
347
|
+
n.top += i.offsetTop + parseFloat(window.getComputedStyle(i).lineHeight || "0");
|
|
348
|
+
else if (o.firstElementChild) {
|
|
349
|
+
const r = window.getComputedStyle(o), m = parseFloat(r.paddingTop || "0"), a = parseFloat(r.lineHeight || "0");
|
|
350
|
+
a > 0 && (n.top += m + a);
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
$(this.element, n);
|
|
339
354
|
},
|
|
340
355
|
position() {
|
|
341
356
|
if (!this.element)
|
|
342
357
|
return;
|
|
343
|
-
const e = (this.bv.slots || []).filter((
|
|
344
|
-
(this.bv.items || []).forEach((
|
|
345
|
-
|
|
358
|
+
const e = (this.bv.slots || []).filter((l) => l && this.inSlot(l.cSlot, this.$props)), t = [], n = [], o = [];
|
|
359
|
+
(this.bv.items || []).forEach((l) => {
|
|
360
|
+
l && (l.$props.dragHint ? n.push(l) : l.$props.resizeHint ? o.push(l) : t.push(l));
|
|
346
361
|
});
|
|
347
|
-
const
|
|
348
|
-
let
|
|
349
|
-
const
|
|
350
|
-
let
|
|
351
|
-
const
|
|
352
|
-
if (
|
|
353
|
-
let
|
|
354
|
-
|
|
355
|
-
return
|
|
356
|
-
}).forEach((
|
|
357
|
-
S(
|
|
358
|
-
const
|
|
359
|
-
|
|
360
|
-
}),
|
|
362
|
+
const i = this.$props.dragHint || this.$props.resizeHint ? w(this, this.$props.dragHint ? n : o, e, this.$props.ignoreIsAllDay) : this.$props.order || 0;
|
|
363
|
+
let r = this.$props.dragHint || this.$props.resizeHint ? this.calculateMostSiblings(e, this.$props.dragHint ? n : o) : this.calculateMostSiblings(e, t);
|
|
364
|
+
const m = this.getSiblingsInAllSlots(e, t);
|
|
365
|
+
let a = 0;
|
|
366
|
+
const s = g(this.element);
|
|
367
|
+
if (m.forEach((l) => {
|
|
368
|
+
let u = 0;
|
|
369
|
+
l.sort(function(h, c) {
|
|
370
|
+
return h.$props.order - c.$props.order;
|
|
371
|
+
}).forEach((h) => {
|
|
372
|
+
S(h.$props.start, h.$props.end, this.$props.start, this.$props.end) && !(this.$props.dragHint || this.$props.resizeHint) && h.$props.maxSiblingsPerSlot && h.$props.maxSiblingsPerSlot > r && h.getElement() !== this.element && (r = h.$props.maxSiblingsPerSlot);
|
|
373
|
+
const c = g(h.getElement());
|
|
374
|
+
h.$props.order !== null && h.$props.order < i && (u = (c.top || s.top) + c.height - s.top - d * i + T);
|
|
375
|
+
}), u > a && (a = u);
|
|
361
376
|
}), e.length === 0) {
|
|
362
377
|
this.display = !1;
|
|
363
378
|
return;
|
|
364
379
|
}
|
|
365
|
-
const
|
|
366
|
-
|
|
380
|
+
const f = 20;
|
|
381
|
+
s.width = this.$props.vertical ? s.width / r - d - f / r : s.width * e.length - d - f, s.height = this.$props.vertical ? s.height * e.length - d : (this.$props.resizeHint || this.$props.dragHint) && r <= 1 ? s.height : this.$props.itemStyle && this.$props.itemStyle.height ? this.$props.itemStyle.height : 25, s.left = this.$props.vertical ? s.left + i * s.width + d * i : s.left, s.top = this.$props.vertical ? s.top : s.top + a + d * i, this.maxSiblingsPerSlot = r, $(this.element, s), this.visible = !0, this.display = !0;
|
|
367
382
|
},
|
|
368
383
|
handleResize() {
|
|
369
384
|
this.timeout !== void 0 && window.cancelAnimationFrame(this.timeout), this.timeout = window.requestAnimationFrame(() => {
|
package/package-metadata.js
CHANGED
|
@@ -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:
|
|
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: 1779218540,version:"9.0.0-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;
|
package/package-metadata.mjs
CHANGED
|
@@ -10,8 +10,8 @@ const e = {
|
|
|
10
10
|
productName: "Kendo UI for Vue",
|
|
11
11
|
productCode: "KENDOUIVUE",
|
|
12
12
|
productCodes: ["KENDOUIVUE"],
|
|
13
|
-
publishDate:
|
|
14
|
-
version: "9.0.0-develop.
|
|
13
|
+
publishDate: 1779218540,
|
|
14
|
+
version: "9.0.0-develop.2",
|
|
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": "9.0.0-develop.
|
|
3
|
+
"version": "9.0.0-develop.2",
|
|
4
4
|
"description": "TODO",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -27,15 +27,15 @@
|
|
|
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": "9.0.0-develop.
|
|
31
|
-
"@progress/kendo-vue-buttons": "9.0.0-develop.
|
|
32
|
-
"@progress/kendo-vue-dateinputs": "9.0.0-develop.
|
|
33
|
-
"@progress/kendo-vue-dialogs": "9.0.0-develop.
|
|
34
|
-
"@progress/kendo-vue-dropdowns": "9.0.0-develop.
|
|
35
|
-
"@progress/kendo-vue-form": "9.0.0-develop.
|
|
36
|
-
"@progress/kendo-vue-inputs": "9.0.0-develop.
|
|
37
|
-
"@progress/kendo-vue-intl": "9.0.0-develop.
|
|
38
|
-
"@progress/kendo-vue-popup": "9.0.0-develop.
|
|
30
|
+
"@progress/kendo-vue-common": "9.0.0-develop.2",
|
|
31
|
+
"@progress/kendo-vue-buttons": "9.0.0-develop.2",
|
|
32
|
+
"@progress/kendo-vue-dateinputs": "9.0.0-develop.2",
|
|
33
|
+
"@progress/kendo-vue-dialogs": "9.0.0-develop.2",
|
|
34
|
+
"@progress/kendo-vue-dropdowns": "9.0.0-develop.2",
|
|
35
|
+
"@progress/kendo-vue-form": "9.0.0-develop.2",
|
|
36
|
+
"@progress/kendo-vue-inputs": "9.0.0-develop.2",
|
|
37
|
+
"@progress/kendo-vue-intl": "9.0.0-develop.2",
|
|
38
|
+
"@progress/kendo-vue-popup": "9.0.0-develop.2",
|
|
39
39
|
"@progress/kendo-svg-icons": "^4.9.0 || ^5.0.0",
|
|
40
40
|
"vue": "^3.0.2"
|
|
41
41
|
},
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"package": {
|
|
61
61
|
"productName": "Kendo UI for Vue",
|
|
62
62
|
"productCode": "KENDOUIVUE",
|
|
63
|
-
"publishDate":
|
|
63
|
+
"publishDate": 1779218540,
|
|
64
64
|
"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"
|
|
65
65
|
}
|
|
66
66
|
},
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),i=require("@progress/kendo-vue-common"),
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),i=require("@progress/kendo-vue-common"),T=require("../constants/main.js"),s=require("../utils/main.js"),v=require("./SchedulerViewSlot.js"),w=require("../hooks/use-slots-selection.js"),$=require("../hooks/use-items-selection.js"),A=require("../hooks/use-items-focus.js"),r=require("../hooks/use-slots-focus.js"),N=require("../hooks/useEditable.js"),F=require("../hooks/useSlotExpand.js");function j(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!n.isVNode(e)}const _=n.defineComponent({name:"KendoSchedulerEditSlot",inheritAttrs:!1,props:{tabIndex:{type:Number,default:void 0},className:String,form:Object,formItem:Object,refTo:[Function,Object],items:Array,row:Number,group:Object,range:Object,isWorkDay:{type:Boolean,default:!0},isWorkHour:{type:Boolean,default:!0},selected:Boolean,col:Number,index:Number,start:Date,end:Date,zonedStart:Object,zonedEnd:Object,isAllDay:Boolean,expandable:[Boolean,Object],slotRender:[String,Function,Object],viewSlot:[String,Function,Object],navDay:Boolean,editable:[Object,Boolean],itemsPerSlot:Number,onDataaction:Function},created(){this.slot=null,this.editableSlot=null},mounted(){if(this.$props.slotRender&&this.$props.expandable){const e=this;this.$nextTick(function(){F.useSlotExpand(e,e.ks.scheduler.$el,e.$props.expandable)})}},updated(){if(this.$props.slotRender&&this.$props.expandable){const e=this;this.$nextTick(function(){F.useSlotExpand(e,e.ks.scheduler.$el,e.$props.expandable)})}},provide(){return{ksEditFormSubmit:this.handleEditFormSubmit,ksEditFormCancel:this.handleEditFormCancel,ksEditFormClose:this.handleEditFormClose}},inject:{bv:{default:null},ks:{default:null},dispatchSelectedItems:{default:null},dispatchFocusedItems:{default:null},dispatchFocusedSlots:{default:null},dispatchSelectedSlots:{default:null},ksSlots:{default:{}}},data(){return{currentFormItem:null}},computed:{cSlot(){return this.ksSlots.cSlots?this.ksSlots.cSlots[this.index]:{}},currentTabIndex(){const e=this.bv.slots.length&&s.compareSlots(this.bv.slots[0].cSlot,this.cSlot);return this.$props.tabIndex!==void 0?this.$props.tabIndex===null?void 0:this.$props.tabIndex:this.bv.selectedSlots.length===0&&e&&this.cSlot.items.length===0?0:void 0},computedEditable(){return N.useEditable(this.$props.editable)},compFormItem(){return this.formItem!==void 0?this.formItem:this.currentFormItem}},render(){const e=i.getDefaultSlots(this),{viewSlot:t,form:o,formItem:l,items:a,row:I,group:y,range:g,isWorkDay:d,isWorkHour:c,col:k,index:u,start:D,end:C,zonedStart:h,zonedEnd:m,navDay:S,itemsPerSlot:p,className:O}=this.$props,b=this.bv.selectedSlots.some(x=>s.compareSlots(x.cSlot,this.cSlot));let f;const E=n.createVNode(v.SchedulerViewSlot,{className:O,slotRender:this.$props.slotRender,isAllDay:this.isAllDay,expandable:this.expandable,editable:this.editable,items:a,row:I,group:y,range:g,isWorkDay:d,isWorkHour:c,col:k,index:u,start:D,end:C,zonedStart:h,zonedEnd:m,selected:b,navDay:S,itemsPerSlot:p,tabIndex:this.currentTabIndex,formItem:this.compFormItem,onFocus:this.handleFocus,onDoubleclick:this.handleDoubleClick,onKeydown:this.handleKeyDown,onShowmoreitems:this.handleShowMoreItemsClick},j(e)?e:{default:()=>[e]});return f=i.getTemplate.call(this,{h:n.h,template:this.$props.slotRender,defaultRendering:E,defaultSlots:e,additionalProps:{...this.cSlot,isAllDay:this.cSlot.isAllDay,expandable:this.expandable,editable:this.editable,items:a,row:this.cSlot.row,group:this.cSlot.group,range:this.cSlot.range,isWorkDay:d,isWorkHour:c,col:this.cSlot.col,index:u,start:this.cSlot.start,end:this.cSlot.end,zonedStart:h,zonedEnd:m,selected:b,navDay:S,itemsPerSlot:p,tabIndex:this.currentTabIndex},additionalListeners:{focus:this.handleFocus,doubleclick:this.handleDoubleClick,keydown:this.handleKeyDown,showmoreitems:this.handleShowMoreItemsClick}}),f},methods:{handleShowMoreItemsClick(e){this.$emit("showmoreitems",e)},createDataItemFromSlot(){const e={};if(s.setField(e,this.ks.fields.start,new Date(this.cSlot.start.getTime())),s.setField(e,this.ks.fields.end,new Date(this.cSlot.end.getTime())),s.setField(e,this.ks.fields.isAllDay,this.cSlot.isAllDay),this.cSlot.group.resources.length)for(let t=0;t<this.cSlot.group.resources.length;t++){const o=this.cSlot.group.resources[t];if(s.isGroupped(this.cSlot.group.resources)){const l=s.getField(this.cSlot.group.resources[t],o.valueField);s.setField(e,o.field,o.multiple?[l]:l)}else s.setField(e,o.field,o.multiple?[]:void 0)}return e},handleFocus(e){this.computedEditable.select&&this.dispatchSelectedSlots({type:w.SLOTS_SELECT_ACTION.select,slot:this},e.event),this.$emit("focus",e)},handleDoubleClick(e){if(this.computedEditable.add){const t=this.createDataItemFromSlot();this.setFormItem(t,e)}this.$emit("doubleclick",e)},handleKeyDown(e){let t,o,l;switch(e.event.keyCode){case i.Keys.left:if(!this.bv.slots)return;e.event.preventDefault(),this.dispatchFocusedSlots({type:r.SLOTS_FOCUS_ACTION.left,slot:this},e.event);break;case i.Keys.right:if(!this.bv.slots)return;e.event.preventDefault(),this.dispatchFocusedSlots({type:r.SLOTS_FOCUS_ACTION.right,slot:this},e.event);break;case i.Keys.up:if(!this.bv.slots)return;e.event.preventDefault(),this.dispatchFocusedSlots({type:r.SLOTS_FOCUS_ACTION.up,slot:this},e.event);break;case i.Keys.down:if(!this.bv.slots)return;e.event.preventDefault(),this.dispatchFocusedSlots({type:r.SLOTS_FOCUS_ACTION.down,slot:this},e.event);break;case i.Keys.enter:if(!this.bv.slots||!this.computedEditable.add)return;l=this.createDataItemFromSlot(),this.setFormItem(l);break;case i.Keys.tab:o=s.findFirstItem(e.target),t=o?s.findCurrentItem(o,this.bv.items,!1):s.getSortedSlots(this.bv.items,this.ignoreIsAllDay)[0],this.dispatchFocusedItems({type:A.ITEMS_FOCUS_ACTION.current,item:t},e.event),this.dispatchSelectedItems({type:$.ITEMS_SELECT_ACTION.select,item:t},e);break}t&&e.event.preventDefault()},handleEditFormSubmit(e){this.$emit("dataaction",{type:T.DATA_ACTION.create,series:!1,dataItem:e.value},e),this.setFormItem(null,e.event)},handleEditFormCancel(e){this.setFormItem(null,e.event)},handleEditFormClose(e){this.setFormItem(null,e)},handleFormItemChange(e,t){this.setFormItem&&this.setFormItem(e,t)},setFormItem(e,t){this.currentFormItem=e,this.$emit("formitemchange",t)}}});exports.SchedulerEditSlot=_;
|
|
@@ -5,20 +5,21 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { defineComponent as C, createVNode as
|
|
8
|
+
import { defineComponent as C, createVNode as O, h as $, isVNode as T } from "vue";
|
|
9
9
|
import { Keys as i, getDefaultSlots as A, getTemplate as j } from "@progress/kendo-vue-common";
|
|
10
10
|
import { DATA_ACTION as N } from "../constants/main.mjs";
|
|
11
|
-
import { findFirstItem as
|
|
12
|
-
import { SchedulerViewSlot as
|
|
13
|
-
import { SLOTS_SELECT_ACTION as
|
|
14
|
-
import { ITEMS_SELECT_ACTION as
|
|
15
|
-
import { ITEMS_FOCUS_ACTION as
|
|
11
|
+
import { findFirstItem as R, findCurrentItem as _, getSortedSlots as z, setField as l, isGroupped as W, getField as B, compareSlots as b } from "../utils/main.mjs";
|
|
12
|
+
import { SchedulerViewSlot as K } from "./SchedulerViewSlot.mjs";
|
|
13
|
+
import { SLOTS_SELECT_ACTION as L } from "../hooks/use-slots-selection.mjs";
|
|
14
|
+
import { ITEMS_SELECT_ACTION as M } from "../hooks/use-items-selection.mjs";
|
|
15
|
+
import { ITEMS_FOCUS_ACTION as P } from "../hooks/use-items-focus.mjs";
|
|
16
16
|
import { SLOTS_FOCUS_ACTION as r } from "../hooks/use-slots-focus.mjs";
|
|
17
|
-
import { useEditable as
|
|
18
|
-
|
|
17
|
+
import { useEditable as H } from "../hooks/useEditable.mjs";
|
|
18
|
+
import { useSlotExpand as I } from "../hooks/useSlotExpand.mjs";
|
|
19
|
+
function V(t) {
|
|
19
20
|
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !T(t);
|
|
20
21
|
}
|
|
21
|
-
const
|
|
22
|
+
const ot = /* @__PURE__ */ C({
|
|
22
23
|
name: "KendoSchedulerEditSlot",
|
|
23
24
|
inheritAttrs: !1,
|
|
24
25
|
props: {
|
|
@@ -61,6 +62,22 @@ const et = /* @__PURE__ */ C({
|
|
|
61
62
|
created() {
|
|
62
63
|
this.slot = null, this.editableSlot = null;
|
|
63
64
|
},
|
|
65
|
+
mounted() {
|
|
66
|
+
if (this.$props.slotRender && this.$props.expandable) {
|
|
67
|
+
const t = this;
|
|
68
|
+
this.$nextTick(function() {
|
|
69
|
+
I(t, t.ks.scheduler.$el, t.$props.expandable);
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
updated() {
|
|
74
|
+
if (this.$props.slotRender && this.$props.expandable) {
|
|
75
|
+
const t = this;
|
|
76
|
+
this.$nextTick(function() {
|
|
77
|
+
I(t, t.ks.scheduler.$el, t.$props.expandable);
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
},
|
|
64
81
|
provide() {
|
|
65
82
|
return {
|
|
66
83
|
ksEditFormSubmit: this.handleEditFormSubmit,
|
|
@@ -105,7 +122,7 @@ const et = /* @__PURE__ */ C({
|
|
|
105
122
|
return this.$props.tabIndex !== void 0 ? this.$props.tabIndex === null ? void 0 : this.$props.tabIndex : this.bv.selectedSlots.length === 0 && t && this.cSlot.items.length === 0 ? 0 : void 0;
|
|
106
123
|
},
|
|
107
124
|
computedEditable() {
|
|
108
|
-
return
|
|
125
|
+
return H(this.$props.editable);
|
|
109
126
|
},
|
|
110
127
|
compFormItem() {
|
|
111
128
|
return this.formItem !== void 0 ? this.formItem : this.currentFormItem;
|
|
@@ -117,15 +134,15 @@ const et = /* @__PURE__ */ C({
|
|
|
117
134
|
form: s,
|
|
118
135
|
formItem: o,
|
|
119
136
|
items: n,
|
|
120
|
-
row:
|
|
121
|
-
group:
|
|
137
|
+
row: F,
|
|
138
|
+
group: k,
|
|
122
139
|
range: D,
|
|
123
140
|
isWorkDay: a,
|
|
124
141
|
isWorkHour: d,
|
|
125
142
|
col: g,
|
|
126
143
|
index: c,
|
|
127
144
|
start: y,
|
|
128
|
-
end:
|
|
145
|
+
end: x,
|
|
129
146
|
zonedStart: h,
|
|
130
147
|
zonedEnd: m,
|
|
131
148
|
navDay: u,
|
|
@@ -133,22 +150,22 @@ const et = /* @__PURE__ */ C({
|
|
|
133
150
|
className: E
|
|
134
151
|
} = this.$props, S = this.bv.selectedSlots.some((w) => b(w.cSlot, this.cSlot));
|
|
135
152
|
let f;
|
|
136
|
-
const v =
|
|
153
|
+
const v = O(K, {
|
|
137
154
|
className: E,
|
|
138
155
|
slotRender: this.$props.slotRender,
|
|
139
156
|
isAllDay: this.isAllDay,
|
|
140
157
|
expandable: this.expandable,
|
|
141
158
|
editable: this.editable,
|
|
142
159
|
items: n,
|
|
143
|
-
row:
|
|
144
|
-
group:
|
|
160
|
+
row: F,
|
|
161
|
+
group: k,
|
|
145
162
|
range: D,
|
|
146
163
|
isWorkDay: a,
|
|
147
164
|
isWorkHour: d,
|
|
148
165
|
col: g,
|
|
149
166
|
index: c,
|
|
150
167
|
start: y,
|
|
151
|
-
end:
|
|
168
|
+
end: x,
|
|
152
169
|
zonedStart: h,
|
|
153
170
|
zonedEnd: m,
|
|
154
171
|
selected: S,
|
|
@@ -160,11 +177,11 @@ const et = /* @__PURE__ */ C({
|
|
|
160
177
|
onDoubleclick: this.handleDoubleClick,
|
|
161
178
|
onKeydown: this.handleKeyDown,
|
|
162
179
|
onShowmoreitems: this.handleShowMoreItemsClick
|
|
163
|
-
},
|
|
180
|
+
}, V(t) ? t : {
|
|
164
181
|
default: () => [t]
|
|
165
182
|
});
|
|
166
183
|
return f = j.call(this, {
|
|
167
|
-
h:
|
|
184
|
+
h: $,
|
|
168
185
|
template: this.$props.slotRender,
|
|
169
186
|
defaultRendering: v,
|
|
170
187
|
defaultSlots: t,
|
|
@@ -207,8 +224,8 @@ const et = /* @__PURE__ */ C({
|
|
|
207
224
|
if (l(t, this.ks.fields.start, new Date(this.cSlot.start.getTime())), l(t, this.ks.fields.end, new Date(this.cSlot.end.getTime())), l(t, this.ks.fields.isAllDay, this.cSlot.isAllDay), this.cSlot.group.resources.length)
|
|
208
225
|
for (let e = 0; e < this.cSlot.group.resources.length; e++) {
|
|
209
226
|
const s = this.cSlot.group.resources[e];
|
|
210
|
-
if (
|
|
211
|
-
const o =
|
|
227
|
+
if (W(this.cSlot.group.resources)) {
|
|
228
|
+
const o = B(this.cSlot.group.resources[e], s.valueField);
|
|
212
229
|
l(t, s.field, s.multiple ? [o] : o);
|
|
213
230
|
} else
|
|
214
231
|
l(t, s.field, s.multiple ? [] : void 0);
|
|
@@ -217,7 +234,7 @@ const et = /* @__PURE__ */ C({
|
|
|
217
234
|
},
|
|
218
235
|
handleFocus(t) {
|
|
219
236
|
this.computedEditable.select && this.dispatchSelectedSlots({
|
|
220
|
-
type:
|
|
237
|
+
type: L.select,
|
|
221
238
|
slot: this
|
|
222
239
|
}, t.event), this.$emit("focus", t);
|
|
223
240
|
},
|
|
@@ -269,11 +286,11 @@ const et = /* @__PURE__ */ C({
|
|
|
269
286
|
o = this.createDataItemFromSlot(), this.setFormItem(o);
|
|
270
287
|
break;
|
|
271
288
|
case i.tab:
|
|
272
|
-
s =
|
|
273
|
-
type:
|
|
289
|
+
s = R(t.target), e = s ? _(s, this.bv.items, !1) : z(this.bv.items, this.ignoreIsAllDay)[0], this.dispatchFocusedItems({
|
|
290
|
+
type: P.current,
|
|
274
291
|
item: e
|
|
275
292
|
}, t.event), this.dispatchSelectedItems({
|
|
276
|
-
type:
|
|
293
|
+
type: M.select,
|
|
277
294
|
item: e
|
|
278
295
|
}, t);
|
|
279
296
|
break;
|
|
@@ -302,5 +319,5 @@ const et = /* @__PURE__ */ C({
|
|
|
302
319
|
}
|
|
303
320
|
});
|
|
304
321
|
export {
|
|
305
|
-
|
|
322
|
+
ot as SchedulerEditSlot
|
|
306
323
|
};
|
|
@@ -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"),g=require("../../slots/SchedulerEditSlot.js"),
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),g=require("../../slots/SchedulerEditSlot.js"),c=require("@progress/kendo-vue-intl"),S=require("../../tasks/SchedulerEditTask.js"),s=require("../../messages/main.js"),u=require("@progress/kendo-vue-common"),d=require("@progress/kendo-svg-icons"),p=t.defineComponent({name:"KendoAgendaViewBody",emits:["dataaction"],props:{items:Array,rangeIndex:Number,itemsPerSlot:Number,agendaSlots:Array,task:[String,Function,Object],editable:[Object,Boolean],onDataaction:Function},inject:{ri:{default:null},ks:{default:null},ksMobile:{default:()=>()=>!1},kendoIntlService:{default:null},kendoLocalizationService:{default:null},setSlots:{default:null}},provide(){return{ksSlots:this.ksSlots}},data(){return{hasMounted:!1,ksSlots:{cSlots:this.agendaSlots.filter(a=>a.group.index===(this.ri.groupIndex||0))}}},watch:{currentCellSlots(a){this.ksSlots.cSlots=a}},computed:{currentCellSlots(){return this.agendaSlots.filter(a=>a.group.index===(this.ri.groupIndex||0))}},mounted(){this.hasMounted=!0},render(){this.intl=c.provideIntlService(this);const a=this.$props.editSlot||g.SchedulerEditSlot,n=this.$props.editTask||S.SchedulerEditTask,o=c.provideLocalizationService(this),h=typeof this.ksMobile=="function"?this.ksMobile():!1;return t.createVNode("div",{class:"k-scheduler-body"},[this.currentCellSlots.map(function(r,l,k){return t.createVNode("div",{class:"k-scheduler-row k-scheduler-content",key:`${this.ri.groupIndex}:${l}`},[t.createVNode(a,{index:l,editable:this.$props.editable,row:k.length*(this.ri.groupIndex||0)+l,col:0,viewSlot:this.$props.viewSlot,onDataaction:this.handleDataAction,className:"k-scheduler-datecolumn k-group-cell"},{default:()=>[h?t.createVNode("div",{class:"k-scheduler-datecolumn-wrap"},[t.createVNode("span",{class:"k-mobile-scheduler-agendadate"},[t.createVNode("span",{class:"k-mobile-scheduler-agendaday"},[this.intl.formatDate(r.zonedStart,"dd")]),t.createTextVNode(" "),t.createVNode("span",{class:"k-mobile-scheduler-agendamonth"},[this.intl.formatDate(r.zonedStart,"MMMM")])]),t.createVNode("span",{class:"k-mobile-scheduler-agendaweekday"},[this.intl.formatDate(r.zonedStart,"EEEE")])]):t.createVNode("div",null,[t.createVNode("strong",{class:"k-scheduler-agendaday"},[this.intl.formatDate(r.zonedStart,"dd")]),t.createVNode("em",{class:"k-scheduler-agendaweek"},[this.intl.formatDate(r.zonedStart,"EEEE")]),t.createVNode("span",{class:"k-scheduler-agendadate"},[this.intl.formatDate(r.zonedStart,"y")])])]}),t.createVNode("div",{class:"k-scheduler-cell k-group-content"},[this.hasMounted&&r.items.length?r.items.map(function(e,i){return t.createVNode("div",{class:"k-scheduler-row",key:i},[t.createVNode("div",{class:"k-scheduler-cell k-scheduler-timecolumn"},[t.createVNode("div",null,[e.tail&&t.createVNode(u.Icon,{name:this.ks.isRtl?"chevron-right":"chevron-left",icon:this.ks.isRtl?d.chevronRightIcon:d.chevronLeftIcon},null),e.isAllDay?o.toLanguageString(s.allDay,s.messages[s.allDay]):f(this.intl,e),e.head&&t.createVNode(u.Icon,{name:this.ks.isRtl?"chevron-left":"chevron-right",icon:this.ks.isRtl?d.chevronLeftIcon:d.chevronRightIcon},null)])]),t.createVNode("div",{class:"k-scheduler-cell"},[t.createVNode(n,{key:`${l}:${i}`,uid:e.uid,start:e.start,end:e.end,originalStart:e.originalStart,startTimezone:e.startTimezone,endTimezone:e.endTimezone,isAllDay:e.isAllDay,title:e.title,description:e.description,occurrenceId:e.occurrenceId,recurrenceExceptions:e.recurrenceExceptions,recurrenceRule:e.recurrenceRule,recurrenceId:e.recurrenceId,dataItem:e.dataItem,itemRef:e.itemRef,head:e.head,tail:e.tail,order:e.order,zonedStart:e.zonedStart,zonedEnd:e.zonedEnd,slots:e.slots,group:e.group,range:e.range,isException:e.isException,isRecurring:e.isRecurring,onDataaction:this.handleDataAction,task:this.$props.task,viewTask:this.$props.viewTask,editable:this.$props.editable},null)])])},this):t.createVNode("div",{class:"k-scheduler-cell k-heading-cell k-group-cell"},[o.toLanguageString(s.noEvents,s.messages[s.noEvents])])])])},this)])},methods:{handleDataAction(a){this.$emit("dataaction",a)}}}),f=(a,n)=>{let o="{0:t}-{1:t}";return n.head?o="{0:t}":n.tail&&(o="{1:t}"),a.format(o,n.zonedStart,n.zonedEnd)};exports.AgendaViewBody=p;
|