@progress/kendo-vue-scheduler 10.0.1-develop.7 → 10.1.0-develop.1

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"});require("vue");const u=t=>{if(!t)return null;const e=t.querySelectorAll(":scope > .k-scheduler-group > .k-scheduler-row > .k-group-cell");return e.length<2?null:Array.from(e).map(o=>Array.from(o.querySelectorAll(":scope > .k-scheduler-row")))},f=(t,e)=>{for(const o of t){const r=o[e];if(!r)continue;r.querySelectorAll(":scope > .k-slot-cell").forEach(s=>{s.style.removeProperty("height")})}},g=(t,e)=>{let o=0;for(const r of t){const l=r[e];l&&(o=Math.max(o,l.offsetHeight))}return o},i=(t,e,o)=>{let r=!1;for(const l of t){const s=l[e];if(!s)continue;s.querySelectorAll(":scope > .k-slot-cell").forEach(n=>{n.offsetHeight!==o&&(r=!0),n.style.height=`${o}px`})}return r},h=t=>{var l,s;const e=u(t);if(!e)return!1;let o=!1;const r=(s=(l=e[0])==null?void 0:l.length)!=null?s:0;for(let c=0;c<r;c++){f(e,c);const n=g(e,c);i(e,c,n)&&(o=!0)}return o};exports.syncGroupRowHeights=h;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("vue");const n=t=>{if(!t)return null;const e=t.querySelectorAll(":scope > .k-scheduler-group > .k-scheduler-row > .k-group-cell");return e.length<2?null:Array.from(e).map(o=>Array.from(o.querySelectorAll(":scope > .k-scheduler-row")))},u=t=>{if(!t)return!1;let e=!1;return t.querySelectorAll(".k-slot-cell").forEach(l=>{l.style.height&&(l.style.removeProperty("height"),e=!0)}),e},f=(t,e)=>{for(const o of t){const l=o[e];if(!l)continue;l.querySelectorAll(":scope > .k-slot-cell").forEach(s=>{s.style.removeProperty("height")})}},h=(t,e)=>{let o=0;for(const l of t){const r=l[e];r&&(o=Math.max(o,r.offsetHeight))}return o},g=(t,e,o)=>{let l=!1;for(const r of t){const s=r[e];if(!s)continue;s.querySelectorAll(":scope > .k-slot-cell").forEach(c=>{c.offsetHeight!==o&&(l=!0),c.style.height=`${o}px`})}return l},i=t=>{const e=n(t);if(!e)return u(t);let o=!1;const l=e.reduce((r,s)=>Math.max(r,s.length),0);for(let r=0;r<l;r++){f(e,r);const s=h(e,r);g(e,r,s)&&(o=!0)}return o};exports.syncGroupRowHeights=i;
@@ -6,49 +6,55 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  import "vue";
9
- const u = (t) => {
9
+ const n = (t) => {
10
10
  if (!t)
11
11
  return null;
12
12
  const e = t.querySelectorAll(":scope > .k-scheduler-group > .k-scheduler-row > .k-group-cell");
13
13
  return e.length < 2 ? null : Array.from(e).map((o) => Array.from(o.querySelectorAll(":scope > .k-scheduler-row")));
14
+ }, u = (t) => {
15
+ if (!t)
16
+ return !1;
17
+ let e = !1;
18
+ return t.querySelectorAll(".k-slot-cell").forEach((l) => {
19
+ l.style.height && (l.style.removeProperty("height"), e = !0);
20
+ }), e;
14
21
  }, f = (t, e) => {
15
22
  for (const o of t) {
16
- const r = o[e];
17
- if (!r)
23
+ const l = o[e];
24
+ if (!l)
18
25
  continue;
19
- r.querySelectorAll(":scope > .k-slot-cell").forEach((s) => {
26
+ l.querySelectorAll(":scope > .k-slot-cell").forEach((s) => {
20
27
  s.style.removeProperty("height");
21
28
  });
22
29
  }
23
- }, g = (t, e) => {
30
+ }, h = (t, e) => {
24
31
  let o = 0;
25
- for (const r of t) {
26
- const l = r[e];
27
- l && (o = Math.max(o, l.offsetHeight));
32
+ for (const l of t) {
33
+ const r = l[e];
34
+ r && (o = Math.max(o, r.offsetHeight));
28
35
  }
29
36
  return o;
30
- }, h = (t, e, o) => {
31
- let r = !1;
32
- for (const l of t) {
33
- const s = l[e];
37
+ }, g = (t, e, o) => {
38
+ let l = !1;
39
+ for (const r of t) {
40
+ const s = r[e];
34
41
  if (!s)
35
42
  continue;
36
- s.querySelectorAll(":scope > .k-slot-cell").forEach((n) => {
37
- n.offsetHeight !== o && (r = !0), n.style.height = `${o}px`;
43
+ s.querySelectorAll(":scope > .k-slot-cell").forEach((c) => {
44
+ c.offsetHeight !== o && (l = !0), c.style.height = `${o}px`;
38
45
  });
39
46
  }
40
- return r;
47
+ return l;
41
48
  }, p = (t) => {
42
- var l, s;
43
- const e = u(t);
49
+ const e = n(t);
44
50
  if (!e)
45
- return !1;
51
+ return u(t);
46
52
  let o = !1;
47
- const r = (s = (l = e[0]) == null ? void 0 : l.length) != null ? s : 0;
48
- for (let c = 0; c < r; c++) {
49
- f(e, c);
50
- const n = g(e, c);
51
- h(e, c, n) && (o = !0);
53
+ const l = e.reduce((r, s) => Math.max(r, s.length), 0);
54
+ for (let r = 0; r < l; r++) {
55
+ f(e, r);
56
+ const s = h(e, r);
57
+ g(e, r, s) && (o = !0);
52
58
  }
53
59
  return o;
54
60
  };
@@ -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: 1790258062,version:"10.0.1-develop.7",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: 1791190248,version:"10.1.0-develop.1",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: 1790258062,
14
- version: "10.0.1-develop.7",
13
+ publishDate: 1791190248,
14
+ version: "10.1.0-develop.1",
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.7",
3
+ "version": "10.1.0-develop.1",
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.7",
31
- "@progress/kendo-vue-buttons": "10.0.1-develop.7",
32
- "@progress/kendo-vue-dateinputs": "10.0.1-develop.7",
33
- "@progress/kendo-vue-dialogs": "10.0.1-develop.7",
34
- "@progress/kendo-vue-dropdowns": "10.0.1-develop.7",
35
- "@progress/kendo-vue-form": "10.0.1-develop.7",
36
- "@progress/kendo-vue-inputs": "10.0.1-develop.7",
37
- "@progress/kendo-vue-intl": "10.0.1-develop.7",
38
- "@progress/kendo-vue-popup": "10.0.1-develop.7",
39
- "@progress/kendo-vue-tooltip": "10.0.1-develop.7",
30
+ "@progress/kendo-vue-common": "10.1.0-develop.1",
31
+ "@progress/kendo-vue-buttons": "10.1.0-develop.1",
32
+ "@progress/kendo-vue-dateinputs": "10.1.0-develop.1",
33
+ "@progress/kendo-vue-dialogs": "10.1.0-develop.1",
34
+ "@progress/kendo-vue-dropdowns": "10.1.0-develop.1",
35
+ "@progress/kendo-vue-form": "10.1.0-develop.1",
36
+ "@progress/kendo-vue-inputs": "10.1.0-develop.1",
37
+ "@progress/kendo-vue-intl": "10.1.0-develop.1",
38
+ "@progress/kendo-vue-popup": "10.1.0-develop.1",
39
+ "@progress/kendo-vue-tooltip": "10.1.0-develop.1",
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": 1790258062,
64
+ "publishDate": 1791190248,
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
  },
@@ -71,10 +71,5 @@
71
71
  "repository": {
72
72
  "type": "git",
73
73
  "url": "git+https://github.com/telerik/kendo-vue.git"
74
- },
75
- "peerDependenciesMeta": {
76
- "@progress/kendo-svg-icons": {
77
- "optional": true
78
- }
79
74
  }
80
75
  }
@@ -125,6 +125,7 @@ declare const MonthView: import('vue').DefineComponent<import('vue').ExtractProp
125
125
  }>, {}, {
126
126
  hasMounted: boolean;
127
127
  rowSyncFrame: number;
128
+ rowSyncQueued: boolean;
128
129
  currentDragItem: any;
129
130
  currentResizeItem: any;
130
131
  popoverShow: boolean;
@@ -135,9 +136,11 @@ declare const MonthView: import('vue').DefineComponent<import('vue').ExtractProp
135
136
  monthSlots(): Slot[];
136
137
  occurrences(): import('../../models/Occurrence').Occurrence[];
137
138
  items(): Item[];
139
+ rowSyncKey(): string;
138
140
  compDragItem(): any;
139
141
  compResizeItem(): any;
140
142
  }, {
143
+ queueSyncGroupRows(): void;
141
144
  syncGroupRows(): void;
142
145
  handleShowMoreItemsClick({ event, slot }: any): void;
143
146
  handlePopoverClose(): void;
@@ -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 o=require("vue"),v=require("../../components/BaseView.js"),n=require("@progress/kendo-date-math"),h=require("../common/VerticalResourceIterator.js"),p=require("../common/HorizontalResourceIterator.js"),a=require("../../utils/main.js"),d=require("../../messages/main.js"),w=require("../../slots/SchedulerEditSlot.js"),u=require("@progress/kendo-vue-intl"),S=require("../../constants/main.js"),I=require("../../services/rangeService.js"),y=require("../../services/slotsService.js"),D=require("../../services/occurrenceService.js"),k=require("../../services/itemsService.js"),m=require("./MonthViewHead.js"),R=require("./MonthViewBody.js"),z=require("../../components/MoreEventsPopover.js"),V=require("../../items/SchedulerEditItem.js"),$=require("../../hooks/useGroupRowHeightSync.js"),b=o.defineComponent({name:"KendoMonthView",props:{itemsPerSlot:{type:Number,default:2},name:{type:String,default:"month"},dateRange:{type:[Function,Object],default:function(){return A}},slotDuration:{type:Number,default:1440},slotDivisions:{type:Number,default:1},numberOfDays:{type:Number,default:31},dragItem:{type:Object,default:function(){}},resizeItem:{type:Object,default:function(){}},title:String,selectedDateFormat:{type:String,default:"{0:Y}"},selectedShortDateFormat:{type:String,default:"{0:y}"},dateHeaderCell:[String,Function,Object],slotRender:[String,Function,Object],viewSlot:[String,Function,Object],resizeHint:[String,Function,Object],item:[String,Function,Object],viewItem:[String,Function,Object],editable:{type:[Boolean,Object],default:!1}},inject:{ks:{default:{}},setActiveDate:{default:null},setActiveViewName:{default:null},kendoLocalizationService:{default:null},kendoIntlService:{default:null}},created(){this.intl=u.provideIntlService(this)},mounted(){this.hasMounted=!0,this.$nextTick(this.syncGroupRows)},updated(){this.$nextTick(this.syncGroupRows)},unmounted(){this.rowSyncFrame!==void 0&&window.cancelAnimationFrame(this.rowSyncFrame)},data(){return{hasMounted:!1,rowSyncFrame:void 0,currentDragItem:void 0,currentResizeItem:void 0,popoverShow:!1,popoverAnchor:null,popoverSlot:null}},computed:{ranges(){return I.toRanges(this.ks.dateRange,{step:n.MS_PER_DAY*S.DAYS_IN_WEEK_COUNT,timezone:this.ks.timezone})},monthSlots(){return y.toSlots(this.ks.dateRange,{step:n.MS_PER_DAY},{groups:this.ks.groups,ranges:this.ranges})},occurrences(){return D.toOccurrences(this.ks.dataItems,{dateRange:this.ks.dateRange,fields:this.ks.fields,timezone:this.ks.timezone})},items(){const t=k.toItems(this.occurrences,{timezone:this.ks.timezone},{groups:this.ks.groups,ranges:this.ranges});return a.mapItemsToSlots(t,this.monthSlots,!0),a.mapSlotsToItems(t,this.monthSlots,!0),t},compDragItem(){return this.dragItem!==void 0?this.dragItem:this.currentDragItem},compResizeItem(){return this.resizeItem!==void 0?this.resizeItem:this.currentResizeItem}},render(){this.localization=u.provideLocalizationService(this),this.localization.toLanguageString(d.monthViewTitle,d.messages[d.monthViewTitle]);const t=this.$props.editItem||V.SchedulerEditItem;this.$props.editSlot||w.SchedulerEditSlot;const i=this.items,r=this.monthSlots;this.intl=u.provideIntlService(this);const s=this.$props.itemsPerSlot,c=this.ks.orientation==="horizontal"?this.ranges.map(function(e,l){return o.createVNode(p.HorizontalResourceIterator,{resources:this.ks.props.resources,group:this.ks.props.group},{default:()=>[o.createVNode(R.MonthViewBody,{editable:this.$props.editable,slotRender:this.$props.slotRender,viewSlot:this.$props.viewSlot,monthSlots:r,rangeIndex:l,itemsPerSlot:s,onDataaction:this.handleDataAction,onShowmoreitems:this.handleShowMoreItemsClick},null)]})},this):o.createVNode(h.VerticalResourceIterator,{nested:!0,resources:this.ks.props.resources,group:this.ks.props.group,onDataaction:this.handleDataAction,more:{slotRender:this.$props.slotRender,viewSlot:this.$props.viewSlot,monthSlots:r,ranges:this.ranges,itemsPerSlot:s,editable:this.$props.editable,onShowmoreitems:this.handleShowMoreItemsClick}},null);return o.createVNode(v.BaseView,{viewProps:{...this.$props},baseSlots:r,ranges:this.ranges,class:"k-scheduler-monthview"},{default:()=>[o.createVNode("div",{class:"k-scheduler-head"},[this.ks.orientation==="horizontal"?o.createVNode(p.HorizontalResourceIterator,{nested:!0,resources:this.ks.props.resources,group:this.ks.props.group},{default:()=>[o.createVNode(m.MonthViewHead,{monthSlots:r,dateHeaderCell:this.$props.dateHeaderCell},null)]}):o.createVNode(h.VerticalResourceIterator,{resources:this.ks.props.resources,group:this.ks.props.group},{default:()=>[o.createVNode(m.MonthViewHead,{monthSlots:r,dateHeaderCell:this.$props.dateHeaderCell},null)]})]),o.createVNode("div",{class:"k-scheduler-body",ref:"body"},[c,this.hasMounted&&i.filter(e=>e.order===null||e.order<s).sort(a.orderSort).map(function(e){return o.createVNode(t,{item:this.$props.item,viewItem:this.$props.viewItem,form:this.$props.form,key:e.isRecurring?`${e.uid}:${e.group.index}:${e.range.index}:${e.originalStart}`:`${e.uid}:${e.group.index}:${e.range.index}`,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,readonly:e.readonly,onDragitemchange:this.handleDragItemChange,onResizeitemchange:this.handleResizeItemChange,onDataaction:this.handleDataAction,vertical:!1,editable:this.$props.editable,ignoreIsAllDay:!0},null)},this)]),o.createVNode(z.MoreEventsPopover,{show:this.popoverShow,anchor:this.popoverAnchor,slot:this.popoverSlot,items:i,itemsPerSlot:s,onDayclick:this.handlePopoverDayClick,onClose:this.handlePopoverClose},null)]})},methods:{syncGroupRows(){this.rowSyncFrame!==void 0&&window.cancelAnimationFrame(this.rowSyncFrame),this.rowSyncFrame=window.requestAnimationFrame(()=>{$.syncGroupRowHeights(this.$refs.body),this.rowSyncFrame=void 0})},handleShowMoreItemsClick({event:t,slot:i}){var s;const r=((s=t.target)==null?void 0:s.element)||null;if(this.popoverShow&&this.popoverAnchor===r){this.popoverShow=!1,this.popoverAnchor=null,this.popoverSlot=null;return}this.popoverShow=!0,this.popoverAnchor=r,this.popoverSlot=i||null},handlePopoverClose(){this.popoverShow=!1,this.popoverAnchor=null,this.popoverSlot=null},handlePopoverDayClick(t){const r=this.ks.views.find(s=>s.name==="day");!this.setActiveViewName||!r||!r.name||(this.popoverShow=!1,this.popoverAnchor=null,this.popoverSlot=null,this.$nextTick(()=>{this.setActiveViewName(r.name),this.setActiveDate(t.start)}))},handleDataAction(t){this.$emit("dataaction",t)},handleDragItemChange(t){this.currentDragItem=t},handleResizeItemChange(t){this.currentResizeItem=t}}}),A=({intl:t,date:i,timezone:r})=>{const s=n.firstDayInWeek(n.firstDayOfMonth(n.getDate(i)),t.firstDay()),c=n.addDays(n.firstDayInWeek(n.lastDayOfMonth(n.getDate(i)),t.firstDay()),S.DAYS_IN_WEEK_COUNT),e=n.ZonedDate.fromUTCDate(a.toUTCDateTime(s),r),l=n.ZonedDate.fromUTCDate(a.toUTCDateTime(c),r),g=new Date(e.getTime()),f=new Date(l.getTime());return{start:g,end:f,zonedStart:e,zonedEnd:l}};exports.MonthView=b;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue"),w=require("../../components/BaseView.js"),n=require("@progress/kendo-date-math"),d=require("../common/VerticalResourceIterator.js"),p=require("../common/HorizontalResourceIterator.js"),a=require("../../utils/main.js"),l=require("../../messages/main.js"),y=require("../../slots/SchedulerEditSlot.js"),h=require("@progress/kendo-vue-intl"),S=require("../../constants/main.js"),v=require("../../services/rangeService.js"),I=require("../../services/slotsService.js"),D=require("../../services/occurrenceService.js"),R=require("../../services/itemsService.js"),m=require("./MonthViewHead.js"),k=require("./MonthViewBody.js"),z=require("../../components/MoreEventsPopover.js"),$=require("../../items/SchedulerEditItem.js"),V=require("../../hooks/useGroupRowHeightSync.js"),b=r.defineComponent({name:"KendoMonthView",props:{itemsPerSlot:{type:Number,default:2},name:{type:String,default:"month"},dateRange:{type:[Function,Object],default:function(){return M}},slotDuration:{type:Number,default:1440},slotDivisions:{type:Number,default:1},numberOfDays:{type:Number,default:31},dragItem:{type:Object,default:function(){}},resizeItem:{type:Object,default:function(){}},title:String,selectedDateFormat:{type:String,default:"{0:Y}"},selectedShortDateFormat:{type:String,default:"{0:y}"},dateHeaderCell:[String,Function,Object],slotRender:[String,Function,Object],viewSlot:[String,Function,Object],resizeHint:[String,Function,Object],item:[String,Function,Object],viewItem:[String,Function,Object],editable:{type:[Boolean,Object],default:!1}},inject:{ks:{default:{}},setActiveDate:{default:null},setActiveViewName:{default:null},kendoLocalizationService:{default:null},kendoIntlService:{default:null}},created(){this.intl=h.provideIntlService(this)},mounted(){this.hasMounted=!0,this.queueSyncGroupRows()},unmounted(){this.hasMounted=!1,this.rowSyncFrame!==void 0&&window.cancelAnimationFrame(this.rowSyncFrame)},data(){return{hasMounted:!1,rowSyncFrame:void 0,rowSyncQueued:!1,currentDragItem:void 0,currentResizeItem:void 0,popoverShow:!1,popoverAnchor:null,popoverSlot:null}},watch:{rowSyncKey(){this.hasMounted&&this.queueSyncGroupRows()},compDragItem(){this.hasMounted&&this.queueSyncGroupRows()},compResizeItem(){this.hasMounted&&this.queueSyncGroupRows()}},computed:{ranges(){return v.toRanges(this.ks.dateRange,{step:n.MS_PER_DAY*S.DAYS_IN_WEEK_COUNT,timezone:this.ks.timezone})},monthSlots(){return I.toSlots(this.ks.dateRange,{step:n.MS_PER_DAY},{groups:this.ks.groups,ranges:this.ranges})},occurrences(){return D.toOccurrences(this.ks.dataItems,{dateRange:this.ks.dateRange,fields:this.ks.fields,timezone:this.ks.timezone})},items(){const t=R.toItems(this.occurrences,{timezone:this.ks.timezone},{groups:this.ks.groups,ranges:this.ranges});return a.mapItemsToSlots(t,this.monthSlots,!0),a.mapSlotsToItems(t,this.monthSlots,!0),t},rowSyncKey(){return[this.itemsPerSlot,this.monthSlots.map(t=>`${t.group.index}:${t.range.index}:${t.items.length}`).join("|")].join("::")},compDragItem(){return this.dragItem!==void 0?this.dragItem:this.currentDragItem},compResizeItem(){return this.resizeItem!==void 0?this.resizeItem:this.currentResizeItem}},render(){this.localization=h.provideLocalizationService(this),this.localization.toLanguageString(l.monthViewTitle,l.messages[l.monthViewTitle]);const t=this.$props.editItem||$.SchedulerEditItem;this.$props.editSlot||y.SchedulerEditSlot;const i=this.items,o=this.monthSlots;this.intl=h.provideIntlService(this);const s=this.$props.itemsPerSlot,c=this.ks.orientation==="horizontal"?this.ranges.map(function(e,u){return r.createVNode(p.HorizontalResourceIterator,{resources:this.ks.props.resources,group:this.ks.props.group},{default:()=>[r.createVNode(k.MonthViewBody,{editable:this.$props.editable,slotRender:this.$props.slotRender,viewSlot:this.$props.viewSlot,monthSlots:o,rangeIndex:u,itemsPerSlot:s,onDataaction:this.handleDataAction,onShowmoreitems:this.handleShowMoreItemsClick},null)]})},this):r.createVNode(d.VerticalResourceIterator,{nested:!0,resources:this.ks.props.resources,group:this.ks.props.group,onDataaction:this.handleDataAction,more:{slotRender:this.$props.slotRender,viewSlot:this.$props.viewSlot,monthSlots:o,ranges:this.ranges,itemsPerSlot:s,editable:this.$props.editable,onShowmoreitems:this.handleShowMoreItemsClick}},null);return r.createVNode(w.BaseView,{viewProps:{...this.$props},baseSlots:o,ranges:this.ranges,class:"k-scheduler-monthview"},{default:()=>[r.createVNode("div",{class:"k-scheduler-head"},[this.ks.orientation==="horizontal"?r.createVNode(p.HorizontalResourceIterator,{nested:!0,resources:this.ks.props.resources,group:this.ks.props.group},{default:()=>[r.createVNode(m.MonthViewHead,{monthSlots:o,dateHeaderCell:this.$props.dateHeaderCell},null)]}):r.createVNode(d.VerticalResourceIterator,{resources:this.ks.props.resources,group:this.ks.props.group},{default:()=>[r.createVNode(m.MonthViewHead,{monthSlots:o,dateHeaderCell:this.$props.dateHeaderCell},null)]})]),r.createVNode("div",{class:"k-scheduler-body",ref:"body"},[c,this.hasMounted&&i.filter(e=>e.order===null||e.order<s).sort(a.orderSort).map(function(e){return r.createVNode(t,{item:this.$props.item,viewItem:this.$props.viewItem,form:this.$props.form,key:e.isRecurring?`${e.uid}:${e.group.index}:${e.range.index}:${e.originalStart}`:`${e.uid}:${e.group.index}:${e.range.index}`,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,readonly:e.readonly,onDragitemchange:this.handleDragItemChange,onResizeitemchange:this.handleResizeItemChange,onDataaction:this.handleDataAction,vertical:!1,editable:this.$props.editable,ignoreIsAllDay:!0},null)},this)]),r.createVNode(z.MoreEventsPopover,{show:this.popoverShow,anchor:this.popoverAnchor,slot:this.popoverSlot,items:i,itemsPerSlot:s,onDayclick:this.handlePopoverDayClick,onClose:this.handlePopoverClose},null)]})},methods:{queueSyncGroupRows(){this.rowSyncQueued||(this.rowSyncQueued=!0,this.$nextTick(()=>{this.rowSyncQueued=!1,this.$refs.body&&this.syncGroupRows()}))},syncGroupRows(){this.rowSyncFrame!==void 0&&window.cancelAnimationFrame(this.rowSyncFrame),this.rowSyncFrame=window.requestAnimationFrame(()=>{if(!this.hasMounted||!this.$refs.body){this.rowSyncFrame=void 0;return}V.syncGroupRowHeights(this.$refs.body),this.rowSyncFrame=void 0})},handleShowMoreItemsClick({event:t,slot:i}){var s;const o=((s=t.target)==null?void 0:s.element)||null;if(this.popoverShow&&this.popoverAnchor===o){this.popoverShow=!1,this.popoverAnchor=null,this.popoverSlot=null;return}this.popoverShow=!0,this.popoverAnchor=o,this.popoverSlot=i||null},handlePopoverClose(){this.popoverShow=!1,this.popoverAnchor=null,this.popoverSlot=null},handlePopoverDayClick(t){const o=this.ks.views.find(s=>s.name==="day");!this.setActiveViewName||!o||!o.name||(this.popoverShow=!1,this.popoverAnchor=null,this.popoverSlot=null,this.$nextTick(()=>{this.setActiveViewName(o.name),this.setActiveDate(t.start)}))},handleDataAction(t){this.$emit("dataaction",t)},handleDragItemChange(t){this.currentDragItem=t},handleResizeItemChange(t){this.currentResizeItem=t}}}),M=({intl:t,date:i,timezone:o})=>{const s=n.firstDayInWeek(n.firstDayOfMonth(n.getDate(i)),t.firstDay()),c=n.addDays(n.firstDayInWeek(n.lastDayOfMonth(n.getDate(i)),t.firstDay()),S.DAYS_IN_WEEK_COUNT),e=n.ZonedDate.fromUTCDate(a.toUTCDateTime(s),o),u=n.ZonedDate.fromUTCDate(a.toUTCDateTime(c),o),g=new Date(e.getTime()),f=new Date(u.getTime());return{start:g,end:f,zonedStart:e,zonedEnd:u}};exports.MonthView=b;
@@ -5,26 +5,26 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { defineComponent as D, createVNode as r } from "vue";
9
- import { BaseView as I } from "../../components/BaseView.mjs";
10
- import { firstDayInWeek as l, firstDayOfMonth as k, getDate as h, addDays as z, lastDayOfMonth as R, ZonedDate as d, MS_PER_DAY as c } from "@progress/kendo-date-math";
11
- import { VerticalResourceIterator as p } from "../common/VerticalResourceIterator.mjs";
12
- import { HorizontalResourceIterator as u } from "../common/HorizontalResourceIterator.mjs";
8
+ import { defineComponent as I, createVNode as r } from "vue";
9
+ import { BaseView as D } from "../../components/BaseView.mjs";
10
+ import { firstDayInWeek as h, firstDayOfMonth as R, getDate as l, addDays as k, lastDayOfMonth as z, ZonedDate as u, MS_PER_DAY as d } from "@progress/kendo-date-math";
11
+ import { VerticalResourceIterator as c } from "../common/VerticalResourceIterator.mjs";
12
+ import { HorizontalResourceIterator as p } from "../common/HorizontalResourceIterator.mjs";
13
13
  import { orderSort as $, mapItemsToSlots as b, mapSlotsToItems as A, toUTCDateTime as m } from "../../utils/main.mjs";
14
14
  import { monthViewTitle as f, messages as C } from "../../messages/main.mjs";
15
15
  import { SchedulerEditSlot as F } from "../../slots/SchedulerEditSlot.mjs";
16
- import { provideLocalizationService as T, provideIntlService as g } from "@progress/kendo-vue-intl";
16
+ import { provideLocalizationService as M, provideIntlService as S } from "@progress/kendo-vue-intl";
17
17
  import { DAYS_IN_WEEK_COUNT as w } from "../../constants/main.mjs";
18
- import { toRanges as O } from "../../services/rangeService.mjs";
19
- import { toSlots as E } from "../../services/slotsService.mjs";
20
- import { toOccurrences as M } from "../../services/occurrenceService.mjs";
21
- import { toItems as x } from "../../services/itemsService.mjs";
22
- import { MonthViewHead as S } from "./MonthViewHead.mjs";
18
+ import { toRanges as T } from "../../services/rangeService.mjs";
19
+ import { toSlots as O } from "../../services/slotsService.mjs";
20
+ import { toOccurrences as x } from "../../services/occurrenceService.mjs";
21
+ import { toItems as E } from "../../services/itemsService.mjs";
22
+ import { MonthViewHead as g } from "./MonthViewHead.mjs";
23
23
  import { MonthViewBody as P } from "./MonthViewBody.mjs";
24
- import { MoreEventsPopover as V } from "../../components/MoreEventsPopover.mjs";
25
- import { SchedulerEditItem as j } from "../../items/SchedulerEditItem.mjs";
24
+ import { MoreEventsPopover as j } from "../../components/MoreEventsPopover.mjs";
25
+ import { SchedulerEditItem as V } from "../../items/SchedulerEditItem.mjs";
26
26
  import { syncGroupRowHeights as N } from "../../hooks/useGroupRowHeightSync.mjs";
27
- const ie = /* @__PURE__ */ D({
27
+ const ie = /* @__PURE__ */ I({
28
28
  name: "KendoMonthView",
29
29
  props: {
30
30
  itemsPerSlot: {
@@ -101,21 +101,19 @@ const ie = /* @__PURE__ */ D({
101
101
  }
102
102
  },
103
103
  created() {
104
- this.intl = g(this);
104
+ this.intl = S(this);
105
105
  },
106
106
  mounted() {
107
- this.hasMounted = !0, this.$nextTick(this.syncGroupRows);
108
- },
109
- updated() {
110
- this.$nextTick(this.syncGroupRows);
107
+ this.hasMounted = !0, this.queueSyncGroupRows();
111
108
  },
112
109
  unmounted() {
113
- this.rowSyncFrame !== void 0 && window.cancelAnimationFrame(this.rowSyncFrame);
110
+ this.hasMounted = !1, this.rowSyncFrame !== void 0 && window.cancelAnimationFrame(this.rowSyncFrame);
114
111
  },
115
112
  data() {
116
113
  return {
117
114
  hasMounted: !1,
118
115
  rowSyncFrame: void 0,
116
+ rowSyncQueued: !1,
119
117
  currentDragItem: void 0,
120
118
  currentResizeItem: void 0,
121
119
  popoverShow: !1,
@@ -123,30 +121,41 @@ const ie = /* @__PURE__ */ D({
123
121
  popoverSlot: null
124
122
  };
125
123
  },
124
+ watch: {
125
+ rowSyncKey() {
126
+ this.hasMounted && this.queueSyncGroupRows();
127
+ },
128
+ compDragItem() {
129
+ this.hasMounted && this.queueSyncGroupRows();
130
+ },
131
+ compResizeItem() {
132
+ this.hasMounted && this.queueSyncGroupRows();
133
+ }
134
+ },
126
135
  computed: {
127
136
  ranges() {
128
- return O(this.ks.dateRange, {
129
- step: c * w,
137
+ return T(this.ks.dateRange, {
138
+ step: d * w,
130
139
  timezone: this.ks.timezone
131
140
  });
132
141
  },
133
142
  monthSlots() {
134
- return E(this.ks.dateRange, {
135
- step: c
143
+ return O(this.ks.dateRange, {
144
+ step: d
136
145
  }, {
137
146
  groups: this.ks.groups,
138
147
  ranges: this.ranges
139
148
  });
140
149
  },
141
150
  occurrences() {
142
- return M(this.ks.dataItems, {
151
+ return x(this.ks.dataItems, {
143
152
  dateRange: this.ks.dateRange,
144
153
  fields: this.ks.fields,
145
154
  timezone: this.ks.timezone
146
155
  });
147
156
  },
148
157
  items() {
149
- const t = x(this.occurrences, {
158
+ const t = E(this.occurrences, {
150
159
  timezone: this.ks.timezone
151
160
  }, {
152
161
  groups: this.ks.groups,
@@ -154,6 +163,9 @@ const ie = /* @__PURE__ */ D({
154
163
  });
155
164
  return b(t, this.monthSlots, !0), A(t, this.monthSlots, !0), t;
156
165
  },
166
+ rowSyncKey() {
167
+ return [this.itemsPerSlot, this.monthSlots.map((t) => `${t.group.index}:${t.range.index}:${t.items.length}`).join("|")].join("::");
168
+ },
157
169
  compDragItem() {
158
170
  return this.dragItem !== void 0 ? this.dragItem : this.currentDragItem;
159
171
  },
@@ -162,13 +174,13 @@ const ie = /* @__PURE__ */ D({
162
174
  }
163
175
  },
164
176
  render() {
165
- this.localization = T(this), this.localization.toLanguageString(f, C[f]);
166
- const t = this.$props.editItem || j;
177
+ this.localization = M(this), this.localization.toLanguageString(f, C[f]);
178
+ const t = this.$props.editItem || V;
167
179
  this.$props.editSlot || F;
168
180
  const n = this.items, o = this.monthSlots;
169
- this.intl = g(this);
181
+ this.intl = S(this);
170
182
  const s = this.$props.itemsPerSlot, a = this.ks.orientation === "horizontal" ? this.ranges.map(function(e, i) {
171
- return r(u, {
183
+ return r(p, {
172
184
  resources: this.ks.props.resources,
173
185
  group: this.ks.props.group
174
186
  }, {
@@ -183,7 +195,7 @@ const ie = /* @__PURE__ */ D({
183
195
  onShowmoreitems: this.handleShowMoreItemsClick
184
196
  }, null)]
185
197
  });
186
- }, this) : r(p, {
198
+ }, this) : r(c, {
187
199
  nested: !0,
188
200
  resources: this.ks.props.resources,
189
201
  group: this.ks.props.group,
@@ -198,7 +210,7 @@ const ie = /* @__PURE__ */ D({
198
210
  onShowmoreitems: this.handleShowMoreItemsClick
199
211
  }
200
212
  }, null);
201
- return r(I, {
213
+ return r(D, {
202
214
  viewProps: {
203
215
  ...this.$props
204
216
  },
@@ -208,20 +220,20 @@ const ie = /* @__PURE__ */ D({
208
220
  }, {
209
221
  default: () => [r("div", {
210
222
  class: "k-scheduler-head"
211
- }, [this.ks.orientation === "horizontal" ? r(u, {
223
+ }, [this.ks.orientation === "horizontal" ? r(p, {
212
224
  nested: !0,
213
225
  resources: this.ks.props.resources,
214
226
  group: this.ks.props.group
215
227
  }, {
216
- default: () => [r(S, {
228
+ default: () => [r(g, {
217
229
  monthSlots: o,
218
230
  dateHeaderCell: this.$props.dateHeaderCell
219
231
  }, null)]
220
- }) : r(p, {
232
+ }) : r(c, {
221
233
  resources: this.ks.props.resources,
222
234
  group: this.ks.props.group
223
235
  }, {
224
- default: () => [r(S, {
236
+ default: () => [r(g, {
225
237
  monthSlots: o,
226
238
  dateHeaderCell: this.$props.dateHeaderCell
227
239
  }, null)]
@@ -267,7 +279,7 @@ const ie = /* @__PURE__ */ D({
267
279
  editable: this.$props.editable,
268
280
  ignoreIsAllDay: !0
269
281
  }, null);
270
- }, this)]), r(V, {
282
+ }, this)]), r(j, {
271
283
  show: this.popoverShow,
272
284
  anchor: this.popoverAnchor,
273
285
  slot: this.popoverSlot,
@@ -279,8 +291,17 @@ const ie = /* @__PURE__ */ D({
279
291
  });
280
292
  },
281
293
  methods: {
294
+ queueSyncGroupRows() {
295
+ this.rowSyncQueued || (this.rowSyncQueued = !0, this.$nextTick(() => {
296
+ this.rowSyncQueued = !1, this.$refs.body && this.syncGroupRows();
297
+ }));
298
+ },
282
299
  syncGroupRows() {
283
300
  this.rowSyncFrame !== void 0 && window.cancelAnimationFrame(this.rowSyncFrame), this.rowSyncFrame = window.requestAnimationFrame(() => {
301
+ if (!this.hasMounted || !this.$refs.body) {
302
+ this.rowSyncFrame = void 0;
303
+ return;
304
+ }
284
305
  N(this.$refs.body), this.rowSyncFrame = void 0;
285
306
  });
286
307
  },
@@ -320,10 +341,10 @@ const ie = /* @__PURE__ */ D({
320
341
  date: n,
321
342
  timezone: o
322
343
  }) => {
323
- const s = l(k(h(n)), t.firstDay()), a = z(l(R(h(n)), t.firstDay()), w), e = d.fromUTCDate(m(s), o), i = d.fromUTCDate(m(a), o), v = new Date(e.getTime()), y = new Date(i.getTime());
344
+ const s = h(R(l(n)), t.firstDay()), a = k(h(z(l(n)), t.firstDay()), w), e = u.fromUTCDate(m(s), o), i = u.fromUTCDate(m(a), o), y = new Date(e.getTime()), v = new Date(i.getTime());
324
345
  return {
325
- start: v,
326
- end: y,
346
+ start: y,
347
+ end: v,
327
348
  zonedStart: e,
328
349
  zonedEnd: i
329
350
  };