@progress/kendo-vue-scheduler 10.0.1-develop.6 → 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.
@@ -7,4 +7,6 @@
7
7
  */
8
8
  import { Ref } from 'vue';
9
9
  /** @hidden */
10
+ export declare const syncGroupRowHeights: (body: HTMLElement | null) => boolean;
11
+ /** @hidden */
10
12
  export declare const useGroupRowHeightSync: (bodyRef: Ref<HTMLDivElement | null>, inputs?: Ref<any>[]) => void;
@@ -0,0 +1,8 @@
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"});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;
@@ -0,0 +1,63 @@
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 "vue";
9
+ const n = (t) => {
10
+ if (!t)
11
+ return null;
12
+ const e = t.querySelectorAll(":scope > .k-scheduler-group > .k-scheduler-row > .k-group-cell");
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;
21
+ }, f = (t, e) => {
22
+ for (const o of t) {
23
+ const l = o[e];
24
+ if (!l)
25
+ continue;
26
+ l.querySelectorAll(":scope > .k-slot-cell").forEach((s) => {
27
+ s.style.removeProperty("height");
28
+ });
29
+ }
30
+ }, h = (t, e) => {
31
+ let o = 0;
32
+ for (const l of t) {
33
+ const r = l[e];
34
+ r && (o = Math.max(o, r.offsetHeight));
35
+ }
36
+ return o;
37
+ }, g = (t, e, o) => {
38
+ let l = !1;
39
+ for (const r of t) {
40
+ const s = r[e];
41
+ if (!s)
42
+ continue;
43
+ s.querySelectorAll(":scope > .k-slot-cell").forEach((c) => {
44
+ c.offsetHeight !== o && (l = !0), c.style.height = `${o}px`;
45
+ });
46
+ }
47
+ return l;
48
+ }, p = (t) => {
49
+ const e = n(t);
50
+ if (!e)
51
+ return u(t);
52
+ let o = !1;
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);
58
+ }
59
+ return o;
60
+ };
61
+ export {
62
+ p as syncGroupRowHeights
63
+ };
@@ -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 c=require("../views/common/utils.js"),H=require("../constants/main.js"),a=require("@progress/kendo-vue-common"),T=6,O=(t,B,i)=>{let m=0;const u=e=>e.nodeType===8?e.parentElement:e.nodeType===3?e.nextElementSibling:e,f=e=>{const o=t.$props.slotStyle;o&&Object.prototype.hasOwnProperty.call(o,"minHeight")&&(e.style.minHeight=o.minHeight)},S=()=>{if(!t)return;const e=u(t.$el);e&&(f(e),m=e.clientHeight)},y=()=>{if(!i||!t)return;const e=u(t.$el);if(!e||!t.bv.items.length)return;const o=c.getPadding(e);let g=0;const s=t.cSlot.items.filter(n=>n.refTo),h=t.$props.itemsPerSlot,d=h!==void 0?s.filter((n,r)=>r<h):s;d.forEach(n=>{const r=t.bv.items.find(E=>E.uid===n.uid);if(!r)return;const{height:b}=c.getRect(r.getElement());g+=b});let l=a.isObject(i)&&i.offsetBottom?i.offsetBottom:0;if(l>0){const n=e.querySelector(".k-more-events");if(n){const r=parseFloat(window.getComputedStyle(n).bottom)||0;l=n.offsetHeight+r+T}}let p=d.length*H.BORDER_WIDTH*2+g-(o||0)+(a.isObject(i)&&i.offsetTop?i.offsetTop:0)+l;s.length?p>m-o&&c.setRect(e,{height:p},!0):e&&f(e)};S(),y()};exports.useSlotExpand=O;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("../views/common/utils.js"),H=require("../constants/main.js"),a=require("@progress/kendo-vue-common"),T=6,O=(t,P,i)=>{let c=0;const m=e=>e.nodeType===8?e.parentElement:e.nodeType===3?e.nextElementSibling:e,u=e=>{const o=t.$props.slotStyle;o&&Object.prototype.hasOwnProperty.call(o,"minHeight")&&(e.style.minHeight=o.minHeight)},S=()=>{if(!t)return;const e=m(t.$el);e&&(u(e),c=e.clientHeight)},y=()=>{if(!i||!t)return;const e=m(t.$el);if(!e||!t.bv.items.length)return;const o=l.getPadding(e);let f=0;const s=t.cSlot.items.filter(n=>n.refTo),g=t.$props.itemsPerSlot,h=g!==void 0?s.filter((n,r)=>r<g):s;h.forEach(n=>{const r=t.bv.items.find(E=>E.uid===n.uid);if(!r)return;const{height:b}=l.getRect(r.getElement());f+=b});let d=0;if(a.isObject(i)&&i.offsetBottom){const n=e.querySelector(".k-more-events");if(n){const r=parseFloat(window.getComputedStyle(n).bottom)||0;d=n.offsetHeight+r+T}}let p=h.length*H.BORDER_WIDTH*2+f-(o||0)+(a.isObject(i)&&i.offsetTop?i.offsetTop:0)+d;s.length?p>c-o&&l.setRect(e,{height:p},!0):e&&u(e)};S(),y()};exports.useSlotExpand=O;
@@ -8,46 +8,46 @@
8
8
  import { getPadding as E, getRect as T, setRect as b } from "../views/common/utils.mjs";
