@progress/kendo-vue-scheduler 10.0.1-develop.6 → 10.0.1-develop.7
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 +27 -12
- package/dist/cdn/js/kendo-vue-scheduler.js +1 -1
- package/hooks/useGroupRowHeightSync.d.ts +2 -0
- package/hooks/useGroupRowHeightSync.js +8 -0
- package/hooks/useGroupRowHeightSync.mjs +57 -0
- package/hooks/useSlotExpand.js +1 -1
- package/hooks/useSlotExpand.mjs +14 -14
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +12 -12
- package/views/month/MonthView.d.ts +2 -0
- package/views/month/MonthView.js +1 -1
- package/views/month/MonthView.mjs +60 -46
|
@@ -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 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;
|
|
@@ -0,0 +1,57 @@
|
|
|
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 u = (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
|
+
}, f = (t, e) => {
|
|
15
|
+
for (const o of t) {
|
|
16
|
+
const r = o[e];
|
|
17
|
+
if (!r)
|
|
18
|
+
continue;
|
|
19
|
+
r.querySelectorAll(":scope > .k-slot-cell").forEach((s) => {
|
|
20
|
+
s.style.removeProperty("height");
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
}, g = (t, e) => {
|
|
24
|
+
let o = 0;
|
|
25
|
+
for (const r of t) {
|
|
26
|
+
const l = r[e];
|
|
27
|
+
l && (o = Math.max(o, l.offsetHeight));
|
|
28
|
+
}
|
|
29
|
+
return o;
|
|
30
|
+
}, h = (t, e, o) => {
|
|
31
|
+
let r = !1;
|
|
32
|
+
for (const l of t) {
|
|
33
|
+
const s = l[e];
|
|
34
|
+
if (!s)
|
|
35
|
+
continue;
|
|
36
|
+
s.querySelectorAll(":scope > .k-slot-cell").forEach((n) => {
|
|
37
|
+
n.offsetHeight !== o && (r = !0), n.style.height = `${o}px`;
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
return r;
|
|
41
|
+
}, p = (t) => {
|
|
42
|
+
var l, s;
|
|
43
|
+
const e = u(t);
|
|
44
|
+
if (!e)
|
|
45
|
+
return !1;
|
|
46
|
+
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);
|
|
52
|
+
}
|
|
53
|
+
return o;
|
|
54
|
+
};
|
|
55
|
+
export {
|
|
56
|
+
p as syncGroupRowHeights
|
|
57
|
+
};
|
package/hooks/useSlotExpand.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
|
|
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;
|
package/hooks/useSlotExpand.mjs
CHANGED
|
@@ -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
|
|
11
|
+
const x = 6, v = (e, B, i) => {
|
|
12
12
|
let l = 0;
|
|
13
|
-
const
|
|
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 =
|
|
20
|
-
t && (
|
|
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 =
|
|
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
|
|
29
|
-
const s = e.cSlot.items.filter((n) => n.refTo),
|
|
30
|
-
|
|
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
|
-
|
|
37
|
+
c += y;
|
|
38
38
|
});
|
|
39
|
-
let
|
|
40
|
-
if (
|
|
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
|
-
|
|
44
|
+
g = n.offsetHeight + r + x;
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
let u =
|
|
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 &&
|
|
50
|
+
}, !0) : t && f(t);
|
|
51
51
|
};
|
|
52
52
|
a(), S();
|
|
53
53
|
};
|
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: 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;
|
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: "10.0.1-develop.
|
|
13
|
+
publishDate: 1790258062,
|
|
14
|
+
version: "10.0.1-develop.7",
|
|
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.
|
|
3
|
+
"version": "10.0.1-develop.7",
|
|
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.
|
|
31
|
-
"@progress/kendo-vue-buttons": "10.0.1-develop.
|
|
32
|
-
"@progress/kendo-vue-dateinputs": "10.0.1-develop.
|
|
33
|
-
"@progress/kendo-vue-dialogs": "10.0.1-develop.
|
|
34
|
-
"@progress/kendo-vue-dropdowns": "10.0.1-develop.
|
|
35
|
-
"@progress/kendo-vue-form": "10.0.1-develop.
|
|
36
|
-
"@progress/kendo-vue-inputs": "10.0.1-develop.
|
|
37
|
-
"@progress/kendo-vue-intl": "10.0.1-develop.
|
|
38
|
-
"@progress/kendo-vue-popup": "10.0.1-develop.
|
|
39
|
-
"@progress/kendo-vue-tooltip": "10.0.1-develop.
|
|
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",
|
|
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":
|
|
64
|
+
"publishDate": 1790258062,
|
|
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
|
},
|
|
@@ -124,6 +124,7 @@ declare const MonthView: import('vue').DefineComponent<import('vue').ExtractProp
|
|
|
124
124
|
};
|
|
125
125
|
}>, {}, {
|
|
126
126
|
hasMounted: boolean;
|
|
127
|
+
rowSyncFrame: number;
|
|
127
128
|
currentDragItem: any;
|
|
128
129
|
currentResizeItem: any;
|
|
129
130
|
popoverShow: boolean;
|
|
@@ -137,6 +138,7 @@ declare const MonthView: import('vue').DefineComponent<import('vue').ExtractProp
|
|
|
137
138
|
compDragItem(): any;
|
|
138
139
|
compResizeItem(): any;
|
|
139
140
|
}, {
|
|
141
|
+
syncGroupRows(): void;
|
|
140
142
|
handleShowMoreItemsClick({ event, slot }: any): void;
|
|
141
143
|
handlePopoverClose(): void;
|
|
142
144
|
handlePopoverDayClick(slot: Slot): void;
|
package/views/month/MonthView.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 o=require("vue"),
|
|
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;
|
|
@@ -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
|
|
9
|
-
import { BaseView as
|
|
10
|
-
import { firstDayInWeek as l, firstDayOfMonth as
|
|
11
|
-
import { VerticalResourceIterator as
|
|
12
|
-
import { HorizontalResourceIterator as
|
|
13
|
-
import { orderSort as
|
|
14
|
-
import { monthViewTitle as
|
|
15
|
-
import { SchedulerEditSlot as
|
|
16
|
-
import { provideLocalizationService as T, provideIntlService as
|
|
17
|
-
import { DAYS_IN_WEEK_COUNT as
|
|
18
|
-
import { toRanges as
|
|
19
|
-
import { toSlots as
|
|
20
|
-
import { toOccurrences as
|
|
21
|
-
import { toItems as
|
|
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";
|
|
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 T, provideIntlService as g } from "@progress/kendo-vue-intl";
|
|
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
22
|
import { MonthViewHead as S } from "./MonthViewHead.mjs";
|
|
23
|
-
import { MonthViewBody as
|
|
24
|
-
import { MoreEventsPopover as
|
|
25
|
-
import { SchedulerEditItem as
|
|
26
|
-
|
|
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";
|
|
26
|
+
import { syncGroupRowHeights as N } from "../../hooks/useGroupRowHeightSync.mjs";
|
|
27
|
+
const ie = /* @__PURE__ */ D({
|
|
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
|
|
41
|
+
return H;
|
|
41
42
|
}
|
|
42
43
|
},
|
|
43
44
|
slotDuration: {
|
|
@@ -100,14 +101,21 @@ const se = /* @__PURE__ */ w({
|
|
|
100
101
|
}
|
|
101
102
|
},
|
|
102
103
|
created() {
|
|
103
|
-
this.intl =
|
|
104
|
+
this.intl = g(this);
|
|
104
105
|
},
|
|
105
106
|
mounted() {
|
|
106
|
-
this.hasMounted = !0;
|
|
107
|
+
this.hasMounted = !0, this.$nextTick(this.syncGroupRows);
|
|
108
|
+
},
|
|
109
|
+
updated() {
|
|
110
|
+
this.$nextTick(this.syncGroupRows);
|
|
111
|
+
},
|
|
112
|
+
unmounted() {
|
|
113
|
+
this.rowSyncFrame !== void 0 && window.cancelAnimationFrame(this.rowSyncFrame);
|
|
107
114
|
},
|
|
108
115
|
data() {
|
|
109
116
|
return {
|
|
110
117
|
hasMounted: !1,
|
|
118
|
+
rowSyncFrame: void 0,
|
|
111
119
|
currentDragItem: void 0,
|
|
112
120
|
currentResizeItem: void 0,
|
|
113
121
|
popoverShow: !1,
|
|
@@ -117,34 +125,34 @@ const se = /* @__PURE__ */ w({
|
|
|
117
125
|
},
|
|
118
126
|
computed: {
|
|
119
127
|
ranges() {
|
|
120
|
-
return
|
|
121
|
-
step:
|
|
128
|
+
return O(this.ks.dateRange, {
|
|
129
|
+
step: c * w,
|
|
122
130
|
timezone: this.ks.timezone
|
|
123
131
|
});
|
|
124
132
|
},
|
|
125
133
|
monthSlots() {
|
|
126
|
-
return
|
|
127
|
-
step:
|
|
134
|
+
return E(this.ks.dateRange, {
|
|
135
|
+
step: c
|
|
128
136
|
}, {
|
|
129
137
|
groups: this.ks.groups,
|
|
130
138
|
ranges: this.ranges
|
|
131
139
|
});
|
|
132
140
|
},
|
|
133
141
|
occurrences() {
|
|
134
|
-
return
|
|
142
|
+
return M(this.ks.dataItems, {
|
|
135
143
|
dateRange: this.ks.dateRange,
|
|
136
144
|
fields: this.ks.fields,
|
|
137
145
|
timezone: this.ks.timezone
|
|
138
146
|
});
|
|
139
147
|
},
|
|
140
148
|
items() {
|
|
141
|
-
const t =
|
|
149
|
+
const t = x(this.occurrences, {
|
|
142
150
|
timezone: this.ks.timezone
|
|
143
151
|
}, {
|
|
144
152
|
groups: this.ks.groups,
|
|
145
153
|
ranges: this.ranges
|
|
146
154
|
});
|
|
147
|
-
return
|
|
155
|
+
return b(t, this.monthSlots, !0), A(t, this.monthSlots, !0), t;
|
|
148
156
|
},
|
|
149
157
|
compDragItem() {
|
|
150
158
|
return this.dragItem !== void 0 ? this.dragItem : this.currentDragItem;
|
|
@@ -154,17 +162,17 @@ const se = /* @__PURE__ */ w({
|
|
|
154
162
|
}
|
|
155
163
|
},
|
|
156
164
|
render() {
|
|
157
|
-
this.localization = T(this), this.localization.toLanguageString(
|
|
158
|
-
const t = this.$props.editItem ||
|
|
159
|
-
this.$props.editSlot ||
|
|
165
|
+
this.localization = T(this), this.localization.toLanguageString(f, C[f]);
|
|
166
|
+
const t = this.$props.editItem || j;
|
|
167
|
+
this.$props.editSlot || F;
|
|
160
168
|
const n = this.items, o = this.monthSlots;
|
|
161
|
-
this.intl =
|
|
169
|
+
this.intl = g(this);
|
|
162
170
|
const s = this.$props.itemsPerSlot, a = this.ks.orientation === "horizontal" ? this.ranges.map(function(e, i) {
|
|
163
|
-
return r(
|
|
171
|
+
return r(u, {
|
|
164
172
|
resources: this.ks.props.resources,
|
|
165
173
|
group: this.ks.props.group
|
|
166
174
|
}, {
|
|
167
|
-
default: () => [r(
|
|
175
|
+
default: () => [r(P, {
|
|
168
176
|
editable: this.$props.editable,
|
|
169
177
|
slotRender: this.$props.slotRender,
|
|
170
178
|
viewSlot: this.$props.viewSlot,
|
|
@@ -175,7 +183,7 @@ const se = /* @__PURE__ */ w({
|
|
|
175
183
|
onShowmoreitems: this.handleShowMoreItemsClick
|
|
176
184
|
}, null)]
|
|
177
185
|
});
|
|
178
|
-
}, this) : r(
|
|
186
|
+
}, this) : r(p, {
|
|
179
187
|
nested: !0,
|
|
180
188
|
resources: this.ks.props.resources,
|
|
181
189
|
group: this.ks.props.group,
|
|
@@ -190,7 +198,7 @@ const se = /* @__PURE__ */ w({
|
|
|
190
198
|
onShowmoreitems: this.handleShowMoreItemsClick
|
|
191
199
|
}
|
|
192
200
|
}, null);
|
|
193
|
-
return r(
|
|
201
|
+
return r(I, {
|
|
194
202
|
viewProps: {
|
|
195
203
|
...this.$props
|
|
196
204
|
},
|
|
@@ -200,7 +208,7 @@ const se = /* @__PURE__ */ w({
|
|
|
200
208
|
}, {
|
|
201
209
|
default: () => [r("div", {
|
|
202
210
|
class: "k-scheduler-head"
|
|
203
|
-
}, [this.ks.orientation === "horizontal" ? r(
|
|
211
|
+
}, [this.ks.orientation === "horizontal" ? r(u, {
|
|
204
212
|
nested: !0,
|
|
205
213
|
resources: this.ks.props.resources,
|
|
206
214
|
group: this.ks.props.group
|
|
@@ -209,7 +217,7 @@ const se = /* @__PURE__ */ w({
|
|
|
209
217
|
monthSlots: o,
|
|
210
218
|
dateHeaderCell: this.$props.dateHeaderCell
|
|
211
219
|
}, null)]
|
|
212
|
-
}) : r(
|
|
220
|
+
}) : r(p, {
|
|
213
221
|
resources: this.ks.props.resources,
|
|
214
222
|
group: this.ks.props.group
|
|
215
223
|
}, {
|
|
@@ -218,8 +226,9 @@ const se = /* @__PURE__ */ w({
|
|
|
218
226
|
dateHeaderCell: this.$props.dateHeaderCell
|
|
219
227
|
}, null)]
|
|
220
228
|
})]), r("div", {
|
|
221
|
-
class: "k-scheduler-body"
|
|
222
|
-
|
|
229
|
+
class: "k-scheduler-body",
|
|
230
|
+
ref: "body"
|
|
231
|
+
}, [a, this.hasMounted && n.filter((e) => e.order === null || e.order < s).sort($).map(function(e) {
|
|
223
232
|
return r(t, {
|
|
224
233
|
item: this.$props.item,
|
|
225
234
|
viewItem: this.$props.viewItem,
|
|
@@ -258,7 +267,7 @@ const se = /* @__PURE__ */ w({
|
|
|
258
267
|
editable: this.$props.editable,
|
|
259
268
|
ignoreIsAllDay: !0
|
|
260
269
|
}, null);
|
|
261
|
-
}, this)]), r(
|
|
270
|
+
}, this)]), r(V, {
|
|
262
271
|
show: this.popoverShow,
|
|
263
272
|
anchor: this.popoverAnchor,
|
|
264
273
|
slot: this.popoverSlot,
|
|
@@ -270,6 +279,11 @@ const se = /* @__PURE__ */ w({
|
|
|
270
279
|
});
|
|
271
280
|
},
|
|
272
281
|
methods: {
|
|
282
|
+
syncGroupRows() {
|
|
283
|
+
this.rowSyncFrame !== void 0 && window.cancelAnimationFrame(this.rowSyncFrame), this.rowSyncFrame = window.requestAnimationFrame(() => {
|
|
284
|
+
N(this.$refs.body), this.rowSyncFrame = void 0;
|
|
285
|
+
});
|
|
286
|
+
},
|
|
273
287
|
handleShowMoreItemsClick({
|
|
274
288
|
event: t,
|
|
275
289
|
slot: n
|
|
@@ -301,19 +315,19 @@ const se = /* @__PURE__ */ w({
|
|
|
301
315
|
this.currentResizeItem = t;
|
|
302
316
|
}
|
|
303
317
|
}
|
|
304
|
-
}),
|
|
318
|
+
}), H = ({
|
|
305
319
|
intl: t,
|
|
306
320
|
date: n,
|
|
307
321
|
timezone: o
|
|
308
322
|
}) => {
|
|
309
|
-
const s = l(
|
|
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());
|
|
310
324
|
return {
|
|
311
|
-
start:
|
|
312
|
-
end:
|
|
325
|
+
start: v,
|
|
326
|
+
end: y,
|
|
313
327
|
zonedStart: e,
|
|
314
328
|
zonedEnd: i
|
|
315
329
|
};
|
|
316
330
|
};
|
|
317
331
|
export {
|
|
318
|
-
|
|
332
|
+
ie as MonthView
|
|
319
333
|
};
|