@progress/kendo-react-scheduler 8.1.0-develop.21 → 8.1.0-develop.23

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/index.d.mts CHANGED
@@ -65,8 +65,9 @@ export declare const agendaViewDefaultProps: {
65
65
  */
66
66
  export declare interface AgendaViewProps extends SchedulerViewProps {
67
67
  /**
68
- * The number of steps (in days) to change, when using the back and forwards buttons in the toolbar navigation.
69
- * The default value is 7 days.
68
+ * Specifies the step by which the currently rendered days will be changed, when using the back and forwards buttons in the toolbar navigation. This property can be combined with the `numberOfDays` property.
69
+ *
70
+ * The default value is 1 meaning that with the default values of `numberOfDays` and `step`, the view will change by seven days. If the `numberOfDays` is set to 2 and the `step` is set to 2, the view will change by 4 days.
70
71
  */
71
72
  step?: number;
72
73
  /**
@@ -475,6 +476,7 @@ export declare const monthViewDefaultProps: {
475
476
  slotDivision: number;
476
477
  itemsPerSlot: number;
477
478
  numberOfDays: number;
479
+ step: number;
478
480
  title: (localization: any) => any;
479
481
  selectedDateFormat: string;
480
482
  selectedShortDateFormat: string;
@@ -483,7 +485,12 @@ export declare const monthViewDefaultProps: {
483
485
  /**
484
486
  * Represents the props of the KendoReact [MonthView]({% slug api_scheduler_monthview %}) Component.
485
487
  */
486
- export declare interface MonthViewProps extends SchedulerViewProps {
488
+ export declare interface MonthViewProps extends Omit<SchedulerViewProps, 'numberOfDays'> {
489
+ /**
490
+ * Specifies the number of months that will be changed, when using the back and forwards buttons in the toolbar navigation.
491
+ * The default value is 1 meaning that the view will change by one month.
492
+ */
493
+ step?: number;
487
494
  /**
488
495
  * Sets the maximum number of `items` to be rendered in a single `slot`, before adding the `show-more` button.
489
496
  */
@@ -554,8 +561,9 @@ export declare interface MonthViewProps extends SchedulerViewProps {
554
561
  */
555
562
  declare interface MultiDayTimelineViewProps extends SchedulerViewProps {
556
563
  /**
557
- * The number of steps (in days) to change, when using the back and forwards buttons in the toolbar navigation.
558
- * The default value is 1 days.
564
+ * Specifies the step by which the currently rendered days will be changed, when using the back and forwards buttons in the toolbar navigation. This property can be combined with the `numberOfDays` property.
565
+ *
566
+ * The default value is 1 meaning that with the default values of `numberOfDays` and `step`, the view will change by one day. If the `step` is set to 2 and the `numberOfDays` is set to 1, the view will change by two days. If the `step` is set to 2 and the `numberOfDays` is set to 2, the view will change by four days.
559
567
  */
560
568
  step?: number;
561
569
  /**
@@ -726,8 +734,9 @@ declare interface MultiDayViewProps extends SchedulerViewProps {
726
734
  */
727
735
  endTime?: string;
728
736
  /**
729
- * The number of steps (in days) to change, when using the back and forwards buttons in the toolbar navigation.
730
- * The default value is 1 days.
737
+ * Specifies the step by which the currently rendered days will be changed, when using the back and forwards buttons in the toolbar navigation. This property can be combined with the `numberOfDays` property.
738
+ *
739
+ * The default value is 1 meaning that with the default values of `numberOfDays` and `step`, the view will change by one day. If the `step` is set to 2 and the `numberOfDays` is set to 1, the view will change by two days. If the `numberOfDays` is set to 2 and the `step` is set to 2, the view will change by four days.
731
740
  */
732
741
  step?: number;
733
742
  /**
@@ -3632,6 +3641,8 @@ export declare interface SchedulerViewProps {
3632
3641
  workWeekStart?: Day;
3633
3642
  /** @hidden */
3634
3643
  workWeekEnd?: Day;
3644
+ /** @hidden */
3645
+ step?: number;
3635
3646
  }
3636
3647
 
3637
3648
  /**
@@ -4134,6 +4145,7 @@ export declare const weekViewDefaultProps: {
4134
4145
  slotDuration: number;
4135
4146
  slotDivisions: number;
4136
4147
  numberOfDays: number;
4148
+ step: number;
4137
4149
  dateRange: ({ intl, date, timezone }: SchedulerViewDateRangeArgs) => DateRange;
4138
4150
  title: (localization: any) => any;
4139
4151
  selectedDateFormat: string;
@@ -4143,7 +4155,12 @@ export declare const weekViewDefaultProps: {
4143
4155
  /**
4144
4156
  * Represents the properties of the KendoReact [WeekView]({% slug api_scheduler_weekview %}) Component.
4145
4157
  */
4146
- export declare interface WeekViewProps extends MultiDayViewProps {
4158
+ export declare interface WeekViewProps extends Omit<MultiDayViewProps, 'numberOfDays'> {
4159
+ /**
4160
+ * Specifies the number of weeks that will be changed, when using the back and forwards buttons in the toolbar navigation.
4161
+ * The default value is 1 meaning that the view will change by one week.
4162
+ */
4163
+ step?: number;
4147
4164
  /**
4148
4165
  * The long-date format for displaying the
4149
4166
  * selected date in the Scheduler toolbar.
@@ -4230,6 +4247,7 @@ export declare const workWeekDefaultProps: {
4230
4247
  slotDuration: number;
4231
4248
  slotDivisions: number;
4232
4249
  numberOfDays: number;
4250
+ step: number;
4233
4251
  dateRange: ({ intl, date, timezone, ...other }: SchedulerViewDateRangeArgs) => DateRange;
4234
4252
  title: (localization: any) => any;
4235
4253
  workWeekStart: Day;
package/index.d.ts CHANGED
@@ -65,8 +65,9 @@ export declare const agendaViewDefaultProps: {
65
65
  */
66
66
  export declare interface AgendaViewProps extends SchedulerViewProps {
67
67
  /**
68
- * The number of steps (in days) to change, when using the back and forwards buttons in the toolbar navigation.
69
- * The default value is 7 days.
68
+ * Specifies the step by which the currently rendered days will be changed, when using the back and forwards buttons in the toolbar navigation. This property can be combined with the `numberOfDays` property.
69
+ *
70
+ * The default value is 1 meaning that with the default values of `numberOfDays` and `step`, the view will change by seven days. If the `numberOfDays` is set to 2 and the `step` is set to 2, the view will change by 4 days.
70
71
  */
71
72
  step?: number;
72
73
  /**
@@ -475,6 +476,7 @@ export declare const monthViewDefaultProps: {
475
476
  slotDivision: number;
476
477
  itemsPerSlot: number;
477
478
  numberOfDays: number;
479
+ step: number;
478
480
  title: (localization: any) => any;
479
481
  selectedDateFormat: string;
480
482
  selectedShortDateFormat: string;
@@ -483,7 +485,12 @@ export declare const monthViewDefaultProps: {
483
485
  /**
484
486
  * Represents the props of the KendoReact [MonthView]({% slug api_scheduler_monthview %}) Component.
485
487
  */
486
- export declare interface MonthViewProps extends SchedulerViewProps {
488
+ export declare interface MonthViewProps extends Omit<SchedulerViewProps, 'numberOfDays'> {
489
+ /**
490
+ * Specifies the number of months that will be changed, when using the back and forwards buttons in the toolbar navigation.
491
+ * The default value is 1 meaning that the view will change by one month.
492
+ */
493
+ step?: number;
487
494
  /**
488
495
  * Sets the maximum number of `items` to be rendered in a single `slot`, before adding the `show-more` button.
489
496
  */
@@ -554,8 +561,9 @@ export declare interface MonthViewProps extends SchedulerViewProps {
554
561
  */
555
562
  declare interface MultiDayTimelineViewProps extends SchedulerViewProps {
556
563
  /**
557
- * The number of steps (in days) to change, when using the back and forwards buttons in the toolbar navigation.
558
- * The default value is 1 days.
564
+ * Specifies the step by which the currently rendered days will be changed, when using the back and forwards buttons in the toolbar navigation. This property can be combined with the `numberOfDays` property.
565
+ *
566
+ * The default value is 1 meaning that with the default values of `numberOfDays` and `step`, the view will change by one day. If the `step` is set to 2 and the `numberOfDays` is set to 1, the view will change by two days. If the `step` is set to 2 and the `numberOfDays` is set to 2, the view will change by four days.
559
567
  */
560
568
  step?: number;
561
569
  /**
@@ -726,8 +734,9 @@ declare interface MultiDayViewProps extends SchedulerViewProps {
726
734
  */
727
735
  endTime?: string;
728
736
  /**
729
- * The number of steps (in days) to change, when using the back and forwards buttons in the toolbar navigation.
730
- * The default value is 1 days.
737
+ * Specifies the step by which the currently rendered days will be changed, when using the back and forwards buttons in the toolbar navigation. This property can be combined with the `numberOfDays` property.
738
+ *
739
+ * The default value is 1 meaning that with the default values of `numberOfDays` and `step`, the view will change by one day. If the `step` is set to 2 and the `numberOfDays` is set to 1, the view will change by two days. If the `numberOfDays` is set to 2 and the `step` is set to 2, the view will change by four days.
731
740
  */
732
741
  step?: number;
733
742
  /**
@@ -3632,6 +3641,8 @@ export declare interface SchedulerViewProps {
3632
3641
  workWeekStart?: Day;
3633
3642
  /** @hidden */
3634
3643
  workWeekEnd?: Day;
3644
+ /** @hidden */
3645
+ step?: number;
3635
3646
  }
3636
3647
 
3637
3648
  /**
@@ -4134,6 +4145,7 @@ export declare const weekViewDefaultProps: {
4134
4145
  slotDuration: number;
4135
4146
  slotDivisions: number;
4136
4147
  numberOfDays: number;
4148
+ step: number;
4137
4149
  dateRange: ({ intl, date, timezone }: SchedulerViewDateRangeArgs) => DateRange;
4138
4150
  title: (localization: any) => any;
4139
4151
  selectedDateFormat: string;
@@ -4143,7 +4155,12 @@ export declare const weekViewDefaultProps: {
4143
4155
  /**
4144
4156
  * Represents the properties of the KendoReact [WeekView]({% slug api_scheduler_weekview %}) Component.
4145
4157
  */
4146
- export declare interface WeekViewProps extends MultiDayViewProps {
4158
+ export declare interface WeekViewProps extends Omit<MultiDayViewProps, 'numberOfDays'> {
4159
+ /**
4160
+ * Specifies the number of weeks that will be changed, when using the back and forwards buttons in the toolbar navigation.
4161
+ * The default value is 1 meaning that the view will change by one week.
4162
+ */
4163
+ step?: number;
4147
4164
  /**
4148
4165
  * The long-date format for displaying the
4149
4166
  * selected date in the Scheduler toolbar.
@@ -4230,6 +4247,7 @@ export declare const workWeekDefaultProps: {
4230
4247
  slotDuration: number;
4231
4248
  slotDivisions: number;
4232
4249
  numberOfDays: number;
4250
+ step: number;
4233
4251
  dateRange: ({ intl, date, timezone, ...other }: SchedulerViewDateRangeArgs) => DateRange;
4234
4252
  title: (localization: any) => any;
4235
4253
  workWeekStart: Day;
@@ -10,7 +10,7 @@ const e = {
10
10
  name: "@progress/kendo-react-scheduler",
11
11
  productName: "KendoReact",
12
12
  productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
13
- publishDate: 1718951068,
13
+ publishDate: 1719228186,
14
14
  version: "",
15
15
  licensingDocsUrl: "https://www.telerik.com/kendo-react-ui"
16
16
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-react-scheduler",
3
- "version": "8.1.0-develop.21",
3
+ "version": "8.1.0-develop.23",
4
4
  "description": "React Scheduler brings the functionality of Outlook's Calendar to a single UI component. KendoReact Scheduler package",
5
5
  "author": "Progress",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -26,15 +26,15 @@
26
26
  "@progress/kendo-date-math": "^1.4.1",
27
27
  "@progress/kendo-drawing": "^1.20.1",
28
28
  "@progress/kendo-licensing": "^1.3.4",
29
- "@progress/kendo-react-buttons": "8.1.0-develop.21",
30
- "@progress/kendo-react-common": "8.1.0-develop.21",
31
- "@progress/kendo-react-dateinputs": "8.1.0-develop.21",
32
- "@progress/kendo-react-dialogs": "8.1.0-develop.21",
33
- "@progress/kendo-react-dropdowns": "8.1.0-develop.21",
34
- "@progress/kendo-react-form": "8.1.0-develop.21",
35
- "@progress/kendo-react-inputs": "8.1.0-develop.21",
36
- "@progress/kendo-react-intl": "8.1.0-develop.21",
37
- "@progress/kendo-react-popup": "8.1.0-develop.21",
29
+ "@progress/kendo-react-buttons": "8.1.0-develop.23",
30
+ "@progress/kendo-react-common": "8.1.0-develop.23",
31
+ "@progress/kendo-react-dateinputs": "8.1.0-develop.23",
32
+ "@progress/kendo-react-dialogs": "8.1.0-develop.23",
33
+ "@progress/kendo-react-dropdowns": "8.1.0-develop.23",
34
+ "@progress/kendo-react-form": "8.1.0-develop.23",
35
+ "@progress/kendo-react-inputs": "8.1.0-develop.23",
36
+ "@progress/kendo-react-intl": "8.1.0-develop.23",
37
+ "@progress/kendo-react-popup": "8.1.0-develop.23",
38
38
  "@progress/kendo-svg-icons": "^3.0.0",
39
39
  "react": "^16.8.2 || ^17.0.0 || ^18.0.0",
40
40
  "react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0"
@@ -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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("react"),U=require("prop-types"),W=require("../../components/BaseView.js"),V=require("../common/VerticalResourceIterator.js"),c=require("../../messages/index.js"),q=require("../../constants/index.js"),s=require("@progress/kendo-date-math"),y=require("@progress/kendo-react-common"),M=require("@progress/kendo-react-intl"),$=require("../../services/rangeService.js"),j=require("../../services/occurrenceService.js"),Y=require("../../services/itemsService.js"),R=require("../../utils/index.js"),F=require("../../tasks/SchedulerEditTask.js"),K=require("../../slots/SchedulerEditSlot.js"),D=require("../../context/SchedulerContext.js"),z=require("../../context/SchedulerResourceIteratorContext.js"),w=require("@progress/kendo-svg-icons"),G=require("../../services/slotsService.js"),p=require("../../hooks/useCellSync.js");function Z(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const n=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(r,a,n.get?n:{enumerable:!0,get:()=>t[a]})}}return r.default=t,Object.freeze(r)}const e=Z(P),_=t=>{const{group:r,timezone:a,resources:n}=D.useSchedulerPropsContext(),T=t.editTask||F.SchedulerEditTask,f=t.editSlot||K.SchedulerEditSlot,m=e.useRef(null),i=y.useDir(m),u=M.useInternationalization(),d=M.useLocalization(),[v]=D.useSchedulerDataContext(),N=D.useSchedulerGroupsContext(),A=D.useSchedulerFieldsContext(),l=D.useSchedulerDateRangeContext(),g=e.useMemo(()=>$.toRanges(l,{step:s.MS_PER_DAY,timezone:a}),[l.start.getTime(),l.end.getTime(),a]),h=e.useMemo(()=>G.toSlots(l,{step:s.MS_PER_DAY},{groups:N,ranges:g}),[l.start.getTime(),l.end.getTime(),a,N,g]),I=e.useMemo(()=>j.toOccurrences(v,{dateRange:l,fields:A,timezone:a}),[v,l.start.getTime(),l.end.getTime(),A,a]),E=e.useMemo(()=>Y.toItems(I,{timezone:a},{groups:N,ranges:g}),[I,a,N,g]),L=e.useMemo(()=>y.classNames("k-scheduler-agendaview",t.className),[t.className]);return p.useCellSync({element:m,selector:".k-scheduler-datecolumn",explicitDepth:!1}),p.useCellSync({element:m,selector:".k-scheduler-timecolumn",explicitDepth:!1}),e.useMemo(()=>R.mapItemsToSlots(E,h,!0),[E,h]),e.useMemo(()=>R.mapSlotsToItems(E,h,!0),[E,h]),e.createElement(W.BaseView,{ref:m,id:t.id,style:t.style,className:L,props:t,slots:E,ranges:g},e.createElement("div",{className:"k-scheduler-head"},e.createElement(V.VerticalResourceIterator,{resources:n,group:r},e.createElement(z.SchedulerResourceIteratorContext.Consumer,null,({groupIndex:S})=>e.createElement("div",{className:"k-scheduler-row",key:S},e.createElement("div",{className:"k-scheduler-cell k-heading-cell k-group-cell k-scheduler-datecolumn"},d.toLanguageString(c.dateTitle,c.messages[c.dateTitle])),e.createElement("div",{className:"k-scheduler-cell k-heading-cell k-group-cell k-scheduler-timecolumn"},d.toLanguageString(c.timeTitle,c.messages[c.timeTitle])),e.createElement("div",{className:"k-scheduler-cell k-heading-cell k-scheduler-eventcolumn"},d.toLanguageString(c.eventTitle,c.messages[c.eventTitle])))))),e.createElement("div",{className:"k-scheduler-body"},e.createElement(V.VerticalResourceIterator,{resources:n,group:r,nested:!0},e.createElement(z.SchedulerResourceIteratorContext.Consumer,null,({groupIndex:S})=>h.filter(o=>o.group.index===(S||0)).map((o,C,O)=>e.createElement("div",{className:"k-scheduler-row k-scheduler-content",key:`${S}:${C}`},e.createElement(f,{...o,editable:t.editable,row:O.length*(S||0)+C,col:0,slot:t.slot,viewSlot:t.viewSlot,className:"k-scheduler-datecolumn k-group-cell"},e.createElement("div",null,e.createElement("strong",{className:"k-scheduler-agendaday"},u.formatDate(o.zonedStart,"dd")),e.createElement("em",{className:"k-scheduler-agendaweek"},u.formatDate(o.zonedStart,"EEEE")),e.createElement("span",{className:"k-scheduler-agendadate"},u.formatDate(o.zonedStart,"y")))),e.createElement("div",{className:"k-scheduler-cell k-group-content"},o.items.length?o.items.map((k,b)=>e.createElement("div",{className:"k-scheduler-row",key:b},e.createElement("div",{className:"k-scheduler-cell k-scheduler-timecolumn"},e.createElement("div",null,k.tail&&e.createElement(y.IconWrap,{name:i==="rtl"?"caret-alt-right":"caret-alt-left",icon:i==="rtl"?w.caretAltRightIcon:w.caretAltLeftIcon}),k.isAllDay?d.toLanguageString(c.allDay,c.messages[c.allDay]):B(u,k),k.head&&e.createElement(y.IconWrap,{name:i==="rtl"?"caret-alt-left":"caret-alt-right",icon:i==="rtl"?w.caretAltLeftIcon:w.caretAltRightIcon}))),e.createElement("div",{className:"k-scheduler-cell"},e.createElement(T,{key:`${C}:${b}`,...k,onDataAction:t.onDataAction,task:t.task,viewTask:t.viewTask,editable:t.editable})))):e.createElement("div",{className:"k-scheduler-cell k-heading-cell k-group-cell"},d.toLanguageString(c.noEvents,c.messages[c.noEvents])))))))))},B=(t,r)=>{let a="{0:t}-{1:t}";return r.head?a="{0:t}":r.tail&&(a="{1:t}"),t.format(a,r.zonedStart,r.zonedEnd)},x=t=>s.getDate(t),H=(t,r)=>s.getDate(s.addDays(t,r||1)),J=({intl:t,date:r,numberOfDays:a=1,timezone:n})=>{const T=s.ZonedDate.fromLocalDate(r,n),f=a===q.DAYS_IN_WEEK_COUNT?x(s.firstDayInWeek(T,t.firstDay())):x(T),m=H(f,a),i=s.ZonedDate.fromUTCDate(R.toUTCDateTime(f),n),u=s.ZonedDate.fromUTCDate(R.toUTCDateTime(m),n),d=new Date(i.getTime()),v=new Date(u.getTime());return{start:d,end:v,zonedStart:i,zonedEnd:u}},Q={name:"agenda",title:t=>t.toLanguageString(c.agendaViewTitle,c.messages[c.agendaViewTitle]),dateRange:J,selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}",slotDuration:60*24,slotDivision:1,step:q.DAYS_IN_WEEK_COUNT,numberOfDays:q.DAYS_IN_WEEK_COUNT},X={title:U.any};_.propTypes=X;_.displayName="KendoReactSchedulerAgendaView";exports.AgendaView=_;exports.agendaViewDefaultProps=Q;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("react"),U=require("prop-types"),$=require("../../components/BaseView.js"),b=require("../common/VerticalResourceIterator.js"),c=require("../../messages/index.js"),x=require("../../constants/index.js"),s=require("@progress/kendo-date-math"),N=require("@progress/kendo-react-common"),V=require("@progress/kendo-react-intl"),j=require("../../services/rangeService.js"),W=require("../../services/occurrenceService.js"),F=require("../../services/itemsService.js"),R=require("../../utils/index.js"),Y=require("../../tasks/SchedulerEditTask.js"),G=require("../../slots/SchedulerEditSlot.js"),D=require("../../context/SchedulerContext.js"),M=require("../../context/SchedulerResourceIteratorContext.js"),w=require("@progress/kendo-svg-icons"),K=require("../../services/slotsService.js"),z=require("../../hooks/useCellSync.js");function Z(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const n=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(r,a,n.get?n:{enumerable:!0,get:()=>t[a]})}}return r.default=t,Object.freeze(r)}const e=Z(P),q=t=>{const{group:r,timezone:a,resources:n}=D.useSchedulerPropsContext(),T=t.editTask||Y.SchedulerEditTask,f=t.editSlot||G.SchedulerEditSlot,m=e.useRef(null),i=N.useDir(m),u=V.useInternationalization(),d=V.useLocalization(),[v]=D.useSchedulerDataContext(),y=D.useSchedulerGroupsContext(),A=D.useSchedulerFieldsContext(),l=D.useSchedulerDateRangeContext(),g=e.useMemo(()=>j.toRanges(l,{step:s.MS_PER_DAY,timezone:a}),[l.start.getTime(),l.end.getTime(),a]),h=e.useMemo(()=>K.toSlots(l,{step:s.MS_PER_DAY},{groups:y,ranges:g}),[l.start.getTime(),l.end.getTime(),a,y,g]),_=e.useMemo(()=>W.toOccurrences(v,{dateRange:l,fields:A,timezone:a}),[v,l.start.getTime(),l.end.getTime(),A,a]),k=e.useMemo(()=>F.toItems(_,{timezone:a},{groups:y,ranges:g}),[_,a,y,g]),L=e.useMemo(()=>N.classNames("k-scheduler-agendaview",t.className),[t.className]);return z.useCellSync({element:m,selector:".k-scheduler-datecolumn",explicitDepth:!1}),z.useCellSync({element:m,selector:".k-scheduler-timecolumn",explicitDepth:!1}),e.useMemo(()=>R.mapItemsToSlots(k,h,!0),[k,h]),e.useMemo(()=>R.mapSlotsToItems(k,h,!0),[k,h]),e.createElement($.BaseView,{ref:m,id:t.id,style:t.style,className:L,props:t,slots:k,ranges:g},e.createElement("div",{className:"k-scheduler-head"},e.createElement(b.VerticalResourceIterator,{resources:n,group:r},e.createElement(M.SchedulerResourceIteratorContext.Consumer,null,({groupIndex:S})=>e.createElement("div",{className:"k-scheduler-row",key:S},e.createElement("div",{className:"k-scheduler-cell k-heading-cell k-group-cell k-scheduler-datecolumn"},d.toLanguageString(c.dateTitle,c.messages[c.dateTitle])),e.createElement("div",{className:"k-scheduler-cell k-heading-cell k-group-cell k-scheduler-timecolumn"},d.toLanguageString(c.timeTitle,c.messages[c.timeTitle])),e.createElement("div",{className:"k-scheduler-cell k-heading-cell k-scheduler-eventcolumn"},d.toLanguageString(c.eventTitle,c.messages[c.eventTitle])))))),e.createElement("div",{className:"k-scheduler-body"},e.createElement(b.VerticalResourceIterator,{resources:n,group:r,nested:!0},e.createElement(M.SchedulerResourceIteratorContext.Consumer,null,({groupIndex:S})=>h.filter(o=>o.group.index===(S||0)).map((o,C,O)=>e.createElement("div",{className:"k-scheduler-row k-scheduler-content",key:`${S}:${C}`},e.createElement(f,{...o,editable:t.editable,row:O.length*(S||0)+C,col:0,slot:t.slot,viewSlot:t.viewSlot,className:"k-scheduler-datecolumn k-group-cell"},e.createElement("div",null,e.createElement("strong",{className:"k-scheduler-agendaday"},u.formatDate(o.zonedStart,"dd")),e.createElement("em",{className:"k-scheduler-agendaweek"},u.formatDate(o.zonedStart,"EEEE")),e.createElement("span",{className:"k-scheduler-agendadate"},u.formatDate(o.zonedStart,"y")))),e.createElement("div",{className:"k-scheduler-cell k-group-content"},o.items.length?o.items.map((E,I)=>e.createElement("div",{className:"k-scheduler-row",key:I},e.createElement("div",{className:"k-scheduler-cell k-scheduler-timecolumn"},e.createElement("div",null,E.tail&&e.createElement(N.IconWrap,{name:i==="rtl"?"caret-alt-right":"caret-alt-left",icon:i==="rtl"?w.caretAltRightIcon:w.caretAltLeftIcon}),E.isAllDay?d.toLanguageString(c.allDay,c.messages[c.allDay]):B(u,E),E.head&&e.createElement(N.IconWrap,{name:i==="rtl"?"caret-alt-left":"caret-alt-right",icon:i==="rtl"?w.caretAltLeftIcon:w.caretAltRightIcon}))),e.createElement("div",{className:"k-scheduler-cell"},e.createElement(T,{key:`${C}:${I}`,...E,onDataAction:t.onDataAction,task:t.task,viewTask:t.viewTask,editable:t.editable})))):e.createElement("div",{className:"k-scheduler-cell k-heading-cell k-group-cell"},d.toLanguageString(c.noEvents,c.messages[c.noEvents])))))))))},B=(t,r)=>{let a="{0:t}-{1:t}";return r.head?a="{0:t}":r.tail&&(a="{1:t}"),t.format(a,r.zonedStart,r.zonedEnd)},p=t=>s.getDate(t),H=(t,r)=>s.getDate(s.addDays(t,r||1)),J=({intl:t,date:r,numberOfDays:a=1,timezone:n})=>{const T=s.ZonedDate.fromLocalDate(r,n),f=a===x.DAYS_IN_WEEK_COUNT?p(s.firstDayInWeek(T,t.firstDay())):p(T),m=H(f,a),i=s.ZonedDate.fromUTCDate(R.toUTCDateTime(f),n),u=s.ZonedDate.fromUTCDate(R.toUTCDateTime(m),n),d=new Date(i.getTime()),v=new Date(u.getTime());return{start:d,end:v,zonedStart:i,zonedEnd:u}},Q={name:"agenda",title:t=>t.toLanguageString(c.agendaViewTitle,c.messages[c.agendaViewTitle]),dateRange:J,selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}",slotDuration:60*24,slotDivision:1,step:1,numberOfDays:x.DAYS_IN_WEEK_COUNT},X={title:U.any};q.propTypes=X;q.displayName="KendoReactSchedulerAgendaView";exports.AgendaView=q;exports.agendaViewDefaultProps=Q;
@@ -9,32 +9,32 @@
9
9
  import * as e from "react";
10
10
  import B from "prop-types";
11
11
  import { BaseView as Z } from "../../components/BaseView.mjs";
12
- import { VerticalResourceIterator as C } from "../common/VerticalResourceIterator.mjs";
13
- import { dateTitle as A, messages as d, timeTitle as z, eventTitle as L, allDay as _, noEvents as M, agendaViewTitle as V } from "../../messages/index.mjs";
14
- import { DAYS_IN_WEEK_COUNT as p } from "../../constants/index.mjs";
15
- import { MS_PER_DAY as I, ZonedDate as v, firstDayInWeek as j, getDate as W, addDays as q } from "@progress/kendo-date-math";
16
- import { useDir as H, classNames as J, IconWrap as b } from "@progress/kendo-react-common";
12
+ import { VerticalResourceIterator as R } from "../common/VerticalResourceIterator.mjs";
13
+ import { dateTitle as C, messages as d, timeTitle as A, eventTitle as z, allDay as L, noEvents as _, agendaViewTitle as M } from "../../messages/index.mjs";
14
+ import { DAYS_IN_WEEK_COUNT as G } from "../../constants/index.mjs";
15
+ import { MS_PER_DAY as V, ZonedDate as v, firstDayInWeek as j, getDate as W, addDays as q } from "@progress/kendo-date-math";
16
+ import { useDir as H, classNames as J, IconWrap as I } from "@progress/kendo-react-common";
17
17
  import { useInternationalization as Q, useLocalization as X } from "@progress/kendo-react-intl";
18
18
  import { toRanges as ee } from "../../services/rangeService.mjs";
19
19
  import { toOccurrences as te } from "../../services/occurrenceService.mjs";
20
20
  import { toItems as ae } from "../../services/itemsService.mjs";
21
- import { mapItemsToSlots as le, mapSlotsToItems as re, toUTCDateTime as x } from "../../utils/index.mjs";
21
+ import { mapItemsToSlots as le, mapSlotsToItems as re, toUTCDateTime as b } from "../../utils/index.mjs";
22
22
  import { SchedulerEditTask as ce } from "../../tasks/SchedulerEditTask.mjs";
23
23
  import { SchedulerEditSlot as se } from "../../slots/SchedulerEditSlot.mjs";
24
24
  import { useSchedulerPropsContext as oe, useSchedulerDataContext as ne, useSchedulerGroupsContext as me, useSchedulerFieldsContext as ie, useSchedulerDateRangeContext as de } from "../../context/SchedulerContext.mjs";
25
- import { SchedulerResourceIteratorContext as F } from "../../context/SchedulerResourceIteratorContext.mjs";
26
- import { caretAltRightIcon as P, caretAltLeftIcon as U } from "@progress/kendo-svg-icons";
25
+ import { SchedulerResourceIteratorContext as x } from "../../context/SchedulerResourceIteratorContext.mjs";
26
+ import { caretAltRightIcon as F, caretAltLeftIcon as P } from "@progress/kendo-svg-icons";
27
27
  import { toSlots as ue } from "../../services/slotsService.mjs";
28
- import { useCellSync as $ } from "../../hooks/useCellSync.mjs";
28
+ import { useCellSync as U } from "../../hooks/useCellSync.mjs";
29
29
  const K = (t) => {
30
30
  const {
31
31
  group: l,
32
32
  timezone: a,
33
33
  resources: m
34
- } = oe(), f = t.editTask || ce, D = t.editSlot || se, i = e.useRef(null), s = H(i), o = Q(), n = X(), [T] = ne(), S = me(), y = ie(), r = de(), u = e.useMemo(
34
+ } = oe(), f = t.editTask || ce, D = t.editSlot || se, i = e.useRef(null), s = H(i), o = Q(), n = X(), [T] = ne(), S = me(), p = ie(), r = de(), u = e.useMemo(
35
35
  () => ee(
36
36
  r,
37
- { step: I, timezone: a }
37
+ { step: V, timezone: a }
38
38
  ),
39
39
  [
40
40
  r.start.getTime(),
@@ -44,7 +44,7 @@ const K = (t) => {
44
44
  ), g = e.useMemo(
45
45
  () => ue(
46
46
  r,
47
- { step: I },
47
+ { step: V },
48
48
  { groups: S, ranges: u }
49
49
  ),
50
50
  [
@@ -54,12 +54,12 @@ const K = (t) => {
54
54
  S,
55
55
  u
56
56
  ]
57
- ), w = e.useMemo(
58
- () => te(T, { dateRange: r, fields: y, timezone: a }),
59
- [T, r.start.getTime(), r.end.getTime(), y, a]
57
+ ), y = e.useMemo(
58
+ () => te(T, { dateRange: r, fields: p, timezone: a }),
59
+ [T, r.start.getTime(), r.end.getTime(), p, a]
60
60
  ), h = e.useMemo(
61
- () => ae(w, { timezone: a }, { groups: S, ranges: u }),
62
- [w, a, S, u]
61
+ () => ae(y, { timezone: a }, { groups: S, ranges: u }),
62
+ [y, a, S, u]
63
63
  ), O = e.useMemo(
64
64
  () => J(
65
65
  "k-scheduler-agendaview",
@@ -67,7 +67,7 @@ const K = (t) => {
67
67
  ),
68
68
  [t.className]
69
69
  );
70
- return $({ element: i, selector: ".k-scheduler-datecolumn", explicitDepth: !1 }), $({ element: i, selector: ".k-scheduler-timecolumn", explicitDepth: !1 }), e.useMemo(() => le(h, g, !0), [h, g]), e.useMemo(() => re(h, g, !0), [h, g]), /* @__PURE__ */ e.createElement(
70
+ return U({ element: i, selector: ".k-scheduler-datecolumn", explicitDepth: !1 }), U({ element: i, selector: ".k-scheduler-timecolumn", explicitDepth: !1 }), e.useMemo(() => le(h, g, !0), [h, g]), e.useMemo(() => re(h, g, !0), [h, g]), /* @__PURE__ */ e.createElement(
71
71
  Z,
72
72
  {
73
73
  ref: i,
@@ -78,8 +78,8 @@ const K = (t) => {
78
78
  slots: h,
79
79
  ranges: u
80
80
  },
81
- /* @__PURE__ */ e.createElement("div", { className: "k-scheduler-head" }, /* @__PURE__ */ e.createElement(C, { resources: m, group: l }, /* @__PURE__ */ e.createElement(F.Consumer, null, ({ groupIndex: k }) => /* @__PURE__ */ e.createElement("div", { className: "k-scheduler-row", key: k }, /* @__PURE__ */ e.createElement("div", { className: "k-scheduler-cell k-heading-cell k-group-cell k-scheduler-datecolumn" }, n.toLanguageString(A, d[A])), /* @__PURE__ */ e.createElement("div", { className: "k-scheduler-cell k-heading-cell k-group-cell k-scheduler-timecolumn" }, n.toLanguageString(z, d[z])), /* @__PURE__ */ e.createElement("div", { className: "k-scheduler-cell k-heading-cell k-scheduler-eventcolumn" }, n.toLanguageString(L, d[L])))))),
82
- /* @__PURE__ */ e.createElement("div", { className: "k-scheduler-body" }, /* @__PURE__ */ e.createElement(C, { resources: m, group: l, nested: !0 }, /* @__PURE__ */ e.createElement(F.Consumer, null, ({ groupIndex: k }) => g.filter((c) => c.group.index === (k || 0)).map((c, N, Y) => /* @__PURE__ */ e.createElement("div", { className: "k-scheduler-row k-scheduler-content", key: `${k}:${N}` }, /* @__PURE__ */ e.createElement(
81
+ /* @__PURE__ */ e.createElement("div", { className: "k-scheduler-head" }, /* @__PURE__ */ e.createElement(R, { resources: m, group: l }, /* @__PURE__ */ e.createElement(x.Consumer, null, ({ groupIndex: k }) => /* @__PURE__ */ e.createElement("div", { className: "k-scheduler-row", key: k }, /* @__PURE__ */ e.createElement("div", { className: "k-scheduler-cell k-heading-cell k-group-cell k-scheduler-datecolumn" }, n.toLanguageString(C, d[C])), /* @__PURE__ */ e.createElement("div", { className: "k-scheduler-cell k-heading-cell k-group-cell k-scheduler-timecolumn" }, n.toLanguageString(A, d[A])), /* @__PURE__ */ e.createElement("div", { className: "k-scheduler-cell k-heading-cell k-scheduler-eventcolumn" }, n.toLanguageString(z, d[z])))))),
82
+ /* @__PURE__ */ e.createElement("div", { className: "k-scheduler-body" }, /* @__PURE__ */ e.createElement(R, { resources: m, group: l, nested: !0 }, /* @__PURE__ */ e.createElement(x.Consumer, null, ({ groupIndex: k }) => g.filter((c) => c.group.index === (k || 0)).map((c, N, Y) => /* @__PURE__ */ e.createElement("div", { className: "k-scheduler-row k-scheduler-content", key: `${k}:${N}` }, /* @__PURE__ */ e.createElement(
83
83
  D,
84
84
  {
85
85
  ...c,
@@ -91,35 +91,35 @@ const K = (t) => {
91
91
  className: "k-scheduler-datecolumn k-group-cell"
92
92
  },
93
93
  /* @__PURE__ */ e.createElement("div", null, /* @__PURE__ */ e.createElement("strong", { className: "k-scheduler-agendaday" }, o.formatDate(c.zonedStart, "dd")), /* @__PURE__ */ e.createElement("em", { className: "k-scheduler-agendaweek" }, o.formatDate(c.zonedStart, "EEEE")), /* @__PURE__ */ e.createElement("span", { className: "k-scheduler-agendadate" }, o.formatDate(c.zonedStart, "y")))
94
- ), /* @__PURE__ */ e.createElement("div", { className: "k-scheduler-cell k-group-content" }, c.items.length ? c.items.map((E, R) => /* @__PURE__ */ e.createElement("div", { className: "k-scheduler-row", key: R }, /* @__PURE__ */ e.createElement("div", { className: "k-scheduler-cell k-scheduler-timecolumn" }, /* @__PURE__ */ e.createElement("div", null, E.tail && /* @__PURE__ */ e.createElement(
95
- b,
94
+ ), /* @__PURE__ */ e.createElement("div", { className: "k-scheduler-cell k-group-content" }, c.items.length ? c.items.map((E, w) => /* @__PURE__ */ e.createElement("div", { className: "k-scheduler-row", key: w }, /* @__PURE__ */ e.createElement("div", { className: "k-scheduler-cell k-scheduler-timecolumn" }, /* @__PURE__ */ e.createElement("div", null, E.tail && /* @__PURE__ */ e.createElement(
95
+ I,
96
96
  {
97
97
  name: s === "rtl" ? "caret-alt-right" : "caret-alt-left",
98
- icon: s === "rtl" ? P : U
98
+ icon: s === "rtl" ? F : P
99
99
  }
100
- ), E.isAllDay ? n.toLanguageString(_, d[_]) : ge(o, E), E.head && /* @__PURE__ */ e.createElement(
101
- b,
100
+ ), E.isAllDay ? n.toLanguageString(L, d[L]) : ge(o, E), E.head && /* @__PURE__ */ e.createElement(
101
+ I,
102
102
  {
103
103
  name: s === "rtl" ? "caret-alt-left" : "caret-alt-right",
104
- icon: s === "rtl" ? U : P
104
+ icon: s === "rtl" ? P : F
105
105
  }
106
106
  ))), /* @__PURE__ */ e.createElement("div", { className: "k-scheduler-cell" }, /* @__PURE__ */ e.createElement(
107
107
  f,
108
108
  {
109
- key: `${N}:${R}`,
109
+ key: `${N}:${w}`,
110
110
  ...E,
111
111
  onDataAction: t.onDataAction,
112
112
  task: t.task,
113
113
  viewTask: t.viewTask,
114
114
  editable: t.editable
115
115
  }
116
- )))) : /* @__PURE__ */ e.createElement("div", { className: "k-scheduler-cell k-heading-cell k-group-cell" }, n.toLanguageString(M, d[M]))))))))
116
+ )))) : /* @__PURE__ */ e.createElement("div", { className: "k-scheduler-cell k-heading-cell k-group-cell" }, n.toLanguageString(_, d[_]))))))))
117
117
  );
118
118
  }, ge = (t, l) => {
119
119
  let a = "{0:t}-{1:t}";
120
120
  return l.head ? a = "{0:t}" : l.tail && (a = "{1:t}"), t.format(a, l.zonedStart, l.zonedEnd);
121
- }, G = (t) => W(t), he = (t, l) => W(q(t, l || 1)), ke = ({ intl: t, date: l, numberOfDays: a = 1, timezone: m }) => {
122
- const f = v.fromLocalDate(l, m), D = G(a === p ? j(f, t.firstDay()) : f), i = he(D, a), s = v.fromUTCDate(x(D), m), o = v.fromUTCDate(x(i), m), n = new Date(s.getTime()), T = new Date(o.getTime());
121
+ }, $ = (t) => W(t), he = (t, l) => W(q(t, l || 1)), ke = ({ intl: t, date: l, numberOfDays: a = 1, timezone: m }) => {
122
+ const f = v.fromLocalDate(l, m), D = $(a === G ? j(f, t.firstDay()) : f), i = he(D, a), s = v.fromUTCDate(b(D), m), o = v.fromUTCDate(b(i), m), n = new Date(s.getTime()), T = new Date(o.getTime());
123
123
  return {
124
124
  start: n,
125
125
  end: T,
@@ -128,14 +128,14 @@ const K = (t) => {
128
128
  };
129
129
  }, xe = {
130
130
  name: "agenda",
131
- title: (t) => t.toLanguageString(V, d[V]),
131
+ title: (t) => t.toLanguageString(M, d[M]),
132
132
  dateRange: ke,
133
133
  selectedDateFormat: "{0:D} - {1:D}",
134
134
  selectedShortDateFormat: "{0:d} - {1:d}",
135
135
  slotDuration: 60 * 24,
136
136
  slotDivision: 1,
137
- step: p,
138
- numberOfDays: p
137
+ step: 1,
138
+ numberOfDays: G
139
139
  }, Ee = {
140
140
  title: B.any
141
141
  };
@@ -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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const U=require("react"),j=require("prop-types"),B=require("../../components/BaseView.js"),s=require("@progress/kendo-date-math"),_=require("@progress/kendo-react-common"),z=require("../common/VerticalResourceIterator.js"),O=require("../common/HorizontalResourceIterator.js"),D=require("../../utils/index.js"),q=require("../../messages/index.js"),F=require("../../slots/SchedulerEditSlot.js"),W=require("@progress/kendo-react-intl"),p=require("../../constants/index.js"),K=require("../../services/rangeService.js"),Z=require("../../services/slotsService.js"),L=require("../../services/occurrenceService.js"),G=require("../../services/itemsService.js"),J=require("../../components/ShowMoreItemsButton.js"),Q=require("../../items/SchedulerEditItem.js"),d=require("../../context/SchedulerContext.js"),P=require("../../context/SchedulerResourceIteratorContext.js"),X=require("../../components/DateHeaderCell.js");function ee(e){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const i=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(c,o,i.get?i:{enumerable:!0,get:()=>e[o]})}}return c.default=e,Object.freeze(c)}const r=ee(U),te={skeleton:"dd"},I=e=>{const{group:c,timezone:o,resources:i}=d.useSchedulerPropsContext(),y=e.editItem||Q.SchedulerEditItem,f=e.editSlot||F.SchedulerEditSlot,[S]=d.useSchedulerDataContext(),[E,C]=d.useSchedulerDateContext(),[,k]=d.useSchedulerActiveViewContext(),b=d.useSchedulerViewsContext(),T=d.useSchedulerGroupsContext(),w=d.useSchedulerOrientationContext(),l=d.useSchedulerDateRangeContext(),$=W.useInternationalization(),x=d.useSchedulerFieldsContext(),M=e.itemsPerSlot||A.itemsPerSlot,m=r.useMemo(()=>K.toRanges(l,{step:s.MS_PER_DAY*p.DAYS_IN_WEEK_COUNT,timezone:o}),[l.start.getTime(),l.end.getTime(),o]),h=r.useMemo(()=>Z.toSlots(l,{step:s.MS_PER_DAY},{groups:T,ranges:m}),[l.start.getTime(),l.end.getTime(),T,m]),v=r.useMemo(()=>L.toOccurrences(S,{dateRange:l,fields:x,timezone:o}),[S,l.start.getTime(),l.end.getTime(),x,o]),g=r.useMemo(()=>G.toItems(v,{timezone:o},{groups:T,ranges:m}),[v,o,T,m]),Y=r.useCallback(t=>{const n=b.find(u=>u.props.name==="day");!k||!n||!n.props.name||!t.target.slot||(k(n.props.name,t),C(t.target.slot.start,t))},[k,b]);r.useMemo(()=>D.mapItemsToSlots(g,h,!0),[g,h]),r.useMemo(()=>D.mapSlotsToItems(g,h,!0),[g,h]);const V=r.createElement(P.SchedulerResourceIteratorContext.Consumer,null,({groupIndex:t})=>r.createElement("div",{className:"k-scheduler-row",key:t},h.filter(n=>n.group.index===t&&n.range.index===0).map((n,u)=>r.createElement(X.DateHeaderCell,{as:e.dateHeaderCell,key:u,"data-dayslot-index":u,date:s.ZonedDate.fromLocalDate(new Date(n.zonedEnd.getTime()-(n.zonedEnd.getTime()-n.zonedStart.getTime())/2),o),start:n.start,end:n.end,format:{skeleton:"EEEE"}})))),N=r.createElement(P.SchedulerResourceIteratorContext.Consumer,null,({groupIndex:t})=>m.map((n,u)=>r.createElement("div",{className:"k-scheduler-row",key:u},h.filter(a=>a.group.index===t&&a.range.index===u).map((a,R,H)=>r.createElement(f,{slot:e.slot,viewSlot:e.viewSlot,key:R,form:e.form,...a,expandable:{offsetTop:30,offsetBottom:M<a.items.length?15:0},onDataAction:e.onDataAction,col:w==="horizontal"?H.length*(t||0)+R:R,row:w==="horizontal"?u:m.length*(t||0)+u,editable:e.editable,className:_.classNames({"k-other-month":a.start.getMonth()<E.getMonth()||a.start.getMonth()>E.getMonth()})},r.createElement("span",{className:"k-link k-nav-day"},$.formatDate(new Date(a.end.getTime()-(a.end.getTime()-a.start.getTime())/2),te)),M<a.items.length&&r.createElement(J.ShowMoreItemsButton,{slot:a,onClick:Y}))))));return r.createElement(B.BaseView,{props:e,slots:h,ranges:m,className:_.classNames("k-scheduler-monthview",e.className)},r.createElement("div",{className:"k-scheduler-head"},w==="horizontal"?r.createElement(O.HorizontalResourceIterator,{nested:!0,resources:i,group:c},V):r.createElement(z.VerticalResourceIterator,{resources:i,group:c},V)),r.createElement("div",{className:"k-scheduler-body"},w==="horizontal"?r.createElement(O.HorizontalResourceIterator,{resources:i,group:c},N):r.createElement(z.VerticalResourceIterator,{nested:!0,resources:i,group:c},N),g.filter(t=>t.order===null||t.order<M).sort(D.orderSort).map(t=>r.createElement(y,{item:e.item,viewItem:e.viewItem,form:e.form,key:t.isRecurring?`${t.uid}:${t.group.index}:${t.range.index}:${t.originalStart}`:`${t.uid}:${t.group.index}:${t.range.index}`,...t,onDataAction:e.onDataAction,style:{transform:"translateY(30px)"},vertical:!1,editable:e.editable,ignoreIsAllDay:!0}))))},re=({intl:e,date:c,timezone:o})=>{const i=s.firstDayInWeek(s.firstDayOfMonth(s.getDate(c)),e.firstDay()),y=s.addDays(s.firstDayInWeek(s.lastDayOfMonth(s.getDate(c)),e.firstDay()),p.DAYS_IN_WEEK_COUNT),f=s.ZonedDate.fromUTCDate(D.toUTCDateTime(i),o),S=s.ZonedDate.fromUTCDate(D.toUTCDateTime(y),o),E=new Date(f.getTime()),C=new Date(S.getTime());return{start:E,end:C,zonedStart:f,zonedEnd:S}},A={name:"month",dateRange:re,slotDuration:24*60,slotDivision:1,itemsPerSlot:2,numberOfDays:31,title:e=>e.toLanguageString(q.monthViewTitle,q.messages[q.monthViewTitle]),selectedDateFormat:"{0:Y}",selectedShortDateFormat:"{0:Y}"},oe={itemsPerSlot:j.number};I.propTypes=oe;I.displayName="KendoReactSchedulerMonthView";exports.MonthView=I;exports.monthViewDefaultProps=A;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const U=require("react"),j=require("prop-types"),B=require("../../components/BaseView.js"),s=require("@progress/kendo-date-math"),_=require("@progress/kendo-react-common"),p=require("../common/VerticalResourceIterator.js"),z=require("../common/HorizontalResourceIterator.js"),D=require("../../utils/index.js"),q=require("../../messages/index.js"),F=require("../../slots/SchedulerEditSlot.js"),W=require("@progress/kendo-react-intl"),P=require("../../constants/index.js"),K=require("../../services/rangeService.js"),Z=require("../../services/slotsService.js"),L=require("../../services/occurrenceService.js"),G=require("../../services/itemsService.js"),J=require("../../components/ShowMoreItemsButton.js"),Q=require("../../items/SchedulerEditItem.js"),d=require("../../context/SchedulerContext.js"),O=require("../../context/SchedulerResourceIteratorContext.js"),X=require("../../components/DateHeaderCell.js");function ee(e){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const i=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(c,o,i.get?i:{enumerable:!0,get:()=>e[o]})}}return c.default=e,Object.freeze(c)}const r=ee(U),te={skeleton:"dd"},I=e=>{const{group:c,timezone:o,resources:i}=d.useSchedulerPropsContext(),y=e.editItem||Q.SchedulerEditItem,f=e.editSlot||F.SchedulerEditSlot,[S]=d.useSchedulerDataContext(),[E,C]=d.useSchedulerDateContext(),[,k]=d.useSchedulerActiveViewContext(),b=d.useSchedulerViewsContext(),T=d.useSchedulerGroupsContext(),w=d.useSchedulerOrientationContext(),l=d.useSchedulerDateRangeContext(),$=W.useInternationalization(),x=d.useSchedulerFieldsContext(),M=e.itemsPerSlot||A.itemsPerSlot,m=r.useMemo(()=>K.toRanges(l,{step:s.MS_PER_DAY*P.DAYS_IN_WEEK_COUNT,timezone:o}),[l.start.getTime(),l.end.getTime(),o]),h=r.useMemo(()=>Z.toSlots(l,{step:s.MS_PER_DAY},{groups:T,ranges:m}),[l.start.getTime(),l.end.getTime(),T,m]),v=r.useMemo(()=>L.toOccurrences(S,{dateRange:l,fields:x,timezone:o}),[S,l.start.getTime(),l.end.getTime(),x,o]),g=r.useMemo(()=>G.toItems(v,{timezone:o},{groups:T,ranges:m}),[v,o,T,m]),Y=r.useCallback(t=>{const n=b.find(u=>u.props.name==="day");!k||!n||!n.props.name||!t.target.slot||(k(n.props.name,t),C(t.target.slot.start,t))},[k,b]);r.useMemo(()=>D.mapItemsToSlots(g,h,!0),[g,h]),r.useMemo(()=>D.mapSlotsToItems(g,h,!0),[g,h]);const V=r.createElement(O.SchedulerResourceIteratorContext.Consumer,null,({groupIndex:t})=>r.createElement("div",{className:"k-scheduler-row",key:t},h.filter(n=>n.group.index===t&&n.range.index===0).map((n,u)=>r.createElement(X.DateHeaderCell,{as:e.dateHeaderCell,key:u,"data-dayslot-index":u,date:s.ZonedDate.fromLocalDate(new Date(n.zonedEnd.getTime()-(n.zonedEnd.getTime()-n.zonedStart.getTime())/2),o),start:n.start,end:n.end,format:{skeleton:"EEEE"}})))),N=r.createElement(O.SchedulerResourceIteratorContext.Consumer,null,({groupIndex:t})=>m.map((n,u)=>r.createElement("div",{className:"k-scheduler-row",key:u},h.filter(a=>a.group.index===t&&a.range.index===u).map((a,R,H)=>r.createElement(f,{slot:e.slot,viewSlot:e.viewSlot,key:R,form:e.form,...a,expandable:{offsetTop:30,offsetBottom:M<a.items.length?15:0},onDataAction:e.onDataAction,col:w==="horizontal"?H.length*(t||0)+R:R,row:w==="horizontal"?u:m.length*(t||0)+u,editable:e.editable,className:_.classNames({"k-other-month":a.start.getMonth()<E.getMonth()||a.start.getMonth()>E.getMonth()})},r.createElement("span",{className:"k-link k-nav-day"},$.formatDate(new Date(a.end.getTime()-(a.end.getTime()-a.start.getTime())/2),te)),M<a.items.length&&r.createElement(J.ShowMoreItemsButton,{slot:a,onClick:Y}))))));return r.createElement(B.BaseView,{props:e,slots:h,ranges:m,className:_.classNames("k-scheduler-monthview",e.className)},r.createElement("div",{className:"k-scheduler-head"},w==="horizontal"?r.createElement(z.HorizontalResourceIterator,{nested:!0,resources:i,group:c},V):r.createElement(p.VerticalResourceIterator,{resources:i,group:c},V)),r.createElement("div",{className:"k-scheduler-body"},w==="horizontal"?r.createElement(z.HorizontalResourceIterator,{resources:i,group:c},N):r.createElement(p.VerticalResourceIterator,{nested:!0,resources:i,group:c},N),g.filter(t=>t.order===null||t.order<M).sort(D.orderSort).map(t=>r.createElement(y,{item:e.item,viewItem:e.viewItem,form:e.form,key:t.isRecurring?`${t.uid}:${t.group.index}:${t.range.index}:${t.originalStart}`:`${t.uid}:${t.group.index}:${t.range.index}`,...t,onDataAction:e.onDataAction,style:{transform:"translateY(30px)"},vertical:!1,editable:e.editable,ignoreIsAllDay:!0}))))},re=({intl:e,date:c,timezone:o})=>{const i=s.firstDayInWeek(s.firstDayOfMonth(s.getDate(c)),e.firstDay()),y=s.addDays(s.firstDayInWeek(s.lastDayOfMonth(s.getDate(c)),e.firstDay()),P.DAYS_IN_WEEK_COUNT),f=s.ZonedDate.fromUTCDate(D.toUTCDateTime(i),o),S=s.ZonedDate.fromUTCDate(D.toUTCDateTime(y),o),E=new Date(f.getTime()),C=new Date(S.getTime());return{start:E,end:C,zonedStart:f,zonedEnd:S}},A={name:"month",dateRange:re,slotDuration:24*60,slotDivision:1,itemsPerSlot:2,numberOfDays:31,step:1,title:e=>e.toLanguageString(q.monthViewTitle,q.messages[q.monthViewTitle]),selectedDateFormat:"{0:Y}",selectedShortDateFormat:"{0:Y}"},oe={itemsPerSlot:j.number};I.propTypes=oe;I.displayName="KendoReactSchedulerMonthView";exports.MonthView=I;exports.monthViewDefaultProps=A;
@@ -142,6 +142,7 @@ const De = { skeleton: "dd" }, Y = (o) => {
142
142
  slotDivision: 1,
143
143
  itemsPerSlot: 2,
144
144
  numberOfDays: 31,
145
+ step: 1,
145
146
  title: (o) => o.toLanguageString(O, J[O]),
146
147
  selectedDateFormat: "{0:Y}",
147
148
  selectedShortDateFormat: "{0:Y}"
@@ -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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react"),w=require("../day/MultiDayView.js"),s=require("../../constants/index.js"),n=require("@progress/kendo-date-math"),r=require("../../messages/index.js"),u=require("../../utils/index.js");function g(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const _=g(m),l=e=>_.createElement(w.MultiDayView,{...e,step:s.DAYS_IN_WEEK_COUNT,numberOfDays:e.numberOfDays}),y=e=>n.getDate(e),E=(e,a)=>n.getDate(n.addDays(e,a)),k=({intl:e,date:a,timezone:t})=>{const o=n.ZonedDate.fromLocalDate(a,t),i=y(n.firstDayInWeek(o,e.firstDay())),d=E(i,s.DAYS_IN_WEEK_COUNT),c=n.ZonedDate.fromUTCDate(u.toUTCDateTime(i),t),D=n.ZonedDate.fromUTCDate(u.toUTCDateTime(d),t),f=new Date(c.getTime()),T=new Date(D.getTime());return{start:f,end:T,zonedStart:c,zonedEnd:D}},O={name:"week",slotDuration:60,slotDivisions:2,numberOfDays:s.DAYS_IN_WEEK_COUNT,dateRange:k,title:e=>e.toLanguageString(r.weekViewTitle,r.messages[r.weekViewTitle]),selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}"};l.displayName="KendoReactSchedulerWeekView";exports.WeekView=l;exports.weekViewDefaultProps=O;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react"),w=require("../day/MultiDayView.js"),s=require("../../constants/index.js"),n=require("@progress/kendo-date-math"),r=require("../../messages/index.js"),l=require("../../utils/index.js");function g(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const _=g(m),u=e=>_.createElement(w.MultiDayView,{...e,step:1,numberOfDays:s.DAYS_IN_WEEK_COUNT}),y=e=>n.getDate(e),E=(e,a)=>n.getDate(n.addDays(e,a)),k=({intl:e,date:a,timezone:t})=>{const o=n.ZonedDate.fromLocalDate(a,t),i=y(n.firstDayInWeek(o,e.firstDay())),d=E(i,s.DAYS_IN_WEEK_COUNT),c=n.ZonedDate.fromUTCDate(l.toUTCDateTime(i),t),D=n.ZonedDate.fromUTCDate(l.toUTCDateTime(d),t),T=new Date(c.getTime()),f=new Date(D.getTime());return{start:T,end:f,zonedStart:c,zonedEnd:D}},p={name:"week",slotDuration:60,slotDivisions:2,numberOfDays:s.DAYS_IN_WEEK_COUNT,step:1,dateRange:k,title:e=>e.toLanguageString(r.weekViewTitle,r.messages[r.weekViewTitle]),selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}"};u.displayName="KendoReactSchedulerWeekView";exports.WeekView=u;exports.weekViewDefaultProps=p;
@@ -7,38 +7,39 @@
7
7
  */
8
8
  "use client";
9
9
  import * as w from "react";
10
- import { MultiDayView as u } from "../day/MultiDayView.mjs";
11
- import { DAYS_IN_WEEK_COUNT as r } from "../../constants/index.mjs";
12
- import { ZonedDate as o, firstDayInWeek as g, getDate as c, addDays as E } from "@progress/kendo-date-math";
13
- import { weekViewTitle as i, messages as p } from "../../messages/index.mjs";
10
+ import { MultiDayView as p } from "../day/MultiDayView.mjs";
11
+ import { DAYS_IN_WEEK_COUNT as s } from "../../constants/index.mjs";
12
+ import { ZonedDate as o, firstDayInWeek as g, getDate as c, addDays as u } from "@progress/kendo-date-math";
13
+ import { weekViewTitle as i, messages as E } from "../../messages/index.mjs";
14
14
  import { toUTCDateTime as m } from "../../utils/index.mjs";
15
- const y = (e) => /* @__PURE__ */ w.createElement(
16
- u,
15
+ const k = (e) => /* @__PURE__ */ w.createElement(
16
+ p,
17
17
  {
18
18
  ...e,
19
- step: r,
20
- numberOfDays: e.numberOfDays
19
+ step: 1,
20
+ numberOfDays: s
21
21
  }
22
- ), k = (e) => c(e), _ = (e, t) => c(E(e, t)), S = ({ intl: e, date: t, timezone: a }) => {
23
- const d = o.fromLocalDate(t, a), s = k(g(d, e.firstDay())), f = _(s, r), n = o.fromUTCDate(m(s), a), D = o.fromUTCDate(m(f), a), l = new Date(n.getTime()), T = new Date(D.getTime());
22
+ ), y = (e) => c(e), _ = (e, t) => c(u(e, t)), S = ({ intl: e, date: t, timezone: a }) => {
23
+ const d = o.fromLocalDate(t, a), r = y(g(d, e.firstDay())), f = _(r, s), n = o.fromUTCDate(m(r), a), D = o.fromUTCDate(m(f), a), l = new Date(n.getTime()), T = new Date(D.getTime());
24
24
  return {
25
25
  start: l,
26
26
  end: T,
27
27
  zonedStart: n,
28
28
  zonedEnd: D
29
29
  };
30
- }, O = {
30
+ }, U = {
31
31
  name: "week",
32
32
  slotDuration: 60,
33
33
  slotDivisions: 2,
34
- numberOfDays: r,
34
+ numberOfDays: s,
35
+ step: 1,
35
36
  dateRange: S,
36
- title: (e) => e.toLanguageString(i, p[i]),
37
+ title: (e) => e.toLanguageString(i, E[i]),
37
38
  selectedDateFormat: "{0:D} - {1:D}",
38
39
  selectedShortDateFormat: "{0:d} - {1:d}"
39
40
  };
40
- y.displayName = "KendoReactSchedulerWeekView";
41
+ k.displayName = "KendoReactSchedulerWeekView";
41
42
  export {
42
- y as WeekView,
43
- O as weekViewDefaultProps
43
+ k as WeekView,
44
+ U as weekViewDefaultProps
44
45
  };
@@ -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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react"),a=require("@progress/kendo-date-math"),k=require("../../constants/index.js"),S=require("../day/MultiDayView.js"),i=require("../../messages/index.js"),u=require("../../utils/index.js"),T=require("../../context/SchedulerContext.js");function p(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const o=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,o.get?o:{enumerable:!0,get:()=>t[e]})}}return n.default=t,Object.freeze(n)}const E=p(f),l=t=>{const n=T.useSchedulerDateRangeContext(),e=Math.round((n.end.getTime()-n.start.getTime())/a.MS_PER_DAY);return E.createElement(S.MultiDayView,{...t,step:k.DAYS_IN_WEEK_COUNT,numberOfDays:e})},_=(t,n=a.Day.Sunday)=>{let e=t.clone();for(;e.getDay()!==n;)e=e.addDays(-1);return e},b=({intl:t,date:n,timezone:e,...o})=>{const w=a.ZonedDate.fromLocalDate(n,e),r=o.workWeekStart!==void 0?o.workWeekStart:a.Day.Monday,s=o.workWeekEnd!==void 0?o.workWeekEnd:a.Day.Friday,y=s<r?k.DAYS_IN_WEEK_COUNT+s-r+1:s-r+1,c=a.getDate(_(w,r)),W=a.addDays(c,y),d=a.ZonedDate.fromUTCDate(u.toUTCDateTime(c),e),D=a.ZonedDate.fromUTCDate(u.toUTCDateTime(W),e),g=new Date(d.getTime()),m=new Date(D.getTime());return{start:g,end:m,zonedStart:d,zonedEnd:D}},O={name:"work-week",slotDuration:60,slotDivisions:2,numberOfDays:7,dateRange:b,title:t=>t.toLanguageString(i.workWeekViewTitle,i.messages[i.workWeekViewTitle]),workWeekStart:a.Day.Monday,workWeekEnd:a.Day.Friday,selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}"};l.displayName="KendoReactSchedulerWorkWeekView";exports.WorkWeekView=l;exports.workWeekDefaultProps=O;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react"),a=require("@progress/kendo-date-math"),c=require("../../constants/index.js"),S=require("../day/MultiDayView.js"),i=require("../../messages/index.js"),k=require("../../utils/index.js"),T=require("../../context/SchedulerContext.js");function _(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const o=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,o.get?o:{enumerable:!0,get:()=>t[e]})}}return n.default=t,Object.freeze(n)}const E=_(f),l=t=>{const n=T.useSchedulerDateRangeContext(),e=Math.round((n.end.getTime()-n.start.getTime())/a.MS_PER_DAY);return E.createElement(S.MultiDayView,{...t,step:c.DAYS_IN_WEEK_COUNT,numberOfDays:e})},p=(t,n=a.Day.Sunday)=>{let e=t.clone();for(;e.getDay()!==n;)e=e.addDays(-1);return e},O=({intl:t,date:n,timezone:e,...o})=>{const w=a.ZonedDate.fromLocalDate(n,e),r=o.workWeekStart!==void 0?o.workWeekStart:a.Day.Monday,s=o.workWeekEnd!==void 0?o.workWeekEnd:a.Day.Friday,y=s<r?c.DAYS_IN_WEEK_COUNT+s-r+1:s-r+1,d=a.getDate(p(w,r)),W=a.addDays(d,y),D=a.ZonedDate.fromUTCDate(k.toUTCDateTime(d),e),u=a.ZonedDate.fromUTCDate(k.toUTCDateTime(W),e),g=new Date(D.getTime()),m=new Date(u.getTime());return{start:g,end:m,zonedStart:D,zonedEnd:u}},b={name:"work-week",slotDuration:60,slotDivisions:2,numberOfDays:c.DAYS_IN_WEEK_COUNT,step:1,dateRange:O,title:t=>t.toLanguageString(i.workWeekViewTitle,i.messages[i.workWeekViewTitle]),workWeekStart:a.Day.Monday,workWeekEnd:a.Day.Friday,selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}"};l.displayName="KendoReactSchedulerWorkWeekView";exports.WorkWeekView=l;exports.workWeekDefaultProps=b;
@@ -7,19 +7,19 @@
7
7
  */
8
8
  "use client";
9
9
  import * as g from "react";
10
- import { MS_PER_DAY as S, Day as a, ZonedDate as i, getDate as p, addDays as T } from "@progress/kendo-date-math";
11
- import { DAYS_IN_WEEK_COUNT as w } from "../../constants/index.mjs";
10
+ import { MS_PER_DAY as p, Day as a, ZonedDate as i, getDate as S, addDays as T } from "@progress/kendo-date-math";
11
+ import { DAYS_IN_WEEK_COUNT as d } from "../../constants/index.mjs";
12
12
  import { MultiDayView as E } from "../day/MultiDayView.mjs";
13
- import { workWeekViewTitle as D, messages as R } from "../../messages/index.mjs";
14
- import { toUTCDateTime as c } from "../../utils/index.mjs";
13
+ import { workWeekViewTitle as c, messages as R } from "../../messages/index.mjs";
14
+ import { toUTCDateTime as w } from "../../utils/index.mjs";
15
15
  import { useSchedulerDateRangeContext as C } from "../../context/SchedulerContext.mjs";
16
16
  const M = (t) => {
17
- const o = C(), e = Math.round((o.end.getTime() - o.start.getTime()) / S);
17
+ const o = C(), e = Math.round((o.end.getTime() - o.start.getTime()) / p);
18
18
  return /* @__PURE__ */ g.createElement(
19
19
  E,
20
20
  {
21
21
  ...t,
22
- step: w,
22
+ step: d,
23
23
  numberOfDays: e
24
24
  }
25
25
  );
@@ -29,20 +29,21 @@ const M = (t) => {
29
29
  e = e.addDays(-1);
30
30
  return e;
31
31
  }, _ = ({ intl: t, date: o, timezone: e, ...r }) => {
32
- const l = i.fromLocalDate(o, e), n = r.workWeekStart !== void 0 ? r.workWeekStart : a.Monday, s = r.workWeekEnd !== void 0 ? r.workWeekEnd : a.Friday, W = s < n ? w + s - n + 1 : s - n + 1, d = p(V(l, n)), f = T(d, W), k = i.fromUTCDate(c(d), e), m = i.fromUTCDate(c(f), e), u = new Date(k.getTime()), y = new Date(m.getTime());
32
+ const l = i.fromLocalDate(o, e), n = r.workWeekStart !== void 0 ? r.workWeekStart : a.Monday, s = r.workWeekEnd !== void 0 ? r.workWeekEnd : a.Friday, W = s < n ? d + s - n + 1 : s - n + 1, k = S(V(l, n)), f = T(k, W), m = i.fromUTCDate(w(k), e), D = i.fromUTCDate(w(f), e), u = new Date(m.getTime()), y = new Date(D.getTime());
33
33
  return {
34
34
  start: u,
35
35
  end: y,
36
- zonedStart: k,
37
- zonedEnd: m
36
+ zonedStart: m,
37
+ zonedEnd: D
38
38
  };
39
39
  }, h = {
40
40
  name: "work-week",
41
41
  slotDuration: 60,
42
42
  slotDivisions: 2,
43
- numberOfDays: 7,
43
+ numberOfDays: d,
44
+ step: 1,
44
45
  dateRange: _,
45
- title: (t) => t.toLanguageString(D, R[D]),
46
+ title: (t) => t.toLanguageString(c, R[c]),
46
47
  workWeekStart: a.Monday,
47
48
  workWeekEnd: a.Friday,
48
49
  selectedDateFormat: "{0:D} - {1:D}",