9
9
  import { BORDER_WIDTH as O } from "../constants/main.mjs";
10
10
  import { isObject as d } from "@progress/kendo-vue-common";
11
- const B = 6, v = (e, x, i) => {
11
+ const x = 6, v = (e, B, i) => {
12
12
  let l = 0;
13
- const f = (t) => t.nodeType === 8 ? t.parentElement : t.nodeType === 3 ? t.nextElementSibling : t, c = (t) => {
13
+ const m = (t) => t.nodeType === 8 ? t.parentElement : t.nodeType === 3 ? t.nextElementSibling : t, f = (t) => {
14
14
  const o = e.$props.slotStyle;
15
15
  o && Object.prototype.hasOwnProperty.call(o, "minHeight") && (t.style.minHeight = o.minHeight);
16
16
  }, a = () => {
17
17
  if (!e)
18
18
  return;
19
- const t = f(e.$el);
20
- t && (c(t), l = t.clientHeight);
19
+ const t = m(e.$el);
20
+ t && (f(t), l = t.clientHeight);
21
21
  }, S = () => {
22
22
  if (!i || !e)
23
23
  return;
24
- const t = f(e.$el);
24
+ const t = m(e.$el);
25
25
  if (!t || !e.bv.items.length)
26
26
  return;
27
27
  const o = E(t);
28
- let p = 0;
29
- const s = e.cSlot.items.filter((n) => n.refTo), h = e.$props.itemsPerSlot, g = h !== void 0 ? s.filter((n, r) => r < h) : s;
30
- g.forEach((n) => {
28
+ let c = 0;
29
+ const s = e.cSlot.items.filter((n) => n.refTo), p = e.$props.itemsPerSlot, h = p !== void 0 ? s.filter((n, r) => r < p) : s;
30
+ h.forEach((n) => {
31
31
  const r = e.bv.items.find((H) => H.uid === n.uid);
32
32
  if (!r)
33
33
  return;
34
34
  const {
35
35
  height: y
36
36
  } = T(r.getElement());
37
- p += y;
37
+ c += y;
38
38
  });
39
- let m = d(i) && i.offsetBottom ? i.offsetBottom : 0;
40
- if (m > 0) {
39
+ let g = 0;
40
+ if (d(i) && i.offsetBottom) {
41
41
  const n = t.querySelector(".k-more-events");
42
42
  if (n) {
43
43
  const r = parseFloat(window.getComputedStyle(n).bottom) || 0;
44
- m = n.offsetHeight + r + B;
44
+ g = n.offsetHeight + r + x;
45
45
  }
46
46
  }
47
- let u = g.length * O * 2 + p - (o || 0) + (d(i) && i.offsetTop ? i.offsetTop : 0) + m;
47
+ let u = h.length * O * 2 + c - (o || 0) + (d(i) && i.offsetTop ? i.offsetTop : 0) + g;
48
48
  s.length ? u > l - o && b(t, {
49
49
  height: u
50
- }, !0) : t && c(t);
50
+ }, !0) : t && f(t);
51
51
  };
52
52
  a(), S();
53
53
  };
@@ -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: 1789653454,version:"10.0.1-develop.6",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: 1789653454,
14
- version: "10.0.1-develop.6",
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.6",
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.6",
31
- "@progress/kendo-vue-buttons": "10.0.1-develop.6",
32
- "@progress/kendo-vue-dateinputs": "10.0.1-develop.6",
33
- "@progress/kendo-vue-dialogs": "10.0.1-develop.6",
34
- "@progress/kendo-vue-dropdowns": "10.0.1-develop.6",
35
- "@progress/kendo-vue-form": "10.0.1-develop.6",
36
- "@progress/kendo-vue-inputs": "10.0.1-develop.6",
37
- "@progress/kendo-vue-intl": "10.0.1-develop.6",
38
- "@progress/kendo-vue-popup": "10.0.1-develop.6",
39
- "@progress/kendo-vue-tooltip": "10.0.1-develop.6",
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": 1789653454,
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
  }
@@ -124,6 +124,8 @@ declare const MonthView: import('vue').DefineComponent<import('vue').ExtractProp
124
124
  };
125
125
  }>, {}, {
126
126
  hasMounted: boolean;
127
+ rowSyncFrame: number;
128
+ rowSyncQueued: boolean;
127
129
  currentDragItem: any;
128
130
  currentResizeItem: any;
129
131
  popoverShow: boolean;
@@ -134,9 +136,12 @@ declare const MonthView: import('vue').DefineComponent<import('vue').ExtractProp
134
136
  monthSlots(): Slot[];
135
137
  occurrences(): import('../../models/Occurrence').Occurrence[];
136
138
  items(): Item[];
139
+ rowSyncKey(): string;
137
140
  compDragItem(): any;
138
141
  compResizeItem(): any;
139
142
  }, {
143
+ queueSyncGroupRows(): void;
144
+ syncGroupRows(): void;
140
145
  handleShowMoreItemsClick({ event, slot }: any): void;
141
146
  handlePopoverClose(): void;
142
147
  handlePopoverDayClick(slot: Slot): 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"),f=require("../../components/BaseView.js"),n=require("@progress/kendo-date-math"),u=require("../common/VerticalResourceIterator.js"),p=require("../common/HorizontalResourceIterator.js"),a=require("../../utils/main.js"),d=require("../../messages/main.js"),I=require("../../slots/SchedulerEditSlot.js"),h=require("@progress/kendo-vue-intl"),g=require("../../constants/main.js"),D=require("../../services/rangeService.js"),w=require("../../services/slotsService.js"),k=require("../../services/occurrenceService.js"),y=require("../../services/itemsService.js"),m=require("./MonthViewHead.js"),z=require("./MonthViewBody.js"),R=require("../../components/MoreEventsPopover.js"),V=require("../../items/SchedulerEditItem.js"),b=o.defineComponent({name:"KendoMonthView",props:{itemsPerSlot:{type:Number,default:2},name:{type:String,default:"month"},dateRange:{type:[Function,Object],default:function(){return $}},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},data(){return{hasMounted:!1,currentDragItem:void 0,currentResizeItem:void 0,popoverShow:!1,popoverAnchor:null,popoverSlot:null}},computed:{ranges(){return D.toRanges(this.ks.dateRange,{step:n.MS_PER_DAY*g.DAYS_IN_WEEK_COUNT,timezone:this.ks.timezone})},monthSlots(){return w.toSlots(this.ks.dateRange,{step:n.MS_PER_DAY},{groups:this.ks.groups,ranges:this.ranges})},occurrences(){return k.toOccurrences(this.ks.dataItems,{dateRange:this.ks.dateRange,fields:this.ks.fields,timezone:this.ks.timezone})},items(){const t=y.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=h.provideLocalizationService(this),this.localization.toLanguageString(d.monthViewTitle,d.messages[d.monthViewTitle]);const t=this.$props.editItem||V.SchedulerEditItem;this.$props.editSlot||I.SchedulerEditSlot;const i=this.items,r=this.monthSlots;this.intl=h.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(z.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(u.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(f.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(u.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"},[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(R.MoreEventsPopover,{show:this.popoverShow,anchor:this.popoverAnchor,slot:this.popoverSlot,items:i,itemsPerSlot:s,onDayclick:this.handlePopoverDayClick,onClose:this.handlePopoverClose},null)]})},methods:{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}}}),$=({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()),g.DAYS_IN_WEEK_COUNT),e=n.ZonedDate.fromUTCDate(a.toUTCDateTime(s),r),l=n.ZonedDate.fromUTCDate(a.toUTCDateTime(c),r),S=new Date(e.getTime()),v=new Date(l.getTime());return{start:S,end:v,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,25 +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 w, createVNode as r } from "vue";
