@progress/kendo-vue-scheduler 9.0.0-develop.1 → 9.0.0-develop.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,14 +5,14 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { defineComponent as k, createVNode as t } from "vue";
9
- import { SchedulerEditSlot as S } from "../../slots/SchedulerEditSlot.mjs";
10
- import { provideIntlService as f, provideLocalizationService as v } from "@progress/kendo-vue-intl";
11
- import { SchedulerEditTask as m } from "../../tasks/SchedulerEditTask.mjs";
8
+ import { defineComponent as f, createVNode as t, createTextVNode as S } from "vue";
9
+ import { SchedulerEditSlot as m } from "../../slots/SchedulerEditSlot.mjs";
10
+ import { provideIntlService as v, provideLocalizationService as E } from "@progress/kendo-vue-intl";
11
+ import { SchedulerEditTask as z } from "../../tasks/SchedulerEditTask.mjs";
12
12
  import { allDay as i, messages as d, noEvents as c } from "../../messages/main.mjs";
13
13
  import { Icon as u } from "@progress/kendo-vue-common";
14
- import { chevronRightIcon as h, chevronLeftIcon as p } from "@progress/kendo-svg-icons";
15
- const b = /* @__PURE__ */ k({
14
+ import { chevronRightIcon as h, chevronLeftIcon as k } from "@progress/kendo-svg-icons";
15
+ const M = /* @__PURE__ */ f({
16
16
  name: "KendoAgendaViewBody",
17
17
  emits: ["dataaction"],
18
18
  props: {
@@ -31,6 +31,9 @@ const b = /* @__PURE__ */ k({
31
31
  ks: {
32
32
  default: null
33
33
  },
34
+ ksMobile: {
35
+ default: () => () => !1
36
+ },
34
37
  kendoIntlService: {
35
38
  default: null
36
39
  },
@@ -50,66 +53,76 @@ const b = /* @__PURE__ */ k({
50
53
  return {
51
54
  hasMounted: !1,
52
55
  ksSlots: {
53
- cSlots: this.agendaSlots.filter((r) => r.group.index === (this.ri.groupIndex || 0))
56
+ cSlots: this.agendaSlots.filter((a) => a.group.index === (this.ri.groupIndex || 0))
54
57
  }
55
58
  };
56
59
  },
57
60
  watch: {
58
- currentCellSlots(r) {
59
- this.ksSlots.cSlots = r;
61
+ currentCellSlots(a) {
62
+ this.ksSlots.cSlots = a;
60
63
  }
61
64
  },
62
65
  computed: {
63
66
  currentCellSlots() {
64
- return this.agendaSlots.filter((r) => r.group.index === (this.ri.groupIndex || 0));
67
+ return this.agendaSlots.filter((a) => a.group.index === (this.ri.groupIndex || 0));
65
68
  }
66
69
  },
67
70
  mounted() {
68
71
  this.hasMounted = !0;
69
72
  },
70
73
  render() {
71
- this.intl = f(this);
72
- const r = this.$props.editSlot || S, n = this.$props.editTask || m, o = v(this);
74
+ this.intl = v(this);
75
+ const a = this.$props.editSlot || m, r = this.$props.editTask || z, s = E(this), p = typeof this.ksMobile == "function" ? this.ksMobile() : !1;
73
76
  return t("div", {
74
77
  class: "k-scheduler-body"
75
- }, [this.currentCellSlots.map(function(a, s, g) {
78
+ }, [this.currentCellSlots.map(function(n, l, g) {
76
79
  return t("div", {
77
80
  class: "k-scheduler-row k-scheduler-content",
78
- key: `${this.ri.groupIndex}:${s}`
79
- }, [t(r, {
80
- index: s,
81
+ key: `${this.ri.groupIndex}:${l}`
82
+ }, [t(a, {
83
+ index: l,
81
84
  editable: this.$props.editable,
82
- row: g.length * (this.ri.groupIndex || 0) + s,
85
+ row: g.length * (this.ri.groupIndex || 0) + l,
83
86
  col: 0,
84
87
  viewSlot: this.$props.viewSlot,
85
88
  onDataaction: this.handleDataAction,
86
89
  className: "k-scheduler-datecolumn k-group-cell"
87
90
  }, {
88
- default: () => [t("div", null, [t("strong", {
91
+ default: () => [p ? t("div", {
92
+ class: "k-scheduler-datecolumn-wrap"
93
+ }, [t("span", {
94
+ class: "k-mobile-scheduler-agendadate"
95
+ }, [t("span", {
96
+ class: "k-mobile-scheduler-agendaday"
97
+ }, [this.intl.formatDate(n.zonedStart, "dd")]), S(" "), t("span", {
98
+ class: "k-mobile-scheduler-agendamonth"
99
+ }, [this.intl.formatDate(n.zonedStart, "MMMM")])]), t("span", {
100
+ class: "k-mobile-scheduler-agendaweekday"
101
+ }, [this.intl.formatDate(n.zonedStart, "EEEE")])]) : t("div", null, [t("strong", {
89
102
  class: "k-scheduler-agendaday"
90
- }, [this.intl.formatDate(a.zonedStart, "dd")]), t("em", {
103
+ }, [this.intl.formatDate(n.zonedStart, "dd")]), t("em", {
91
104
  class: "k-scheduler-agendaweek"
92
- }, [this.intl.formatDate(a.zonedStart, "EEEE")]), t("span", {
105
+ }, [this.intl.formatDate(n.zonedStart, "EEEE")]), t("span", {
93
106
  class: "k-scheduler-agendadate"
94
- }, [this.intl.formatDate(a.zonedStart, "y")])])]
107
+ }, [this.intl.formatDate(n.zonedStart, "y")])])]
95
108
  }), t("div", {
96
109
  class: "k-scheduler-cell k-group-content"
97
- }, [this.hasMounted && a.items.length ? a.items.map(function(e, l) {
110
+ }, [this.hasMounted && n.items.length ? n.items.map(function(e, o) {
98
111
  return t("div", {
99
112
  class: "k-scheduler-row",
100
- key: l
113
+ key: o
101
114
  }, [t("div", {
102
115
  class: "k-scheduler-cell k-scheduler-timecolumn"
103
116
  }, [t("div", null, [e.tail && t(u, {
104
117
  name: this.ks.isRtl ? "chevron-right" : "chevron-left",
105
- icon: this.ks.isRtl ? h : p
106
- }, null), e.isAllDay ? o.toLanguageString(i, d[i]) : z(this.intl, e), e.head && t(u, {
118
+ icon: this.ks.isRtl ? h : k
119
+ }, null), e.isAllDay ? s.toLanguageString(i, d[i]) : b(this.intl, e), e.head && t(u, {
107
120
  name: this.ks.isRtl ? "chevron-left" : "chevron-right",
108
- icon: this.ks.isRtl ? p : h
121
+ icon: this.ks.isRtl ? k : h
109
122
  }, null)])]), t("div", {
110
123
  class: "k-scheduler-cell"
111
- }, [t(n, {
112
- key: `${s}:${l}`,
124
+ }, [t(r, {
125
+ key: `${l}:${o}`,
113
126
  uid: e.uid,
114
127
  start: e.start,
115
128
  end: e.end,
@@ -142,18 +155,18 @@ const b = /* @__PURE__ */ k({
142
155
  }, null)])]);
143
156
  }, this) : t("div", {
144
157
  class: "k-scheduler-cell k-heading-cell k-group-cell"
145
- }, [o.toLanguageString(c, d[c])])])]);
158
+ }, [s.toLanguageString(c, d[c])])])]);
146
159
  }, this)]);
147
160
  },
148
161
  methods: {
149
- handleDataAction(r) {
150
- this.$emit("dataaction", r);
162
+ handleDataAction(a) {
163
+ this.$emit("dataaction", a);
151
164
  }
152
165
  }
153
- }), z = (r, n) => {
154
- let o = "{0:t}-{1:t}";
155
- return n.head ? o = "{0:t}" : n.tail && (o = "{1:t}"), r.format(o, n.zonedStart, n.zonedEnd);
166
+ }), b = (a, r) => {
167
+ let s = "{0:t}-{1:t}";
168
+ return r.head ? s = "{0:t}" : r.tail && (s = "{1:t}"), a.format(s, r.zonedStart, r.zonedEnd);
156
169
  };
157
170
  export {
158
- b as AgendaViewBody
171
+ M as AgendaViewBody
159
172
  };
@@ -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 l=require("vue"),n=require("@progress/kendo-vue-intl"),e=require("../../messages/main.js"),i=l.defineComponent({name:"KendoAgendaViewHead",props:{monthSlots:Array,dateHeaderCell:[String,Function,Object]},inject:{ri:{default:null},kendoLocalizationService:{default:null},ks:{default:null}},render(){const t=n.provideLocalizationService(this);return l.createVNode("div",{class:"k-scheduler-row",key:this.ri.groupIndex},[l.createVNode("div",{class:"k-scheduler-cell k-heading-cell k-group-cell k-scheduler-datecolumn"},[t.toLanguageString(e.dateTitle,e.messages[e.dateTitle])]),l.createVNode("div",{class:"k-scheduler-cell k-heading-cell k-group-cell k-scheduler-timecolumn"},[t.toLanguageString(e.timeTitle,e.messages[e.timeTitle])]),l.createVNode("div",{class:"k-scheduler-cell k-heading-cell k-scheduler-eventcolumn"},[t.toLanguageString(e.eventTitle,e.messages[e.eventTitle])])])}});exports.AgendaViewHead=i;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),n=require("@progress/kendo-vue-intl"),e=require("../../messages/main.js"),o=l.defineComponent({name:"KendoAgendaViewHead",props:{monthSlots:Array,dateHeaderCell:[String,Function,Object]},inject:{ri:{default:null},kendoLocalizationService:{default:null},ks:{default:null},ksMobile:{default:()=>()=>!1}},render(){const t=n.provideLocalizationService(this),i=(typeof this.ksMobile=="function"?this.ksMobile():!1)?"k-scheduler-row k-mobile-header":"k-scheduler-row";return l.createVNode("div",{class:i,key:this.ri.groupIndex},[l.createVNode("div",{class:"k-scheduler-cell k-heading-cell k-group-cell k-scheduler-datecolumn"},[t.toLanguageString(e.dateTitle,e.messages[e.dateTitle])]),l.createVNode("div",{class:"k-scheduler-cell k-heading-cell k-group-cell k-scheduler-timecolumn"},[t.toLanguageString(e.timeTitle,e.messages[e.timeTitle])]),l.createVNode("div",{class:"k-scheduler-cell k-heading-cell k-scheduler-eventcolumn"},[t.toLanguageString(e.eventTitle,e.messages[e.eventTitle])])])}});exports.AgendaViewHead=o;
@@ -5,10 +5,10 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { defineComponent as o, createVNode as e } from "vue";
9
- import { provideLocalizationService as a } from "@progress/kendo-vue-intl";
10
- import { dateTitle as n, messages as t, timeTitle as i, eventTitle as r } from "../../messages/main.mjs";
11
- const u = /* @__PURE__ */ o({
8
+ import { defineComponent as a, createVNode as e } from "vue";
9
+ import { provideLocalizationService as s } from "@progress/kendo-vue-intl";
10
+ import { dateTitle as o, messages as i, timeTitle as t, eventTitle as n } from "../../messages/main.mjs";
11
+ const g = /* @__PURE__ */ a({
12
12
  name: "KendoAgendaViewHead",
13
13
  props: {
14
14
  monthSlots: Array,
@@ -23,22 +23,25 @@ const u = /* @__PURE__ */ o({
23
23
  },
24
24
  ks: {
25
25
  default: null
26
+ },
27
+ ksMobile: {
28
+ default: () => () => !1
26
29
  }
27
30
  },
28
31
  render() {
29
- const l = a(this);
32
+ const l = s(this), r = (typeof this.ksMobile == "function" ? this.ksMobile() : !1) ? "k-scheduler-row k-mobile-header" : "k-scheduler-row";
30
33
  return e("div", {
31
- class: "k-scheduler-row",
34
+ class: r,
32
35
  key: this.ri.groupIndex
33
36
  }, [e("div", {
34
37
  class: "k-scheduler-cell k-heading-cell k-group-cell k-scheduler-datecolumn"
35
- }, [l.toLanguageString(n, t[n])]), e("div", {
38
+ }, [l.toLanguageString(o, i[o])]), e("div", {
36
39
  class: "k-scheduler-cell k-heading-cell k-group-cell k-scheduler-timecolumn"
37
- }, [l.toLanguageString(i, t[i])]), e("div", {
40
+ }, [l.toLanguageString(t, i[t])]), e("div", {
38
41
  class: "k-scheduler-cell k-heading-cell k-scheduler-eventcolumn"
39
- }, [l.toLanguageString(r, t[r])])]);
42
+ }, [l.toLanguageString(n, i[n])])]);
40
43
  }
41
44
  });
42
45
  export {
43
- u as AgendaViewHead
46
+ g as AgendaViewHead
44
47
  };
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),n=require("../../components/DateHeaderCell.js"),r=require("@progress/kendo-date-math"),d=t.defineComponent({name:"KendoDayViewHead",props:{timeRanges:Array,dateHeaderCell:[String,Function,Object]},inject:{ri:{default:null},ks:{default:null}},render(){return t.createVNode("div",{class:"k-scheduler-row",key:this.ri.groupIndex},[this.timeRanges.map(function(e,a){return t.createVNode(n.DateHeaderCell,{as:this.$props.dateHeaderCell,key:a,date:r.ZonedDate.fromLocalDate(new Date(e.zonedEnd.getTime()-(e.zonedEnd.getTime()-e.zonedStart.getTime())/2),this.ks.timezone),start:e.start,end:e.end,format:{skeleton:"MEd"}},null)},this)])}});exports.DayViewHead=d;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),i=require("../../components/DateHeaderCell.js"),n=require("@progress/kendo-date-math"),r=t.defineComponent({name:"KendoDayViewHead",props:{timeRanges:Array,dateHeaderCell:[String,Function,Object]},inject:{ri:{default:null},ks:{default:null},ksMobile:{default:()=>()=>!1}},render(){const o=(typeof this.ksMobile=="function"?this.ksMobile():!1)?"k-scheduler-row k-mobile-header k-mobile-horizontal-header":"k-scheduler-row";return t.createVNode("div",{class:o,key:this.ri.groupIndex},[this.timeRanges.map(function(e,a){return t.createVNode(i.DateHeaderCell,{as:this.$props.dateHeaderCell,key:a,date:n.ZonedDate.fromLocalDate(new Date(e.zonedEnd.getTime()-(e.zonedEnd.getTime()-e.zonedStart.getTime())/2),this.ks.timezone),start:e.start,end:e.end,format:{skeleton:"MEd"}},null)},this)])}});exports.DayViewHead=r;
@@ -6,9 +6,9 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  import { defineComponent as r, createVNode as t } from "vue";
9
- import { DateHeaderCell as o } from "../../components/DateHeaderCell.mjs";
10
- import { ZonedDate as d } from "@progress/kendo-date-math";
11
- const l = /* @__PURE__ */ r({
9
+ import { DateHeaderCell as n } from "../../components/DateHeaderCell.mjs";
10
+ import { ZonedDate as s } from "@progress/kendo-date-math";
11
+ const f = /* @__PURE__ */ r({
12
12
  name: "KendoDayViewHead",
13
13
  props: {
14
14
  timeRanges: Array,
@@ -20,17 +20,21 @@ const l = /* @__PURE__ */ r({
20
20
  },
21
21
  ks: {
22
22
  default: null
23
+ },
24
+ ksMobile: {
25
+ default: () => () => !1
23
26
  }
24
27
  },
25
28
  render() {
29
+ const o = (typeof this.ksMobile == "function" ? this.ksMobile() : !1) ? "k-scheduler-row k-mobile-header k-mobile-horizontal-header" : "k-scheduler-row";
26
30
  return t("div", {
27
- class: "k-scheduler-row",
31
+ class: o,
28
32
  key: this.ri.groupIndex
29
- }, [this.timeRanges.map(function(e, n) {
30
- return t(o, {
33
+ }, [this.timeRanges.map(function(e, i) {
34
+ return t(n, {
31
35
  as: this.$props.dateHeaderCell,
32
- key: n,
33
- date: d.fromLocalDate(new Date(e.zonedEnd.getTime() - (e.zonedEnd.getTime() - e.zonedStart.getTime()) / 2), this.ks.timezone),
36
+ key: i,
37
+ date: s.fromLocalDate(new Date(e.zonedEnd.getTime() - (e.zonedEnd.getTime() - e.zonedStart.getTime()) / 2), this.ks.timezone),
34
38
  start: e.start,
35
39
  end: e.end,
36
40
  format: {
@@ -41,5 +45,5 @@ const l = /* @__PURE__ */ r({
41
45
  }
42
46
  });
43
47
  export {
44
- l as DayViewHead
48
+ f as DayViewHead
45
49
  };
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),y=require("../../components/BaseView.js"),s=require("@progress/kendo-date-math"),g=require("../common/VerticalResourceIterator.js"),I=require("../common/HorizontalResourceIterator.js"),a=require("../../utils/main.js"),p=require("../../messages/main.js"),R=require("../../slots/SchedulerEditSlot.js"),m=require("@progress/kendo-vue-intl"),z=require("../../constants/main.js"),$=require("../../services/rangeService.js"),v=require("../../services/slotsService.js"),k=require("../../services/occurrenceService.js"),V=require("../../services/itemsService.js"),S=require("./MonthViewHead.js"),b=require("./MonthViewBody.js"),w=require("../../items/SchedulerEditItem.js"),f=require("../common/SchedulerResize.js"),D=require("../common/SchedulerDrag.js"),N=t.defineComponent({name:"KendoMonthView",props:{itemsPerSlot:{type:Number,default:2},name:{type:String,default:"month"},dateRange:{type:[Function,Object],default:function(){return q}},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:{}},kendoLocalizationService:{default:null},kendoIntlService:{default:null}},created(){this.intl=m.provideIntlService(this)},mounted(){this.hasMounted=!0},data(){return{hasMounted:!1,currentDragItem:void 0,currentResizeItem:void 0}},computed:{ranges(){return $.toRanges(this.ks.dateRange,{step:s.MS_PER_DAY*z.DAYS_IN_WEEK_COUNT,timezone:this.ks.timezone})},monthSlots(){return v.toSlots(this.ks.dateRange,{step:s.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 r=V.toItems(this.occurrences,{timezone:this.ks.timezone},{groups:this.ks.groups,ranges:this.ranges});return a.mapItemsToSlots(r,this.monthSlots,!0),a.mapSlotsToItems(r,this.monthSlots,!0),r},compDragItem(){return this.dragItem!==void 0?this.dragItem:this.currentDragItem},compResizeItem(){return this.resizeItem!==void 0?this.resizeItem:this.currentResizeItem}},render(){this.localization=m.provideLocalizationService(this),this.localization.toLanguageString(p.monthViewTitle,p.messages[p.monthViewTitle]);const r=this.$props.editItem||w.SchedulerEditItem;this.$props.editSlot||R.SchedulerEditSlot;const c=this.items,o=this.monthSlots,d=function(e){return this.compDragItem&&this.$props.editable.drag&&(Array.isArray(this.compDragItem)?this.compDragItem.map(function(i,h){return t.createVNode(D.SchedulerDrag,{key:h,ignoreIsAllDay:!0,dataItem:i,vertical:e,item:this.$props.dataItem},null)},this):t.createVNode(D.SchedulerDrag,{ignoreIsAllDay:!0,dataItem:this.compDragItem,vertical:e,item:this.$props.dataItem},null))},u=function(e){return this.compResizeItem&&this.editable.resize&&(Array.isArray(this.compResizeItem)?this.compResizeItem.map(function(i,h){return t.createVNode(f.SchedulerResize,{key:h,format:this.$props.format,ignoreIsAllDay:!0,dataItem:i,viewItem:this.$props.viewItem,item:this.$props.item,vertical:e},null)},this):t.createVNode(f.SchedulerResize,{format:this.$props.format,ignoreIsAllDay:!0,dataItem:this.compResizeItem,viewItem:this.$props.viewItem,item:this.$props.item,vertical:e},null))};this.intl=m.provideIntlService(this);const n=this.$props.itemsPerSlot,l=this.ks.orientation==="horizontal"?this.ranges.map(function(e,i){return t.createVNode(I.HorizontalResourceIterator,{resources:this.ks.props.resources,group:this.ks.props.group},{default:()=>[t.createVNode(b.MonthViewBody,{editable:this.$props.editable,slotRender:this.$props.slotRender,viewSlot:this.$props.viewSlot,monthSlots:o,rangeIndex:i,itemsPerSlot:n,onDataaction:this.handleDataAction},null)]})},this):t.createVNode(g.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:n,editable:this.$props.editable}},null);return t.createVNode(y.BaseView,{viewProps:{...this.$props},baseSlots:o,ranges:this.ranges,class:"k-scheduler-monthview"},{default:()=>[t.createVNode("div",{class:"k-scheduler-head"},[this.ks.orientation==="horizontal"?t.createVNode(I.HorizontalResourceIterator,{nested:!0,resources:this.ks.props.resources,group:this.ks.props.group},{default:()=>[t.createVNode(S.MonthViewHead,{monthSlots:o,dateHeaderCell:this.$props.dateHeaderCell},null)]}):t.createVNode(g.VerticalResourceIterator,{resources:this.ks.props.resources,group:this.ks.props.group},{default:()=>[t.createVNode(S.MonthViewHead,{monthSlots:o,dateHeaderCell:this.$props.dateHeaderCell},null)]})]),t.createVNode("div",{class:"k-scheduler-body"},[l,this.hasMounted&&c.filter(e=>e.order===null||e.order<n).sort(a.orderSort).map(function(e){return t.createVNode(r,{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,onDragitemchange:this.handleDragItemChange,onResizeitemchange:this.handleResizeItemChange,onDataaction:this.handleDataAction,itemStyle:{transform:"translateY(30px)"},vertical:!1,editable:this.$props.editable,ignoreIsAllDay:!0},null)},this),this.compDragItem&&d.call(this,!1),this.compResizeItem&&u.call(this,!1)])]})},methods:{handleDataAction(r){this.$emit("dataaction",r)},handleDragItemChange(r){this.currentDragItem=r},handleResizeItemChange(r){this.currentResizeItem=r}}}),q=({intl:r,date:c,timezone:o})=>{const d=s.firstDayInWeek(s.firstDayOfMonth(s.getDate(c)),r.firstDay()),u=s.addDays(s.firstDayInWeek(s.lastDayOfMonth(s.getDate(c)),r.firstDay()),z.DAYS_IN_WEEK_COUNT),n=s.ZonedDate.fromUTCDate(a.toUTCDateTime(d),o),l=s.ZonedDate.fromUTCDate(a.toUTCDateTime(u),o),e=new Date(n.getTime()),i=new Date(l.getTime());return{start:e,end:i,zonedStart:n,zonedEnd:l}};exports.MonthView=N;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),R=require("../../components/BaseView.js"),s=require("@progress/kendo-date-math"),g=require("../common/VerticalResourceIterator.js"),I=require("../common/HorizontalResourceIterator.js"),a=require("../../utils/main.js"),p=require("../../messages/main.js"),y=require("../../slots/SchedulerEditSlot.js"),m=require("@progress/kendo-vue-intl"),z=require("../../constants/main.js"),$=require("../../services/rangeService.js"),v=require("../../services/slotsService.js"),k=require("../../services/occurrenceService.js"),V=require("../../services/itemsService.js"),S=require("./MonthViewHead.js"),b=require("./MonthViewBody.js"),w=require("../../items/SchedulerEditItem.js"),f=require("../common/SchedulerResize.js"),D=require("../common/SchedulerDrag.js"),N=t.defineComponent({name:"KendoMonthView",props:{itemsPerSlot:{type:Number,default:2},name:{type:String,default:"month"},dateRange:{type:[Function,Object],default:function(){return q}},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:{}},kendoLocalizationService:{default:null},kendoIntlService:{default:null}},created(){this.intl=m.provideIntlService(this)},mounted(){this.hasMounted=!0},data(){return{hasMounted:!1,currentDragItem:void 0,currentResizeItem:void 0}},computed:{ranges(){return $.toRanges(this.ks.dateRange,{step:s.MS_PER_DAY*z.DAYS_IN_WEEK_COUNT,timezone:this.ks.timezone})},monthSlots(){return v.toSlots(this.ks.dateRange,{step:s.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 r=V.toItems(this.occurrences,{timezone:this.ks.timezone},{groups:this.ks.groups,ranges:this.ranges});return a.mapItemsToSlots(r,this.monthSlots,!0),a.mapSlotsToItems(r,this.monthSlots,!0),r},compDragItem(){return this.dragItem!==void 0?this.dragItem:this.currentDragItem},compResizeItem(){return this.resizeItem!==void 0?this.resizeItem:this.currentResizeItem}},render(){this.localization=m.provideLocalizationService(this),this.localization.toLanguageString(p.monthViewTitle,p.messages[p.monthViewTitle]);const r=this.$props.editItem||w.SchedulerEditItem;this.$props.editSlot||y.SchedulerEditSlot;const c=this.items,o=this.monthSlots,l=function(e){return this.compDragItem&&this.$props.editable.drag&&(Array.isArray(this.compDragItem)?this.compDragItem.map(function(i,h){return t.createVNode(D.SchedulerDrag,{key:h,ignoreIsAllDay:!0,dataItem:i,vertical:e,item:this.$props.dataItem},null)},this):t.createVNode(D.SchedulerDrag,{ignoreIsAllDay:!0,dataItem:this.compDragItem,vertical:e,item:this.$props.dataItem},null))},u=function(e){return this.compResizeItem&&this.editable.resize&&(Array.isArray(this.compResizeItem)?this.compResizeItem.map(function(i,h){return t.createVNode(f.SchedulerResize,{key:h,format:this.$props.format,ignoreIsAllDay:!0,dataItem:i,viewItem:this.$props.viewItem,item:this.$props.item,vertical:e},null)},this):t.createVNode(f.SchedulerResize,{format:this.$props.format,ignoreIsAllDay:!0,dataItem:this.compResizeItem,viewItem:this.$props.viewItem,item:this.$props.item,vertical:e},null))};this.intl=m.provideIntlService(this);const n=this.$props.itemsPerSlot,d=this.ks.orientation==="horizontal"?this.ranges.map(function(e,i){return t.createVNode(I.HorizontalResourceIterator,{resources:this.ks.props.resources,group:this.ks.props.group},{default:()=>[t.createVNode(b.MonthViewBody,{editable:this.$props.editable,slotRender:this.$props.slotRender,viewSlot:this.$props.viewSlot,monthSlots:o,rangeIndex:i,itemsPerSlot:n,onDataaction:this.handleDataAction},null)]})},this):t.createVNode(g.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:n,editable:this.$props.editable}},null);return t.createVNode(R.BaseView,{viewProps:{...this.$props},baseSlots:o,ranges:this.ranges,class:"k-scheduler-monthview"},{default:()=>[t.createVNode("div",{class:"k-scheduler-head"},[this.ks.orientation==="horizontal"?t.createVNode(I.HorizontalResourceIterator,{nested:!0,resources:this.ks.props.resources,group:this.ks.props.group},{default:()=>[t.createVNode(S.MonthViewHead,{monthSlots:o,dateHeaderCell:this.$props.dateHeaderCell},null)]}):t.createVNode(g.VerticalResourceIterator,{resources:this.ks.props.resources,group:this.ks.props.group},{default:()=>[t.createVNode(S.MonthViewHead,{monthSlots:o,dateHeaderCell:this.$props.dateHeaderCell},null)]})]),t.createVNode("div",{class:"k-scheduler-body"},[d,this.hasMounted&&c.filter(e=>e.order===null||e.order<n).sort(a.orderSort).map(function(e){return t.createVNode(r,{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,onDragitemchange:this.handleDragItemChange,onResizeitemchange:this.handleResizeItemChange,onDataaction:this.handleDataAction,vertical:!1,editable:this.$props.editable,ignoreIsAllDay:!0},null)},this),this.compDragItem&&l.call(this,!1),this.compResizeItem&&u.call(this,!1)])]})},methods:{handleDataAction(r){this.$emit("dataaction",r)},handleDragItemChange(r){this.currentDragItem=r},handleResizeItemChange(r){this.currentResizeItem=r}}}),q=({intl:r,date:c,timezone:o})=>{const l=s.firstDayInWeek(s.firstDayOfMonth(s.getDate(c)),r.firstDay()),u=s.addDays(s.firstDayInWeek(s.lastDayOfMonth(s.getDate(c)),r.firstDay()),z.DAYS_IN_WEEK_COUNT),n=s.ZonedDate.fromUTCDate(a.toUTCDateTime(l),o),d=s.ZonedDate.fromUTCDate(a.toUTCDateTime(u),o),e=new Date(n.getTime()),i=new Date(d.getTime());return{start:e,end:i,zonedStart:n,zonedEnd:d}};exports.MonthView=N;
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import { defineComponent as k, createVNode as t } from "vue";
9
9
  import { BaseView as b } from "../../components/BaseView.mjs";
10
- import { firstDayInWeek as m, firstDayOfMonth as v, getDate as p, addDays as w, lastDayOfMonth as A, ZonedDate as c, MS_PER_DAY as h } from "@progress/kendo-date-math";
10
+ import { firstDayInWeek as c, firstDayOfMonth as v, getDate as m, addDays as w, lastDayOfMonth as A, ZonedDate as p, MS_PER_DAY as h } from "@progress/kendo-date-math";
11
11
  import { VerticalResourceIterator as g } from "../common/VerticalResourceIterator.mjs";
12
12
  import { HorizontalResourceIterator as f } from "../common/HorizontalResourceIterator.mjs";
13
13
  import { orderSort as C, mapItemsToSlots as O, mapSlotsToItems as T, toUTCDateTime as I } from "../../utils/main.mjs";
@@ -277,9 +277,6 @@ const ae = /* @__PURE__ */ k({
277
277
  onDragitemchange: this.handleDragItemChange,
278
278
  onResizeitemchange: this.handleResizeItemChange,
279
279
  onDataaction: this.handleDataAction,
280
- itemStyle: {
281
- transform: "translateY(30px)"
282
- },
283
280
  vertical: !1,
284
281
  editable: this.$props.editable,
285
282
  ignoreIsAllDay: !0
@@ -303,7 +300,7 @@ const ae = /* @__PURE__ */ k({
303
300
  date: n,
304
301
  timezone: s
305
302
  }) => {
306
- const l = m(v(p(n)), r.firstDay()), d = w(m(A(p(n)), r.firstDay()), $), i = c.fromUTCDate(I(l), s), a = c.fromUTCDate(I(d), s), e = new Date(i.getTime()), o = new Date(a.getTime());
303
+ const l = c(v(m(n)), r.firstDay()), d = w(c(A(m(n)), r.firstDay()), $), i = p.fromUTCDate(I(l), s), a = p.fromUTCDate(I(d), s), e = new Date(i.getTime()), o = new Date(a.getTime());
307
304
  return {
308
305
  start: e,
309
306
  end: o,
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),n=require("../../components/DateHeaderCell.js"),o=require("@progress/kendo-date-math"),d=t.defineComponent({name:"KendoMonthViewHead",props:{monthSlots:Array,dateHeaderCell:[String,Function,Object]},inject:{ri:{default:null},ks:{default:null}},provide(){return{ksSlots:this.ksSlots}},data(){return{ksSlots:{cSlots:this.monthSlots.filter(e=>e.group.index===this.ri.groupIndex&&e.range.index===0)}}},watch:{currentCellSlots(e){this.ksSlots.cSlots=e}},computed:{currentCellSlots(){return this.monthSlots.filter(e=>e.group.index===this.ri.groupIndex&&e.range.index===0)}},render(){return t.createVNode("div",{class:"k-scheduler-row",key:this.ri.groupIndex},[this.currentCellSlots.map(function(e,r){return t.createVNode(n.DateHeaderCell,{as:this.$props.dateHeaderCell,key:r,"data-dayslot-index":r,date:o.ZonedDate.fromLocalDate(new Date(e.zonedEnd.getTime()-(e.zonedEnd.getTime()-e.zonedStart.getTime())/2),this.ks.timezone),start:e.start,end:e.end,format:{skeleton:"EEEE"}},null)},this)])}});exports.MonthViewHead=d;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue"),i=require("../../components/DateHeaderCell.js"),s=require("@progress/kendo-date-math"),l=r.defineComponent({name:"KendoMonthViewHead",props:{monthSlots:Array,dateHeaderCell:[String,Function,Object]},inject:{ri:{default:null},ks:{default:null},ksMobile:{default:()=>()=>!1}},provide(){return{ksSlots:this.ksSlots}},data(){return{ksSlots:{cSlots:this.monthSlots.filter(e=>e.group.index===this.ri.groupIndex&&e.range.index===0)}}},watch:{currentCellSlots(e){this.ksSlots.cSlots=e}},computed:{currentCellSlots(){return this.monthSlots.filter(e=>e.group.index===this.ri.groupIndex&&e.range.index===0)}},render(){const o=(typeof this.ksMobile=="function"?this.ksMobile():!1)?"k-scheduler-row k-mobile-header":"k-scheduler-row";return r.createVNode("div",{class:o,key:this.ri.groupIndex},[this.currentCellSlots.map(function(t,n){return r.createVNode(i.DateHeaderCell,{as:this.$props.dateHeaderCell,key:n,"data-dayslot-index":n,date:s.ZonedDate.fromLocalDate(new Date(t.zonedEnd.getTime()-(t.zonedEnd.getTime()-t.zonedStart.getTime())/2),this.ks.timezone),start:t.start,end:t.end,format:{skeleton:"EEEE"}},null)},this)])}});exports.MonthViewHead=l;
@@ -5,10 +5,10 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { defineComponent as n, createVNode as r } from "vue";
9
- import { DateHeaderCell as o } from "../../components/DateHeaderCell.mjs";
10
- import { ZonedDate as i } from "@progress/kendo-date-math";
11
- const l = /* @__PURE__ */ n({
8
+ import { defineComponent as i, createVNode as o } from "vue";
9
+ import { DateHeaderCell as s } from "../../components/DateHeaderCell.mjs";
10
+ import { ZonedDate as l } from "@progress/kendo-date-math";
11
+ const h = /* @__PURE__ */ i({
12
12
  name: "KendoMonthViewHead",
13
13
  props: {
14
14
  monthSlots: Array,
@@ -20,6 +20,9 @@ const l = /* @__PURE__ */ n({
20
20
  },
21
21
  ks: {
22
22
  default: null
23
+ },
24
+ ksMobile: {
25
+ default: () => () => !1
23
26
  }
24
27
  },
25
28
  provide() {
@@ -45,17 +48,18 @@ const l = /* @__PURE__ */ n({
45
48
  }
46
49
  },
47
50
  render() {
48
- return r("div", {
49
- class: "k-scheduler-row",
51
+ const n = (typeof this.ksMobile == "function" ? this.ksMobile() : !1) ? "k-scheduler-row k-mobile-header" : "k-scheduler-row";
52
+ return o("div", {
53
+ class: n,
50
54
  key: this.ri.groupIndex
51
- }, [this.currentCellSlots.map(function(e, t) {
52
- return r(o, {
55
+ }, [this.currentCellSlots.map(function(t, r) {
56
+ return o(s, {
53
57
  as: this.$props.dateHeaderCell,
54
- key: t,
55
- "data-dayslot-index": t,
56
- date: i.fromLocalDate(new Date(e.zonedEnd.getTime() - (e.zonedEnd.getTime() - e.zonedStart.getTime()) / 2), this.ks.timezone),
57
- start: e.start,
58
- end: e.end,
58
+ key: r,
59
+ "data-dayslot-index": r,
60
+ date: l.fromLocalDate(new Date(t.zonedEnd.getTime() - (t.zonedEnd.getTime() - t.zonedStart.getTime()) / 2), this.ks.timezone),
61
+ start: t.start,
62
+ end: t.end,
59
63
  format: {
60
64
  skeleton: "EEEE"
61
65
  }
@@ -64,5 +68,5 @@ const l = /* @__PURE__ */ n({
64
68
  }
65
69
  });
66
70
  export {
67
- l as MonthViewHead
71
+ h as MonthViewHead
68
72
  };