9
- import { BaseView as k } from "../../components/BaseView.mjs";
10
- import { firstDayInWeek as l, firstDayOfMonth as y, getDate as h, addDays as z, lastDayOfMonth as R, ZonedDate as d, MS_PER_DAY as p } from "@progress/kendo-date-math";
11
- import { VerticalResourceIterator as u } from "../common/VerticalResourceIterator.mjs";
12
- import { HorizontalResourceIterator as c } from "../common/HorizontalResourceIterator.mjs";
13
- import { orderSort as b, mapItemsToSlots as $, mapSlotsToItems as C, toUTCDateTime as m } from "../../utils/main.mjs";
14
- import { monthViewTitle as g, messages as A } from "../../messages/main.mjs";
15
- import { SchedulerEditSlot as O } from "../../slots/SchedulerEditSlot.mjs";
16
- import { provideLocalizationService as T, provideIntlService as f } from "@progress/kendo-vue-intl";
17
- import { DAYS_IN_WEEK_COUNT as v } from "../../constants/main.mjs";
18
- import { toRanges as E } from "../../services/rangeService.mjs";
19
- import { toSlots as M } from "../../services/slotsService.mjs";
20
- import { toOccurrences as P } from "../../services/occurrenceService.mjs";
21
- import { toItems as V } from "../../services/itemsService.mjs";
22
- import { MonthViewHead as S } from "./MonthViewHead.mjs";
23
- import { MonthViewBody as j } from "./MonthViewBody.mjs";
24
- import { MoreEventsPopover as x } from "../../components/MoreEventsPopover.mjs";
25
- import { SchedulerEditItem as N } from "../../items/SchedulerEditItem.mjs";
26
- const se = /* @__PURE__ */ w({
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
+ import { orderSort as $, mapItemsToSlots as b, mapSlotsToItems as A, toUTCDateTime as m } from "../../utils/main.mjs";
14
+ import { monthViewTitle as f, messages as C } from "../../messages/main.mjs";
15
+ import { SchedulerEditSlot as F } from "../../slots/SchedulerEditSlot.mjs";
16
+ import { provideLocalizationService as M, provideIntlService as S } from "@progress/kendo-vue-intl";
17
+ import { DAYS_IN_WEEK_COUNT as w } from "../../constants/main.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
+ import { MonthViewBody as P } from "./MonthViewBody.mjs";
24
+ import { MoreEventsPopover as j } from "../../components/MoreEventsPopover.mjs";
25
+ import { SchedulerEditItem as V } from "../../items/SchedulerEditItem.mjs";
26
+ import { syncGroupRowHeights as N } from "../../hooks/useGroupRowHeightSync.mjs";
27
+ const ie = /* @__PURE__ */ I({
27
28
  name: "KendoMonthView",
28
29
  props: {
29
30
  itemsPerSlot: {
@@ -37,7 +38,7 @@ const se = /* @__PURE__ */ w({
37
38
  dateRange: {
38
39
  type: [Function, Object],
39
40
  default: function() {
40
- return F;
41
+ return H;
41
42
  }
42
43
  },
43
44
  slotDuration: {
@@ -100,14 +101,19 @@ const se = /* @__PURE__ */ w({
100
101
  }
101
102
  },
102
103
  created() {
103
- this.intl = f(this);
104
+ this.intl = S(this);
104
105
  },
105
106
  mounted() {
106
- this.hasMounted = !0;
107
+ this.hasMounted = !0, this.queueSyncGroupRows();
108
+ },
109
+ unmounted() {
110
+ this.hasMounted = !1, this.rowSyncFrame !== void 0 && window.cancelAnimationFrame(this.rowSyncFrame);
107
111
  },
108
112
  data() {
109
113
  return {
110
114
  hasMounted: !1,
115
+ rowSyncFrame: void 0,
116
+ rowSyncQueued: !1,
111
117
  currentDragItem: void 0,
112
118
  currentResizeItem: void 0,
113
119
  popoverShow: !1,
@@ -115,36 +121,50 @@ const se = /* @__PURE__ */ w({
115
121
  popoverSlot: null
116
122
  };
117
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
+ },
118
135
  computed: {
119
136
  ranges() {
120
- return E(this.ks.dateRange, {
121
- step: p * v,
137
+ return T(this.ks.dateRange, {
138
+ step: d * w,
122
139
  timezone: this.ks.timezone
123
140
  });
124
141
  },
125
142
  monthSlots() {
126
- return M(this.ks.dateRange, {
127
- step: p
143
+ return O(this.ks.dateRange, {
144
+ step: d
128
145
  }, {
129
146
  groups: this.ks.groups,
130
147
  ranges: this.ranges
131
148
  });
132
149
  },
133
150
  occurrences() {
134
- return P(this.ks.dataItems, {
151
+ return x(this.ks.dataItems, {
135
152
  dateRange: this.ks.dateRange,
136
153
  fields: this.ks.fields,
137
154
  timezone: this.ks.timezone
138
155
  });
139
156
  },
140
157
  items() {
141
- const t = V(this.occurrences, {
158
+ const t = E(this.occurrences, {
142
159
  timezone: this.ks.timezone
143
160
  }, {
144
161
  groups: this.ks.groups,
145
162
  ranges: this.ranges
146
163
  });
147
- return $(t, this.monthSlots, !0), C(t, this.monthSlots, !0), t;
164
+ return b(t, this.monthSlots, !0), A(t, this.monthSlots, !0), t;
165
+ },
166
+ rowSyncKey() {
167
+ return [this.itemsPerSlot, this.monthSlots.map((t) => `${t.group.index}:${t.range.index}:${t.items.length}`).join("|")].join("::");
148
168
  },
149
169
  compDragItem() {
150
170
  return this.dragItem !== void 0 ? this.dragItem : this.currentDragItem;
@@ -154,17 +174,17 @@ const se = /* @__PURE__ */ w({
154
174
  }
155
175
  },
156
176
  render() {
157
- this.localization = T(this), this.localization.toLanguageString(g, A[g]);
158
- const t = this.$props.editItem || N;
159
- this.$props.editSlot || O;
177
+ this.localization = M(this), this.localization.toLanguageString(f, C[f]);
178
+ const t = this.$props.editItem || V;
179
+ this.$props.editSlot || F;
160
180
  const n = this.items, o = this.monthSlots;
161
- this.intl = f(this);
181
+ this.intl = S(this);
162
182
  const s = this.$props.itemsPerSlot, a = this.ks.orientation === "horizontal" ? this.ranges.map(function(e, i) {
163
- return r(c, {
183
+ return r(p, {
164
184
  resources: this.ks.props.resources,
165
185
  group: this.ks.props.group
166
186
  }, {
167
- default: () => [r(j, {
187
+ default: () => [r(P, {
168
188
  editable: this.$props.editable,
169
189
  slotRender: this.$props.slotRender,
170
190
  viewSlot: this.$props.viewSlot,
@@ -175,7 +195,7 @@ const se = /* @__PURE__ */ w({
175
195
  onShowmoreitems: this.handleShowMoreItemsClick
176
196
  }, null)]
177
197
  });
178
- }, this) : r(u, {
198
+ }, this) : r(c, {
179
199
  nested: !0,
180
200
  resources: this.ks.props.resources,
181
201
  group: this.ks.props.group,
@@ -190,7 +210,7 @@ const se = /* @__PURE__ */ w({
190
210
  onShowmoreitems: this.handleShowMoreItemsClick
191
211
  }
192
212
  }, null);
193
- return r(k, {
213
+ return r(D, {
194
214
  viewProps: {
195
215
  ...this.$props
196
216
  },
@@ -200,26 +220,27 @@ const se = /* @__PURE__ */ w({
200
220
  }, {
201
221
  default: () => [r("div", {
202
222
  class: "k-scheduler-head"
203
- }, [this.ks.orientation === "horizontal" ? r(c, {
223
+ }, [this.ks.orientation === "horizontal" ? r(p, {
204
224
  nested: !0,
205
225
  resources: this.ks.props.resources,
206
226
  group: this.ks.props.group
207
227
  }, {
208
- default: () => [r(S, {
228
+ default: () => [r(g, {
209
229
  monthSlots: o,
210
230
  dateHeaderCell: this.$props.dateHeaderCell
211
231
  }, null)]
212
- }) : r(u, {
232
+ }) : r(c, {
213
233
  resources: this.ks.props.resources,
214
234
  group: this.ks.props.group
215
235
  }, {
216
- default: () => [r(S, {
236
+ default: () => [r(g, {
217
237
  monthSlots: o,
218
238
  dateHeaderCell: this.$props.dateHeaderCell
219
239
  }, null)]
220
240
  })]), r("div", {
221
- class: "k-scheduler-body"
222
- }, [a, this.hasMounted && n.filter((e) => e.order === null || e.order < s).sort(b).map(function(e) {
241
+ class: "k-scheduler-body",
242
+ ref: "body"
243
+ }, [a, this.hasMounted && n.filter((e) => e.order === null || e.order < s).sort($).map(function(e) {
223
244
  return r(t, {
224
245
  item: this.$props.item,
225
246
  viewItem: this.$props.viewItem,
@@ -258,7 +279,7 @@ const se = /* @__PURE__ */ w({
258
279
  editable: this.$props.editable,
259
280
  ignoreIsAllDay: !0
260
281
  }, null);
261
- }, this)]), r(x, {
282
+ }, this)]), r(j, {
262
283
  show: this.popoverShow,
263
284
  anchor: this.popoverAnchor,
264
285
  slot: this.popoverSlot,
@@ -270,6 +291,20 @@ const se = /* @__PURE__ */ w({
270
291
  });
271
292
  },
272
293
  methods: {
294
+ queueSyncGroupRows() {
295
+ this.rowSyncQueued || (this.rowSyncQueued = !0, this.$nextTick(() => {
296
+ this.rowSyncQueued = !1, this.$refs.body && this.syncGroupRows();
297
+ }));
298
+ },
299
+ syncGroupRows() {
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
+ }
305
+ N(this.$refs.body), this.rowSyncFrame = void 0;
306
+ });
307
+ },
273
308
  handleShowMoreItemsClick({
274
309
  event: t,
275
310
  slot: n
@@ -301,19 +336,19 @@ const se = /* @__PURE__ */ w({
301
336
  this.currentResizeItem = t;
302
337
  }
303
338
  }
304
- }), F = ({
339
+ }), H = ({
305
340
  intl: t,
306
341
  date: n,
307
342
  timezone: o
308
343
  }) => {
309
- const s = l(y(h(n)), t.firstDay()), a = z(l(R(h(n)), t.firstDay()), v), e = d.fromUTCDate(m(s), o), i = d.fromUTCDate(m(a), o), D = new Date(e.getTime()), I = 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());
310
345
  return {
311
- start: D,
312
- end: I,
346
+ start: y,
347
+ end: v,
313
348
  zonedStart: e,
314
349
  zonedEnd: i
315
350
  };
316
351
  };
317
352
  export {
318
- se as MonthView
353
+ ie as MonthView
319
354
  };