@progress/kendo-react-scheduler 16.1.0-develop.7 → 16.1.0-develop.8

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.
Files changed (40) hide show
  1. package/Scheduler.js +1 -1
  2. package/Scheduler.mjs +199 -191
  3. package/components/BaseView.d.ts +1 -0
  4. package/components/BaseView.js +1 -1
  5. package/components/BaseView.mjs +7 -7
  6. package/components/DateHeaderCell.js +1 -1
  7. package/components/DateHeaderCell.mjs +5 -5
  8. package/constants/index.d.ts +2 -0
  9. package/constants/index.js +1 -1
  10. package/constants/index.mjs +15 -13
  11. package/dist/cdn/js/kendo-react-scheduler.js +1 -1
  12. package/editors/SchedulerRecurrenceDialog.js +1 -1
  13. package/editors/SchedulerRecurrenceDialog.mjs +191 -188
  14. package/hooks/useSlotExpand.js +1 -1
  15. package/hooks/useSlotExpand.mjs +22 -22
  16. package/items/SchedulerViewItem.d.ts +2 -0
  17. package/items/SchedulerViewItem.js +1 -1
  18. package/items/SchedulerViewItem.mjs +118 -116
  19. package/package-metadata.js +1 -1
  20. package/package-metadata.mjs +2 -2
  21. package/package.json +12 -12
  22. package/slots/SchedulerSlot.d.ts +2 -0
  23. package/slots/SchedulerSlot.js +1 -1
  24. package/slots/SchedulerSlot.mjs +1 -0
  25. package/tasks/SchedulerTask.js +1 -1
  26. package/tasks/SchedulerTask.mjs +12 -12
  27. package/views/agenda/AgendaView.js +1 -1
  28. package/views/agenda/AgendaView.mjs +48 -24
  29. package/views/common/VerticalResourceIterator.d.ts +1 -0
  30. package/views/common/VerticalResourceIterator.js +1 -1
  31. package/views/common/VerticalResourceIterator.mjs +29 -29
  32. package/views/day/MultiDayView.js +1 -1
  33. package/views/day/MultiDayView.mjs +77 -77
  34. package/views/month/MonthView.js +1 -1
  35. package/views/month/MonthView.mjs +67 -67
  36. package/views/time/MultiDayTimelineView.js +1 -1
  37. package/views/time/MultiDayTimelineView.mjs +44 -44
  38. package/components/footer/bussiness-hours/BussinessHours.d.ts +0 -20
  39. package/components/footer/bussiness-hours/BussinessHours.js +0 -8
  40. package/components/footer/bussiness-hours/BussinessHours.mjs +0 -29
@@ -10,60 +10,60 @@ import { getPadding as k, getRect as C, setRect as z } from "../views/common/uti
10
10
  import { BORDER_WIDTH as A } from "../constants/index.mjs";
11
11
  import { useIsomorphicLayoutEffect as F } from "@progress/kendo-react-common";
12
12
  import { useSchedulerElementContext as M } from "../context/SchedulerContext.mjs";
13
- const j = (r, o) => {
13
+ const j = (t, o) => {
14
14
  const l = f.useRef(void 0), b = f.useRef(0), g = M(), B = () => {
15
- if (!r.current)
15
+ if (!t.current)
16
16
  return;
17
- const n = r.current.element;
17
+ const n = t.current.element;
18
18
  n && (b.current = n.clientHeight);
19
19
  }, p = f.useCallback(() => {
20
- if (!o || !r.current)
20
+ if (!o || !t.current)
21
21
  return;
22
- const n = r.current.element, v = r.current.props;
22
+ const n = t.current.element, v = t.current.props;
23
23
  if (!n)
24
24
  return;
25
25
  const a = k(n), e = /* @__PURE__ */ new Map();
26
26
  let m = !1;
27
- const s = v.items.filter((t) => t._ref.current);
28
- s.forEach((t) => {
27
+ const s = v.items.filter((r) => r._ref.current);
28
+ s.forEach((r) => {
29
29
  var _, x, R, H, E;
30
- if (!t._ref.current)
30
+ if (!r._ref.current)
31
31
  return;
32
- const { height: u } = C(t._ref.current.element), c = (R = (x = (_ = t._ref.current) == null ? void 0 : _._order) != null ? x : t.order) != null ? R : -1;
33
- (H = t._ref.current.element) != null && H.style.top && (m = !0), ((E = e.get(c)) != null ? E : 0) < u && e.set(c, u);
32
+ const { height: u } = C(r._ref.current.element), c = (R = (x = (_ = r._ref.current) == null ? void 0 : _._order) != null ? x : r.order) != null ? R : -1;
33
+ (H = r._ref.current.element) != null && H.style.top && (m = !0), ((E = e.get(c)) != null ? E : 0) < u && e.set(c, u);
34
34
  });
35
35
  let i, w;
36
36
  if (!m || e.size === 0) {
37
37
  n.style.minHeight = "";
38
38
  return;
39
39
  } else {
40
- const t = Math.max(...Array.from(e.keys()));
41
- w = t + 1;
40
+ const r = Math.max(...Array.from(e.keys()));
41
+ w = r + 1;
42
42
  const u = Math.max(...Array.from(e.values()));
43
43
  i = 0;
44
- for (let c = 0; c <= t; c++)
44
+ for (let c = 0; c <= r; c++)
45
45
  i += e.has(c) ? e.get(c) : u;
46
46
  }
47
47
  const O = typeof o == "object" && o.offsetTop ? o.offsetTop : 0;
48
48
  let h = typeof o == "object" && o.offsetBottom ? o.offsetBottom : 0;
49
49
  if (h > 0) {
50
- const t = n.querySelector(".k-more-events");
51
- if (t) {
52
- const u = parseFloat(window.getComputedStyle(t).bottom) || 0;
53
- h = t.offsetHeight + u;
50
+ const r = n.querySelector(".k-more-events");
51
+ if (r) {
52
+ const u = parseFloat(window.getComputedStyle(r).bottom) || 0;
53
+ h = r.offsetHeight + u;
54
54
  }
55
55
  }
56
56
  const y = w * A * 2 + i - a + O + h;
57
57
  s.length ? y > b.current - a && z(n, { height: y }, !0) : n && (n.style.minHeight = "");
58
- }, [o, r]), d = f.useCallback(() => {
58
+ }, [o, t]), d = f.useCallback(() => {
59
59
  l.current !== void 0 && window.cancelAnimationFrame(l.current), l.current = window.requestAnimationFrame(() => {
60
60
  p();
61
61
  });
62
62
  }, [p]);
63
- F(B, []), f.useEffect(p, [r, r.current && r.current.props, o]), f.useEffect(() => {
64
- if (!r.current)
63
+ F(B, []), f.useEffect(p, [t, t.current && t.current.props, o]), f.useEffect(() => {
64
+ if (!t.current)
65
65
  return;
66
- const a = r.current.props.items.filter((e) => e._ref.current).map((e) => {
66
+ const a = t.current.props.items.filter((e) => e._ref.current).map((e) => {
67
67
  if (!e._ref.current || !e._ref.current.element || !g.current)
68
68
  return;
69
69
  const m = window.ResizeObserver, s = m && new m(d);
@@ -76,7 +76,7 @@ const j = (r, o) => {
76
76
  return () => {
77
77
  a.forEach((e) => e && e());
78
78
  };
79
- }, [d, g, r]);
79
+ }, [d, g, t, t.current && t.current.props]);
80
80
  };
81
81
  export {
82
82
  j as useSlotExpand
@@ -13,6 +13,8 @@ import * as React from 'react';
13
13
  export interface SchedulerViewItemProps extends SchedulerItemProps {
14
14
  /** @hidden */
15
15
  ignoreIsAllDay?: boolean;
16
+ /** @hidden */
17
+ slotHeaderOffset?: number;
16
18
  /**
17
19
  * Overrides the default component responsible for visualizing a single item.
18
20
  *
@@ -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 Re=require("react"),ye=require("./SchedulerItem.js"),q=require("../utils/index.js"),U=require("../views/common/utils.js"),F=require("../constants/index.js"),Ee=require("@progress/kendo-react-intl"),te=require("./SchedulerItemContent.js"),A=require("@progress/kendo-react-common"),I=require("@progress/kendo-svg-icons"),De=require("../hooks/useEditable.js"),ne=require("../context/SchedulerViewContext.js"),Se=require("../context/SchedulerContext.js"),be=require("../hooks/useRowSync.js");function Ae(e){const _=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const O in e)if(O!=="default"){const M=Object.getOwnPropertyDescriptor(e,O);Object.defineProperty(_,O,M.get?M:{enumerable:!0,get:()=>e[O]})}}return _.default=e,Object.freeze(_)}const t=Ae(Re),j=1,K=25,re=t.forwardRef((e,_)=>{const{item:O,_ref:M,itemRef:ce,...oe}=e,L=t.useRef(void 0),E=t.useRef(void 0),m=t.useRef(null),J=t.useRef(null),Q=t.useRef(null),le=De.useEditable(e.editable);t.useImperativeHandle(J,()=>({props:e,element:m.current&&m.current.element})),t.useImperativeHandle(_,()=>J.current),t.useImperativeHandle(M,()=>m.current),t.useImperativeHandle(ce,()=>m.current);const ae=O||ie.item,W=Ee.useInternationalization(),[se]=ne.useSchedulerViewItemsContext(),[ue]=ne.useSchedulerViewSlotsContext(),P=Se.useSchedulerElementContext(),[de,Y]=t.useState(!0),[me,fe]=t.useState(!1),f=t.useRef(e.order),X=t.useRef(0),C=A.useDir(P),he=t.useMemo(()=>{var n,r;return e.isAllDay?(n=e.title)!=null?n:"":`(${W.format("{0:t} - {1:t}",e.zonedStart,e.zonedEnd)}): ${(r=e.title)!=null?r:""}`},[W,e.isAllDay,e.title,e.zonedEnd,e.zonedStart]);let H;e.isRecurring&&!e.isException?H="recurring":!e.isRecurring&&e.isException&&(H="non-recurring");const ge=t.useMemo(()=>W.format("{0:t} – {1:t}",e.zonedStart,e.zonedEnd),[W,e.zonedStart,e.zonedEnd]),Z=(n,r)=>{let a=1;return n.forEach(c=>{const s=r.filter(z=>$(c.current.props,z.props));s.length>a&&(a=s.length)}),a},ve=(n,r)=>n.map(c=>r.filter(s=>$(c.current.props,s.props))),we=(n,r,a,c=!1)=>{var B;const s=r.filter(i=>i.props.order!==null&&i.props.order!==void 0).map(i=>{let l=i.props.start,u=i.props.end;if(i.props.isAllDay||c){l=new Date(l.getFullYear(),l.getMonth(),l.getDate());const y=new Date(u.getFullYear(),u.getMonth(),u.getDate());u=y.getTime()<=l.getTime()?new Date(l.getFullYear(),l.getMonth(),l.getDate()+1):y}return{order:i.props.order,start:l,end:u}}),z=Array.from(new Set(s.map(i=>i.order))).sort((i,l)=>i-l),R=new Map;for(const i of s)R.has(i.order)||R.set(i.order,[]),R.get(i.order).push({start:i.start,end:i.end});const x=[],D=new Map;for(const i of z){const l=R.get(i);let u=-1,y=0;D.forEach((v,N)=>{if(N>=i)return;const S=R.get(N);if(!S)return;l.some(o=>S.some(g=>q.intersects(g.start,g.end,o.start,o.end,a)))&&v+1>y&&(y=v+1)});for(let v=y;v<x.length;v++)if(l.every(S=>x[v].every(T=>!q.intersects(T.start,T.end,S.start,S.end,a)))){u=v;break}u===-1&&(u=x.length,x.push([])),x[u].push(...l),D.set(i,u)}return(B=D.get(n))!=null?B:n},$=(n,r)=>q.intersects(n.start,n.end,r.start,r.end)&&n.group.index===r.group.index&&n.range.index===r.range.index&&(n.range.isAllDay===void 0||r.range.isAllDay===void 0||n.range.isAllDay===r.range.isAllDay)&&(e.ignoreIsAllDay||n.isAllDay===r.isAllDay),V=()=>{var y,v,N,S,T;const n=(ue||[]).filter(o=>o.current&&$(o.current.props,e)),r=m.current&&m.current.element,a=q.first(n);if(n.length===0){Y(!1);return}if(!a.current||!r)return;const c=U.getRect(a.current.element),s=[],z=[],R=[];(se||[]).forEach(o=>{o.current&&(o.current.props.dragHint?z.push(o.current):o.current.props.resizeHint?R.push(o.current):s.push(o.current))});const x=e.dragHint||e.resizeHint?q.calculateOrder(m.current,e.dragHint?z:R,n,e.ignoreIsAllDay):(y=e.order)!=null?y:0;if(!e.vertical&&!(e.dragHint||e.resizeHint)&&e.order!==null&&e.order!==void 0){const g=(e.ignoreIsAllDay?s:s.filter(k=>k.props.isAllDay)).filter(k=>k.props.group.index===e.group.index),h=(v=e.style)==null?void 0:v.height,b=typeof h=="number"?h:parseFloat(h),d=h!=null&&Number.isNaN(b),w=!!e.ignoreIsAllDay,G=w?!0:!d;f.current=we(e.order,g,G,w)}else f.current=x;let D=e.dragHint||e.resizeHint?Z(n,e.dragHint?z:R):Z(n,s);const B=ve(n,s);let i=0;const l=!e.vertical&&f.current!==null;if(B.forEach(o=>{let g=0;o.forEach(h=>{if(!l){const b=U.getRect(h.element);h.props.order!==null&&h.props.order!==void 0&&h.props.order<f.current&&(g=b.top+b.height-c.top-F.BORDER_WIDTH*f.current+j)}}),g>i&&(i=g)}),l){const o=(N=e.style)==null?void 0:N.height,g=typeof o=="number"?o:parseFloat(o);if(o==null)i=f.current*(K+j);else if(!Number.isNaN(g))i=f.current*(g+j);else{const h=(e.ignoreIsAllDay?s:s.filter(d=>d.props.isAllDay)).filter(d=>d.props.group.index===e.group.index&&d.element!==r&&(!e.ignoreIsAllDay||!a.current||q.intersects(d.props.start,d.props.end,a.current.props.start,a.current.props.end))),b=new Map;h.forEach(d=>{var k,ee;const w=d._order;if(w==null||w>=f.current)return;const G=((k=d.element)==null?void 0:k.offsetHeight)||K;b.set(w,Math.max((ee=b.get(w))!=null?ee:0,G))}),i=Array.from(b.values()).reduce((d,w)=>d+w+j,0)}}if(n.length===0){Y(!1);return}const u=le.add?20:0;c.width=e.vertical?c.width/D-F.BORDER_WIDTH-u/D:c.width*n.length-F.BORDER_WIDTH,e.vertical?c.height=c.height*n.length-F.BORDER_WIDTH:(e.resizeHint||e.dragHint)&&D<=1||(c.height=(T=(S=e.style)==null?void 0:S.height)!=null?T:K),c.left=e.vertical?c.left+f.current*c.width+F.BORDER_WIDTH*f.current:c.left,c.top=e.vertical?c.top:c.top+i+F.BORDER_WIDTH*f.current,X.current=D,U.setRect(r,c),fe(!0),Y(!0)},p=t.useCallback(n=>{const r=n&&n[0],a=Q.current;L.current!==void 0&&window.cancelAnimationFrame(L.current),a&&r&&(a.width!==r.contentRect.width||a.height!==r.contentRect.height)&&(L.current=window.requestAnimationFrame(()=>{V()})),Q.current={width:r.contentRect.width,height:r.contentRect.height}},[V]);t.useEffect(()=>(V(),E.current!==void 0&&window.cancelAnimationFrame(E.current),E.current=window.requestAnimationFrame(()=>{E.current=window.requestAnimationFrame(()=>{E.current=void 0,V()})}),()=>{E.current!==void 0&&(window.cancelAnimationFrame(E.current),E.current=void 0)}));const Ie=m.current&&m.current.element?m.current.element.closest(".k-scheduler-layout"):null;return be.useRowSync({element:Ie,selector:".k-resource-row",horizontalAttribute:"data-depth-index",verticalAttribute:"data-resource-index",applyTo:".k-resource-cell",syncHeight:e.isLast}),t.useEffect(()=>{if(!P.current)return;const n=window.ResizeObserver,r=n&&new n(p);return r&&r.observe(P.current),()=>{r&&r.disconnect()}},[p,P]),t.createElement(ae,{...oe,_ref:m,_maxSiblingsPerSlot:X,_order:f,itemRef:m,style:{visibility:me?void 0:"hidden",display:de?void 0:"none",...e.style}},!e.resizeHint&&t.createElement(t.Fragment,null,e.tail&&!e.vertical&&t.createElement("span",{className:"k-event-continuation"},t.createElement(A.IconWrap,{name:C==="rtl"?"chevron-right":"chevron-left",icon:C==="rtl"?I.chevronRightIcon:I.chevronLeftIcon})),t.createElement("div",{title:he},e.tail&&e.vertical&&t.createElement("span",{className:"k-event-continuation"},t.createElement(A.IconWrap,{name:"chevron-up",icon:I.chevronUpIcon})),t.createElement(te.SchedulerItemContent,{className:"k-event-title"},e.title),!e.isAllDay&&t.createElement(te.SchedulerItemContent,{className:"k-event-time"},H==="recurring"&&t.createElement("span",{className:"k-event-recurrence-icon"},t.createElement(A.IconWrap,{name:"arrow-rotate-cw",icon:I.arrowRotateCwIcon})),H==="non-recurring"&&t.createElement("span",{className:"k-event-recurrence-icon"},t.createElement(A.IconWrap,{name:"arrows-no-repeat",icon:I.arrowsNoRepeatIcon})),ge),e.head&&e.vertical&&t.createElement("span",{className:"k-event-continuation"},t.createElement(A.IconWrap,{name:"chevron-down",icon:I.chevronDownIcon}))),H&&t.createElement("span",{className:"k-event-recurrence-icon"},t.createElement(A.IconWrap,{name:H==="recurring"?"arrow-rotate-cw":"arrows-no-repeat",icon:H==="recurring"?I.arrowRotateCwIcon:I.arrowsNoRepeatIcon})),e.head&&!e.vertical&&t.createElement("span",{className:"k-event-continuation"},t.createElement(A.IconWrap,{name:C==="rtl"?"chevron-left":"chevron-right",icon:C==="rtl"?I.chevronLeftIcon:I.chevronRightIcon}))))}),ie={item:ye.SchedulerItem};re.displayName="KendoReactSchedulerViewItem";exports.SchedulerViewItem=re;exports.schedulerViewItemDefaultProps=ie;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ye=require("react"),Ee=require("./SchedulerItem.js"),q=require("../utils/index.js"),K=require("../views/common/utils.js"),F=require("../constants/index.js"),De=require("@progress/kendo-react-intl"),ne=require("./SchedulerItemContent.js"),H=require("@progress/kendo-react-common"),w=require("@progress/kendo-svg-icons"),Se=require("../hooks/useEditable.js"),re=require("../context/SchedulerViewContext.js"),be=require("../context/SchedulerContext.js"),He=require("../hooks/useRowSync.js");function Ae(e){const _=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const x in e)if(x!=="default"){const W=Object.getOwnPropertyDescriptor(e,x);Object.defineProperty(_,x,W.get?W:{enumerable:!0,get:()=>e[x]})}}return _.default=e,Object.freeze(_)}const t=Ae(ye),L=1,J=25,ie=t.forwardRef((e,_)=>{const{item:x,_ref:W,itemRef:oe,...ae}=e,Y=t.useRef(void 0),R=t.useRef(void 0),m=t.useRef(null),Q=t.useRef(null),X=t.useRef(null),le=Se.useEditable(e.editable);t.useImperativeHandle(Q,()=>({props:e,element:m.current&&m.current.element})),t.useImperativeHandle(_,()=>Q.current),t.useImperativeHandle(W,()=>m.current),t.useImperativeHandle(oe,()=>m.current);const se=x||ce.item,P=De.useInternationalization(),[ue]=re.useSchedulerViewItemsContext(),[de]=re.useSchedulerViewSlotsContext(),C=be.useSchedulerElementContext(),[me,$]=t.useState(!0),[fe,he]=t.useState(!1),f=t.useRef(e.order),Z=t.useRef(0),V=H.useDir(C),ge=t.useMemo(()=>{var n,r;return e.isAllDay?(n=e.title)!=null?n:"":`(${P.format("{0:t} - {1:t}",e.zonedStart,e.zonedEnd)}): ${(r=e.title)!=null?r:""}`},[P,e.isAllDay,e.title,e.zonedEnd,e.zonedStart]);let A;e.isRecurring&&!e.isException?A="recurring":!e.isRecurring&&e.isException&&(A="non-recurring");const ve=t.useMemo(()=>P.format("{0:t} – {1:t}",e.zonedStart,e.zonedEnd),[P,e.zonedStart,e.zonedEnd]),p=(n,r)=>{let l=1;return n.forEach(c=>{const s=r.filter(z=>G(c.current.props,z.props));s.length>l&&(l=s.length)}),l},we=(n,r)=>n.map(c=>r.filter(s=>G(c.current.props,s.props))),Ie=(n,r,l,c=!1)=>{var j;const s=r.filter(i=>i.props.order!==null&&i.props.order!==void 0).map(i=>{let a=i.props.start,u=i.props.end;if(i.props.isAllDay||c){a=new Date(a.getFullYear(),a.getMonth(),a.getDate());const E=new Date(u.getFullYear(),u.getMonth(),u.getDate());u=E.getTime()<=a.getTime()?new Date(a.getFullYear(),a.getMonth(),a.getDate()+1):E}return{order:i.props.order,start:a,end:u}}),z=Array.from(new Set(s.map(i=>i.order))).sort((i,a)=>i-a),I=new Map;for(const i of s)I.has(i.order)||I.set(i.order,[]),I.get(i.order).push({start:i.start,end:i.end});const O=[],y=new Map;for(const i of z){const a=I.get(i);let u=-1,E=0;y.forEach((g,N)=>{if(N>=i)return;const D=I.get(N);if(!D)return;a.some(M=>D.some(o=>q.intersects(o.start,o.end,M.start,M.end,l)))&&g+1>E&&(E=g+1)});for(let g=E;g<O.length;g++)if(a.every(D=>O[g].every(T=>!q.intersects(T.start,T.end,D.start,D.end,l)))){u=g;break}u===-1&&(u=O.length,O.push([])),O[u].push(...a),y.set(i,u)}return(j=y.get(n))!=null?j:n},G=(n,r)=>q.intersects(n.start,n.end,r.start,r.end)&&n.group.index===r.group.index&&n.range.index===r.range.index&&(n.range.isAllDay===void 0||r.range.isAllDay===void 0||n.range.isAllDay===r.range.isAllDay)&&(e.ignoreIsAllDay||n.isAllDay===r.isAllDay),B=()=>{var g,N,D,T,M;const n=(de||[]).filter(o=>o.current&&G(o.current.props,e)),r=m.current&&m.current.element,l=q.first(n);if(n.length===0){$(!1);return}if(!l.current||!r)return;const c=K.getRect(l.current.element),s=[],z=[],I=[];(ue||[]).forEach(o=>{o.current&&(o.current.props.dragHint?z.push(o.current):o.current.props.resizeHint?I.push(o.current):s.push(o.current))});const O=e.dragHint||e.resizeHint?q.calculateOrder(m.current,e.dragHint?z:I,n,e.ignoreIsAllDay):(g=e.order)!=null?g:0;if(!e.vertical&&!(e.dragHint||e.resizeHint)&&e.order!==null&&e.order!==void 0){const S=(e.ignoreIsAllDay?s:s.filter(k=>k.props.isAllDay)).filter(k=>k.props.group.index===e.group.index),h=(N=e.style)==null?void 0:N.height,b=typeof h=="number"?h:parseFloat(h),d=h!=null&&Number.isNaN(b),v=!!e.ignoreIsAllDay,U=v?!0:!d;f.current=Ie(e.order,S,U,v)}else f.current=O;let y=e.dragHint||e.resizeHint?p(n,e.dragHint?z:I):p(n,s);const j=we(n,s);let i=0;const a=!e.vertical&&f.current!==null;if(j.forEach(o=>{let S=0;o.forEach(h=>{if(!a){const b=K.getRect(h.element);h.props.order!==null&&h.props.order!==void 0&&h.props.order<f.current&&(S=b.top+b.height-c.top-F.BORDER_WIDTH*f.current+L)}}),S>i&&(i=S)}),a){const o=(D=e.style)==null?void 0:D.height,S=typeof o=="number"?o:parseFloat(o);if(o==null)i=f.current*(J+L);else if(!Number.isNaN(S))i=f.current*(S+L);else{const h=(e.ignoreIsAllDay?s:s.filter(d=>d.props.isAllDay)).filter(d=>d.props.group.index===e.group.index&&d.element!==r&&(!e.ignoreIsAllDay||!l.current||q.intersects(d.props.start,d.props.end,l.current.props.start,l.current.props.end))),b=new Map;h.forEach(d=>{var k,te;const v=d._order;if(v==null||v>=f.current)return;const U=((k=d.element)==null?void 0:k.offsetHeight)||J;b.set(v,Math.max((te=b.get(v))!=null?te:0,U))}),i=Array.from(b.values()).reduce((d,v)=>d+v+L,0)}}if(n.length===0){$(!1);return}const u=le.add?20:0;c.width=e.vertical?c.width/y-F.BORDER_WIDTH-u/y:c.width*n.length-F.BORDER_WIDTH,e.vertical?c.height=c.height*n.length-F.BORDER_WIDTH:(e.resizeHint||e.dragHint)&&y<=1||(c.height=(M=(T=e.style)==null?void 0:T.height)!=null?M:J),c.left=e.vertical?c.left+f.current*c.width+F.BORDER_WIDTH*f.current:c.left;const E=!e.vertical&&e.slotHeaderOffset||0;c.top=e.vertical?c.top:c.top+i+F.BORDER_WIDTH*f.current+E,Z.current=y,K.setRect(r,c),he(!0),$(!0)},ee=t.useCallback(n=>{const r=n&&n[0],l=X.current;Y.current!==void 0&&window.cancelAnimationFrame(Y.current),l&&r&&(l.width!==r.contentRect.width||l.height!==r.contentRect.height)&&(Y.current=window.requestAnimationFrame(()=>{B()})),X.current={width:r.contentRect.width,height:r.contentRect.height}},[B]);t.useEffect(()=>(B(),R.current!==void 0&&window.cancelAnimationFrame(R.current),R.current=window.requestAnimationFrame(()=>{R.current=window.requestAnimationFrame(()=>{R.current=void 0,B()})}),()=>{R.current!==void 0&&(window.cancelAnimationFrame(R.current),R.current=void 0)}));const Re=m.current&&m.current.element?m.current.element.closest(".k-scheduler-layout"):null;return He.useRowSync({element:Re,selector:".k-resource-row",horizontalAttribute:"data-depth-index",verticalAttribute:"data-resource-index",applyTo:".k-resource-cell",syncHeight:e.isLast}),t.useEffect(()=>{if(!C.current)return;const n=window.ResizeObserver,r=n&&new n(ee);return r&&r.observe(C.current),()=>{r&&r.disconnect()}},[ee,C]),t.createElement(se,{...ae,_ref:m,_maxSiblingsPerSlot:Z,_order:f,itemRef:m,style:{visibility:fe?void 0:"hidden",display:me?void 0:"none",...e.style}},!e.resizeHint&&t.createElement(t.Fragment,null,e.tail&&!e.vertical&&t.createElement("span",{className:"k-event-continuation"},t.createElement(H.IconWrap,{name:V==="rtl"?"chevron-right":"chevron-left",icon:V==="rtl"?w.chevronRightIcon:w.chevronLeftIcon})),t.createElement("div",{title:ge},e.tail&&e.vertical&&t.createElement("span",{className:"k-event-continuation"},t.createElement(H.IconWrap,{name:"chevron-up",icon:w.chevronUpIcon})),t.createElement(ne.SchedulerItemContent,{className:"k-event-title"},e.title),!e.isAllDay&&t.createElement(ne.SchedulerItemContent,{className:"k-event-time"},A==="recurring"&&t.createElement("span",{className:"k-event-recurrence-icon"},t.createElement(H.IconWrap,{name:"arrow-rotate-cw",icon:w.arrowRotateCwIcon})),A==="non-recurring"&&t.createElement("span",{className:"k-event-recurrence-icon"},t.createElement(H.IconWrap,{name:"arrows-no-repeat",icon:w.arrowsNoRepeatIcon})),ve),e.head&&e.vertical&&t.createElement("span",{className:"k-event-continuation"},t.createElement(H.IconWrap,{name:"chevron-down",icon:w.chevronDownIcon}))),A&&t.createElement("span",{className:"k-event-recurrence-icon"},t.createElement(H.IconWrap,{name:A==="recurring"?"arrow-rotate-cw":"arrows-no-repeat",icon:A==="recurring"?w.arrowRotateCwIcon:w.arrowsNoRepeatIcon})),e.head&&!e.vertical&&t.createElement("span",{className:"k-event-continuation"},t.createElement(H.IconWrap,{name:V==="rtl"?"chevron-left":"chevron-right",icon:V==="rtl"?w.chevronLeftIcon:w.chevronRightIcon}))))}),ce={item:Ee.SchedulerItem};ie.displayName="KendoReactSchedulerViewItem";exports.SchedulerViewItem=ie;exports.schedulerViewItemDefaultProps=ce;
@@ -6,139 +6,139 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  import * as t from "react";
9
- import { SchedulerItem as Ee } from "./SchedulerItem.mjs";
10
- import { first as Ie, calculateOrder as Re, intersects as V } from "../utils/index.mjs";
11
- import { getRect as Q, setRect as Ae } from "../views/common/utils.mjs";
9
+ import { SchedulerItem as Ie } from "./SchedulerItem.mjs";
10
+ import { first as Re, calculateOrder as Ae, intersects as C } from "../utils/index.mjs";
11
+ import { getRect as X, setRect as Se } from "../views/common/utils.mjs";
12
12
  import { BORDER_WIDTH as k } from "../constants/index.mjs";
13
- import { useInternationalization as Se } from "@progress/kendo-react-intl";
14
- import { SchedulerItemContent as X } from "./SchedulerItemContent.mjs";
15
- import { useDir as De, IconWrap as z } from "@progress/kendo-react-common";
16
- import { chevronRightIcon as Z, chevronLeftIcon as p, chevronUpIcon as He, arrowRotateCwIcon as ee, arrowsNoRepeatIcon as te, chevronDownIcon as be } from "@progress/kendo-svg-icons";
17
- import { useEditable as ze } from "../hooks/useEditable.mjs";
18
- import { useSchedulerViewItemsContext as xe, useSchedulerViewSlotsContext as Ne } from "../context/SchedulerViewContext.mjs";
19
- import { useSchedulerElementContext as Fe } from "../context/SchedulerContext.mjs";
20
- import { useRowSync as ke } from "../hooks/useRowSync.mjs";
21
- const C = 1, Y = 25, Me = t.forwardRef(
22
- (e, re) => {
23
- const { item: ne, _ref: ie, itemRef: oe, ...ce } = e, q = t.useRef(void 0), I = t.useRef(void 0), m = t.useRef(null), G = t.useRef(null), U = t.useRef(null), le = ze(e.editable);
24
- t.useImperativeHandle(G, () => ({ props: e, element: m.current && m.current.element })), t.useImperativeHandle(re, () => G.current), t.useImperativeHandle(ie, () => m.current), t.useImperativeHandle(oe, () => m.current);
25
- const ae = ne || Te.item, M = Se(), [se] = xe(), [ue] = Ne(), T = Fe(), [de, W] = t.useState(!0), [me, fe] = t.useState(!1), f = t.useRef(e.order), $ = t.useRef(0), O = De(T), he = t.useMemo(
13
+ import { useInternationalization as De } from "@progress/kendo-react-intl";
14
+ import { SchedulerItemContent as Z } from "./SchedulerItemContent.mjs";
15
+ import { useDir as He, IconWrap as z } from "@progress/kendo-react-common";
16
+ import { chevronRightIcon as p, chevronLeftIcon as ee, chevronUpIcon as be, arrowRotateCwIcon as te, arrowsNoRepeatIcon as re, chevronDownIcon as ze } from "@progress/kendo-svg-icons";
17
+ import { useEditable as xe } from "../hooks/useEditable.mjs";
18
+ import { useSchedulerViewItemsContext as Ne, useSchedulerViewSlotsContext as Fe } from "../context/SchedulerViewContext.mjs";
19
+ import { useSchedulerElementContext as ke } from "../context/SchedulerContext.mjs";
20
+ import { useRowSync as Me } from "../hooks/useRowSync.mjs";
21
+ const q = 1, G = 25, Te = t.forwardRef(
22
+ (e, ne) => {
23
+ const { item: ie, _ref: oe, itemRef: ce, ...le } = e, W = t.useRef(void 0), y = t.useRef(void 0), m = t.useRef(null), U = t.useRef(null), $ = t.useRef(null), ae = xe(e.editable);
24
+ t.useImperativeHandle(U, () => ({ props: e, element: m.current && m.current.element })), t.useImperativeHandle(ne, () => U.current), t.useImperativeHandle(oe, () => m.current), t.useImperativeHandle(ce, () => m.current);
25
+ const se = ie || Oe.item, T = De(), [ue] = Ne(), [de] = Fe(), O = ke(), [me, B] = t.useState(!0), [fe, he] = t.useState(!1), f = t.useRef(e.order), K = t.useRef(0), P = He(O), ge = t.useMemo(
26
26
  () => {
27
27
  var r, n;
28
- return e.isAllDay ? (r = e.title) != null ? r : "" : `(${M.format("{0:t} - {1:t}", e.zonedStart, e.zonedEnd)}): ${(n = e.title) != null ? n : ""}`;
28
+ return e.isAllDay ? (r = e.title) != null ? r : "" : `(${T.format("{0:t} - {1:t}", e.zonedStart, e.zonedEnd)}): ${(n = e.title) != null ? n : ""}`;
29
29
  },
30
- [M, e.isAllDay, e.title, e.zonedEnd, e.zonedStart]
30
+ [T, e.isAllDay, e.title, e.zonedEnd, e.zonedStart]
31
31
  );
32
32
  let D;
33
33
  e.isRecurring && !e.isException ? D = "recurring" : !e.isRecurring && e.isException && (D = "non-recurring");
34
- const ge = t.useMemo(
35
- () => M.format("{0:t} – {1:t}", e.zonedStart, e.zonedEnd),
36
- [M, e.zonedStart, e.zonedEnd]
37
- ), K = (r, n) => {
34
+ const ve = t.useMemo(
35
+ () => T.format("{0:t} – {1:t}", e.zonedStart, e.zonedEnd),
36
+ [T, e.zonedStart, e.zonedEnd]
37
+ ), j = (r, n) => {
38
38
  let a = 1;
39
39
  return r.forEach((o) => {
40
- const s = n.filter((H) => B(o.current.props, H.props));
40
+ const s = n.filter((H) => L(o.current.props, H.props));
41
41
  s.length > a && (a = s.length);
42
42
  }), a;
43
- }, ve = (r, n) => r.map((o) => n.filter((s) => B(o.current.props, s.props))), we = (r, n, a, o = !1) => {
44
- var _;
43
+ }, we = (r, n) => r.map((o) => n.filter((s) => L(o.current.props, s.props))), ye = (r, n, a, o = !1) => {
44
+ var V;
45
45
  const s = n.filter((i) => i.props.order !== null && i.props.order !== void 0).map((i) => {
46
46
  let l = i.props.start, u = i.props.end;
47
47
  if (i.props.isAllDay || o) {
48
48
  l = new Date(l.getFullYear(), l.getMonth(), l.getDate());
49
- const E = new Date(u.getFullYear(), u.getMonth(), u.getDate());
50
- u = E.getTime() <= l.getTime() ? new Date(l.getFullYear(), l.getMonth(), l.getDate() + 1) : E;
49
+ const I = new Date(u.getFullYear(), u.getMonth(), u.getDate());
50
+ u = I.getTime() <= l.getTime() ? new Date(l.getFullYear(), l.getMonth(), l.getDate() + 1) : I;
51
51
  }
52
52
  return { order: i.props.order, start: l, end: u };
53
- }), H = Array.from(new Set(s.map((i) => i.order))).sort((i, l) => i - l), y = /* @__PURE__ */ new Map();
53
+ }), H = Array.from(new Set(s.map((i) => i.order))).sort((i, l) => i - l), w = /* @__PURE__ */ new Map();
54
54
  for (const i of s)
55
- y.has(i.order) || y.set(i.order, []), y.get(i.order).push({ start: i.start, end: i.end });
56
- const b = [], R = /* @__PURE__ */ new Map();
55
+ w.has(i.order) || w.set(i.order, []), w.get(i.order).push({ start: i.start, end: i.end });
56
+ const b = [], E = /* @__PURE__ */ new Map();
57
57
  for (const i of H) {
58
- const l = y.get(i);
59
- let u = -1, E = 0;
60
- R.forEach((v, x) => {
58
+ const l = w.get(i);
59
+ let u = -1, I = 0;
60
+ E.forEach((g, x) => {
61
61
  if (x >= i)
62
62
  return;
63
- const A = y.get(x);
64
- if (!A)
63
+ const R = w.get(x);
64
+ if (!R)
65
65
  return;
66
66
  l.some(
67
- (c) => A.some(
68
- (g) => V(g.start, g.end, c.start, c.end, a)
67
+ (M) => R.some(
68
+ (c) => C(c.start, c.end, M.start, M.end, a)
69
69
  )
70
- ) && v + 1 > E && (E = v + 1);
70
+ ) && g + 1 > I && (I = g + 1);
71
71
  });
72
- for (let v = E; v < b.length; v++)
72
+ for (let g = I; g < b.length; g++)
73
73
  if (l.every(
74
- (A) => b[v].every(
75
- (N) => !V(
74
+ (R) => b[g].every(
75
+ (N) => !C(
76
76
  N.start,
77
77
  N.end,
78
- A.start,
79
- A.end,
78
+ R.start,
79
+ R.end,
80
80
  a
81
81
  )
82
82
  )
83
83
  )) {
84
- u = v;
84
+ u = g;
85
85
  break;
86
86
  }
87
- u === -1 && (u = b.length, b.push([])), b[u].push(...l), R.set(i, u);
87
+ u === -1 && (u = b.length, b.push([])), b[u].push(...l), E.set(i, u);
88
88
  }
89
- return (_ = R.get(r)) != null ? _ : r;
90
- }, B = (r, n) => V(r.start, r.end, n.start, n.end) && r.group.index === n.group.index && r.range.index === n.range.index && // When slotDuration equals a full day, both daySlots and timeSlots have isAllDay=true,
89
+ return (V = E.get(r)) != null ? V : r;
90
+ }, L = (r, n) => C(r.start, r.end, n.start, n.end) && r.group.index === n.group.index && r.range.index === n.range.index && // When slotDuration equals a full day, both daySlots and timeSlots have isAllDay=true,
91
91
  // so we need to also check range.isAllDay to distinguish between them.
92
- (r.range.isAllDay === void 0 || n.range.isAllDay === void 0 || r.range.isAllDay === n.range.isAllDay) && (e.ignoreIsAllDay || r.isAllDay === n.isAllDay), P = () => {
93
- var E, v, x, A, N;
94
- const r = (ue || []).filter((c) => c.current && B(c.current.props, e)), n = m.current && m.current.element, a = Ie(r);
92
+ (r.range.isAllDay === void 0 || n.range.isAllDay === void 0 || r.range.isAllDay === n.range.isAllDay) && (e.ignoreIsAllDay || r.isAllDay === n.isAllDay), _ = () => {
93
+ var g, x, R, N, M;
94
+ const r = (de || []).filter((c) => c.current && L(c.current.props, e)), n = m.current && m.current.element, a = Re(r);
95
95
  if (r.length === 0) {
96
- W(!1);
96
+ B(!1);
97
97
  return;
98
98
  }
99
99
  if (!a.current || !n)
100
100
  return;
101
- const o = Q(a.current.element), s = [], H = [], y = [];
102
- (se || []).forEach((c) => {
103
- c.current && (c.current.props.dragHint ? H.push(c.current) : c.current.props.resizeHint ? y.push(c.current) : s.push(c.current));
101
+ const o = X(a.current.element), s = [], H = [], w = [];
102
+ (ue || []).forEach((c) => {
103
+ c.current && (c.current.props.dragHint ? H.push(c.current) : c.current.props.resizeHint ? w.push(c.current) : s.push(c.current));
104
104
  });
105
- const b = e.dragHint || e.resizeHint ? Re(
105
+ const b = e.dragHint || e.resizeHint ? Ae(
106
106
  m.current,
107
- e.dragHint ? H : y,
107
+ e.dragHint ? H : w,
108
108
  r,
109
109
  e.ignoreIsAllDay
110
- ) : (E = e.order) != null ? E : 0;
110
+ ) : (g = e.order) != null ? g : 0;
111
111
  if (!e.vertical && !(e.dragHint || e.resizeHint) && e.order !== null && e.order !== void 0) {
112
- const g = (e.ignoreIsAllDay ? s : s.filter((F) => F.props.isAllDay)).filter((F) => F.props.group.index === e.group.index), h = (v = e.style) == null ? void 0 : v.height, S = typeof h == "number" ? h : parseFloat(h), d = h != null && Number.isNaN(S), w = !!e.ignoreIsAllDay, L = w ? !0 : !d;
113
- f.current = we(
112
+ const A = (e.ignoreIsAllDay ? s : s.filter((F) => F.props.isAllDay)).filter((F) => F.props.group.index === e.group.index), h = (x = e.style) == null ? void 0 : x.height, S = typeof h == "number" ? h : parseFloat(h), d = h != null && Number.isNaN(S), v = !!e.ignoreIsAllDay, Y = v ? !0 : !d;
113
+ f.current = ye(
114
114
  e.order,
115
- g,
116
- L,
117
- w
115
+ A,
116
+ Y,
117
+ v
118
118
  );
119
119
  } else
120
120
  f.current = b;
121
- let R = e.dragHint || e.resizeHint ? K(r, e.dragHint ? H : y) : K(r, s);
122
- const _ = ve(r, s);
121
+ let E = e.dragHint || e.resizeHint ? j(r, e.dragHint ? H : w) : j(r, s);
122
+ const V = we(r, s);
123
123
  let i = 0;
124
124
  const l = !e.vertical && f.current !== null;
125
- if (_.forEach((c) => {
126
- let g = 0;
125
+ if (V.forEach((c) => {
126
+ let A = 0;
127
127
  c.forEach((h) => {
128
128
  if (!l) {
129
- const S = Q(h.element);
130
- h.props.order !== null && h.props.order !== void 0 && h.props.order < f.current && (g = S.top + S.height - o.top - k * f.current + C);
129
+ const S = X(h.element);
130
+ h.props.order !== null && h.props.order !== void 0 && h.props.order < f.current && (A = S.top + S.height - o.top - k * f.current + q);
131
131
  }
132
- }), g > i && (i = g);
132
+ }), A > i && (i = A);
133
133
  }), l) {
134
- const c = (x = e.style) == null ? void 0 : x.height, g = typeof c == "number" ? c : parseFloat(c);
134
+ const c = (R = e.style) == null ? void 0 : R.height, A = typeof c == "number" ? c : parseFloat(c);
135
135
  if (c == null)
136
- i = f.current * (Y + C);
137
- else if (!Number.isNaN(g))
138
- i = f.current * (g + C);
136
+ i = f.current * (G + q);
137
+ else if (!Number.isNaN(A))
138
+ i = f.current * (A + q);
139
139
  else {
140
140
  const h = (e.ignoreIsAllDay ? s : s.filter((d) => d.props.isAllDay)).filter(
141
- (d) => d.props.group.index === e.group.index && d.element !== n && (!e.ignoreIsAllDay || !a.current || V(
141
+ (d) => d.props.group.index === e.group.index && d.element !== n && (!e.ignoreIsAllDay || !a.current || C(
142
142
  d.props.start,
143
143
  d.props.end,
144
144
  a.current.props.start,
@@ -146,92 +146,94 @@ const C = 1, Y = 25, Me = t.forwardRef(
146
146
  ))
147
147
  ), S = /* @__PURE__ */ new Map();
148
148
  h.forEach((d) => {
149
- var F, J;
150
- const w = d._order;
151
- if (w == null || w >= f.current)
149
+ var F, Q;
150
+ const v = d._order;
151
+ if (v == null || v >= f.current)
152
152
  return;
153
- const L = ((F = d.element) == null ? void 0 : F.offsetHeight) || Y;
154
- S.set(w, Math.max((J = S.get(w)) != null ? J : 0, L));
155
- }), i = Array.from(S.values()).reduce((d, w) => d + w + C, 0);
153
+ const Y = ((F = d.element) == null ? void 0 : F.offsetHeight) || G;
154
+ S.set(v, Math.max((Q = S.get(v)) != null ? Q : 0, Y));
155
+ }), i = Array.from(S.values()).reduce((d, v) => d + v + q, 0);
156
156
  }
157
157
  }
158
158
  if (r.length === 0) {
159
- W(!1);
159
+ B(!1);
160
160
  return;
161
161
  }
162
- const u = le.add ? 20 : 0;
163
- o.width = e.vertical ? o.width / R - k - u / R : o.width * r.length - k, e.vertical ? o.height = o.height * r.length - k : (e.resizeHint || e.dragHint) && R <= 1 || (o.height = (N = (A = e.style) == null ? void 0 : A.height) != null ? N : Y), o.left = e.vertical ? o.left + f.current * o.width + k * f.current : o.left, o.top = e.vertical ? o.top : o.top + i + k * f.current, $.current = R, Ae(n, o), fe(!0), W(!0);
164
- }, j = t.useCallback(
162
+ const u = ae.add ? 20 : 0;
163
+ o.width = e.vertical ? o.width / E - k - u / E : o.width * r.length - k, e.vertical ? o.height = o.height * r.length - k : (e.resizeHint || e.dragHint) && E <= 1 || (o.height = (M = (N = e.style) == null ? void 0 : N.height) != null ? M : G), o.left = e.vertical ? o.left + f.current * o.width + k * f.current : o.left;
164
+ const I = !e.vertical && e.slotHeaderOffset || 0;
165
+ o.top = e.vertical ? o.top : o.top + i + k * f.current + I, K.current = E, Se(n, o), he(!0), B(!0);
166
+ }, J = t.useCallback(
165
167
  (r) => {
166
- const n = r && r[0], a = U.current;
167
- q.current !== void 0 && window.cancelAnimationFrame(q.current), a && n && (a.width !== n.contentRect.width || a.height !== n.contentRect.height) && (q.current = window.requestAnimationFrame(() => {
168
- P();
169
- })), U.current = { width: n.contentRect.width, height: n.contentRect.height };
168
+ const n = r && r[0], a = $.current;
169
+ W.current !== void 0 && window.cancelAnimationFrame(W.current), a && n && (a.width !== n.contentRect.width || a.height !== n.contentRect.height) && (W.current = window.requestAnimationFrame(() => {
170
+ _();
171
+ })), $.current = { width: n.contentRect.width, height: n.contentRect.height };
170
172
  },
171
- [P]
173
+ [_]
172
174
  );
173
- t.useEffect(() => (P(), I.current !== void 0 && window.cancelAnimationFrame(I.current), I.current = window.requestAnimationFrame(() => {
174
- I.current = window.requestAnimationFrame(() => {
175
- I.current = void 0, P();
175
+ t.useEffect(() => (_(), y.current !== void 0 && window.cancelAnimationFrame(y.current), y.current = window.requestAnimationFrame(() => {
176
+ y.current = window.requestAnimationFrame(() => {
177
+ y.current = void 0, _();
176
178
  });
177
179
  }), () => {
178
- I.current !== void 0 && (window.cancelAnimationFrame(I.current), I.current = void 0);
180
+ y.current !== void 0 && (window.cancelAnimationFrame(y.current), y.current = void 0);
179
181
  }));
180
- const ye = m.current && m.current.element ? m.current.element.closest(".k-scheduler-layout") : null;
181
- return ke({
182
- element: ye,
182
+ const Ee = m.current && m.current.element ? m.current.element.closest(".k-scheduler-layout") : null;
183
+ return Me({
184
+ element: Ee,
183
185
  selector: ".k-resource-row",
184
186
  horizontalAttribute: "data-depth-index",
185
187
  verticalAttribute: "data-resource-index",
186
188
  applyTo: ".k-resource-cell",
187
189
  syncHeight: e.isLast
188
190
  }), t.useEffect(() => {
189
- if (!T.current)
191
+ if (!O.current)
190
192
  return;
191
- const r = window.ResizeObserver, n = r && new r(j);
192
- return n && n.observe(T.current), () => {
193
+ const r = window.ResizeObserver, n = r && new r(J);
194
+ return n && n.observe(O.current), () => {
193
195
  n && n.disconnect();
194
196
  };
195
- }, [j, T]), /* @__PURE__ */ t.createElement(
196
- ae,
197
+ }, [J, O]), /* @__PURE__ */ t.createElement(
198
+ se,
197
199
  {
198
- ...ce,
200
+ ...le,
199
201
  _ref: m,
200
- _maxSiblingsPerSlot: $,
202
+ _maxSiblingsPerSlot: K,
201
203
  _order: f,
202
204
  itemRef: m,
203
205
  style: {
204
- visibility: me ? void 0 : "hidden",
205
- display: de ? void 0 : "none",
206
+ visibility: fe ? void 0 : "hidden",
207
+ display: me ? void 0 : "none",
206
208
  ...e.style
207
209
  }
208
210
  },
209
211
  !e.resizeHint && /* @__PURE__ */ t.createElement(t.Fragment, null, e.tail && !e.vertical && /* @__PURE__ */ t.createElement("span", { className: "k-event-continuation" }, /* @__PURE__ */ t.createElement(
210
212
  z,
211
213
  {
212
- name: O === "rtl" ? "chevron-right" : "chevron-left",
213
- icon: O === "rtl" ? Z : p
214
+ name: P === "rtl" ? "chevron-right" : "chevron-left",
215
+ icon: P === "rtl" ? p : ee
214
216
  }
215
- )), /* @__PURE__ */ t.createElement("div", { title: he }, e.tail && e.vertical && /* @__PURE__ */ t.createElement("span", { className: "k-event-continuation" }, /* @__PURE__ */ t.createElement(z, { name: "chevron-up", icon: He })), /* @__PURE__ */ t.createElement(X, { className: "k-event-title" }, e.title), !e.isAllDay && /* @__PURE__ */ t.createElement(X, { className: "k-event-time" }, D === "recurring" && /* @__PURE__ */ t.createElement("span", { className: "k-event-recurrence-icon" }, /* @__PURE__ */ t.createElement(z, { name: "arrow-rotate-cw", icon: ee })), D === "non-recurring" && /* @__PURE__ */ t.createElement("span", { className: "k-event-recurrence-icon" }, /* @__PURE__ */ t.createElement(z, { name: "arrows-no-repeat", icon: te })), ge), e.head && e.vertical && /* @__PURE__ */ t.createElement("span", { className: "k-event-continuation" }, /* @__PURE__ */ t.createElement(z, { name: "chevron-down", icon: be }))), D && /* @__PURE__ */ t.createElement("span", { className: "k-event-recurrence-icon" }, /* @__PURE__ */ t.createElement(
217
+ )), /* @__PURE__ */ t.createElement("div", { title: ge }, e.tail && e.vertical && /* @__PURE__ */ t.createElement("span", { className: "k-event-continuation" }, /* @__PURE__ */ t.createElement(z, { name: "chevron-up", icon: be })), /* @__PURE__ */ t.createElement(Z, { className: "k-event-title" }, e.title), !e.isAllDay && /* @__PURE__ */ t.createElement(Z, { className: "k-event-time" }, D === "recurring" && /* @__PURE__ */ t.createElement("span", { className: "k-event-recurrence-icon" }, /* @__PURE__ */ t.createElement(z, { name: "arrow-rotate-cw", icon: te })), D === "non-recurring" && /* @__PURE__ */ t.createElement("span", { className: "k-event-recurrence-icon" }, /* @__PURE__ */ t.createElement(z, { name: "arrows-no-repeat", icon: re })), ve), e.head && e.vertical && /* @__PURE__ */ t.createElement("span", { className: "k-event-continuation" }, /* @__PURE__ */ t.createElement(z, { name: "chevron-down", icon: ze }))), D && /* @__PURE__ */ t.createElement("span", { className: "k-event-recurrence-icon" }, /* @__PURE__ */ t.createElement(
216
218
  z,
217
219
  {
218
220
  name: D === "recurring" ? "arrow-rotate-cw" : "arrows-no-repeat",
219
- icon: D === "recurring" ? ee : te
221
+ icon: D === "recurring" ? te : re
220
222
  }
221
223
  )), e.head && !e.vertical && /* @__PURE__ */ t.createElement("span", { className: "k-event-continuation" }, /* @__PURE__ */ t.createElement(
222
224
  z,
223
225
  {
224
- name: O === "rtl" ? "chevron-left" : "chevron-right",
225
- icon: O === "rtl" ? p : Z
226
+ name: P === "rtl" ? "chevron-left" : "chevron-right",
227
+ icon: P === "rtl" ? ee : p
226
228
  }
227
229
  )))
228
230
  );
229
231
  }
230
- ), Te = {
231
- item: Ee
232
+ ), Oe = {
233
+ item: Ie
232
234
  };
233
- Me.displayName = "KendoReactSchedulerViewItem";
235
+ Te.displayName = "KendoReactSchedulerViewItem";
234
236
  export {
235
- Me as SchedulerViewItem,
236
- Te as schedulerViewItemDefaultProps
237
+ Te as SchedulerViewItem,
238
+ Oe as schedulerViewItemDefaultProps
237
239
  };
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.freeze({name:"@progress/kendo-react-scheduler",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1787673148,version:"16.1.0-develop.7",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui"});exports.packageMetadata=e;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.freeze({name:"@progress/kendo-react-scheduler",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1787742136,version:"16.1.0-develop.8",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui"});exports.packageMetadata=e;
@@ -6,7 +6,7 @@ export const packageMetadata = Object.freeze({
6
6
  productName: 'KendoReact',
7
7
  productCode: 'KENDOUIREACT',
8
8
  productCodes: ['KENDOUIREACT'],
9
- publishDate: 1787673148,
10
- version: '16.1.0-develop.7',
9
+ publishDate: 1787742136,
10
+ version: '16.1.0-develop.8',
11
11
  licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui'
12
12
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-react-scheduler",
3
- "version": "16.1.0-develop.7",
3
+ "version": "16.1.0-develop.8",
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",
@@ -29,16 +29,16 @@
29
29
  "@progress/kendo-date-math": "^1.4.1",
30
30
  "@progress/kendo-drawing": "^1.21.2",
31
31
  "@progress/kendo-licensing": "^1.7.2",
32
- "@progress/kendo-react-buttons": "16.1.0-develop.7",
33
- "@progress/kendo-react-common": "16.1.0-develop.7",
34
- "@progress/kendo-react-dateinputs": "16.1.0-develop.7",
35
- "@progress/kendo-react-dialogs": "16.1.0-develop.7",
36
- "@progress/kendo-react-dropdowns": "16.1.0-develop.7",
37
- "@progress/kendo-react-form": "16.1.0-develop.7",
38
- "@progress/kendo-react-inputs": "16.1.0-develop.7",
39
- "@progress/kendo-react-intl": "16.1.0-develop.7",
40
- "@progress/kendo-react-popup": "16.1.0-develop.7",
41
- "@progress/kendo-react-tooltip": "16.1.0-develop.7",
32
+ "@progress/kendo-react-buttons": "16.1.0-develop.8",
33
+ "@progress/kendo-react-common": "16.1.0-develop.8",
34
+ "@progress/kendo-react-dateinputs": "16.1.0-develop.8",
35
+ "@progress/kendo-react-dialogs": "16.1.0-develop.8",
36
+ "@progress/kendo-react-dropdowns": "16.1.0-develop.8",
37
+ "@progress/kendo-react-form": "16.1.0-develop.8",
38
+ "@progress/kendo-react-inputs": "16.1.0-develop.8",
39
+ "@progress/kendo-react-intl": "16.1.0-develop.8",
40
+ "@progress/kendo-react-popup": "16.1.0-develop.8",
41
+ "@progress/kendo-react-tooltip": "16.1.0-develop.8",
42
42
  "@progress/kendo-svg-icons": "^4.9.0 || ^5.0.0",
43
43
  "react": "^18.0.0 || ^19.0.0",
44
44
  "react-dom": "^18.0.0 || ^19.0.0"
@@ -113,7 +113,7 @@
113
113
  "package": {
114
114
  "productName": "KendoReact",
115
115
  "productCode": "KENDOUIREACT",
116
- "publishDate": 1787673148,
116
+ "publishDate": 1787742136,
117
117
  "licensingDocsUrl": "https://www.telerik.com/kendo-react-ui"
118
118
  }
119
119
  },
@@ -40,6 +40,8 @@ export interface SchedulerSlotProps extends Slot {
40
40
  * - `userSelect`: `none`
41
41
  */
42
42
  style?: React.CSSProperties;
43
+ /** @hidden */
44
+ role?: string;
43
45
  /**
44
46
  * Specifies the `children` of the SchedulerSlot. By default, no child elements are rendered.
45
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("react"),q=require("@progress/kendo-react-common"),B=require("../hooks/useSchedulerSlot.js");function F(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const o=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(r,a,o.get?o:{enumerable:!0,get:()=>e[a]})}}return r.default=e,Object.freeze(r)}const n=F(T),m=n.forwardRef((e,r)=>{const{onFocus:a,onBlur:o,onClick:c,onMouseEnter:u,onMouseLeave:s,onMouseOut:d,onMouseOver:i,onDoubleClick:k,onKeyDown:b,onKeyPress:f,onKeyUp:y}=e,{slot:l,element:C}=B.useSchedulerSlot(e,r),S=e.tabIndex!==void 0?e.tabIndex===null?void 0:e.tabIndex:e.selected?0:-1,D=n.useMemo(()=>{var v,h;const t=(v=e.isWorkHour)!=null?v:g.isWorkHour,I=(h=e.isWorkDay)!=null?h:g.isWorkDay;return q.classNames("k-scheduler-cell",e.className,"k-slot-cell",{"k-nonwork-hour":!t||!I,"k-selected":e.selected})},[e.className,e.selected,e.isWorkHour,e.isWorkDay]),M=n.useMemo(()=>({userSelect:"none",...e.style}),[e.style]),O=n.useCallback(t=>{a&&a.call(void 0,{syntheticEvent:t,target:l.current})},[a,l]),K=n.useCallback(t=>{o&&o.call(void 0,{syntheticEvent:t,target:l.current})},[o,l]),W=n.useCallback(t=>{c&&c.call(void 0,{syntheticEvent:t,target:l.current})},[c,l]),x=n.useCallback(t=>{i&&i.call(void 0,{syntheticEvent:t,target:l.current})},[i,l]),P=n.useCallback(t=>{d&&d.call(void 0,{syntheticEvent:t,target:l.current})},[d,l]),w=n.useCallback(t=>{u&&u.call(void 0,{syntheticEvent:t,target:l.current})},[u,l]),N=n.useCallback(t=>{s&&s.call(void 0,{syntheticEvent:t,target:l.current})},[s,l]),j=n.useCallback(t=>{k&&k.call(void 0,{syntheticEvent:t,target:l.current})},[k,l]),H=n.useCallback(t=>{b&&b.call(void 0,{syntheticEvent:t,target:l.current})},[b,l]),R=n.useCallback(t=>{f&&f.call(void 0,{syntheticEvent:t,target:l.current})},[f,l]),E=n.useCallback(t=>{y&&y.call(void 0,{syntheticEvent:t,target:l.current})},[y,l]);return n.createElement("div",{ref:C,id:e.id,style:M,className:D,tabIndex:S,"aria-selected":e.selected||void 0,onFocus:O,onBlur:K,onClick:W,onMouseEnter:w,onMouseLeave:N,onMouseOver:x,onMouseOut:P,onDoubleClick:j,onKeyDown:H,onKeyPress:R,onKeyUp:E,"data-slot":!0,"data-slot-allday":e.isAllDay,"data-slot-start":e.start.getTime(),"data-slot-end":e.end.getTime(),"data-slot-group":e.group.index,"data-slot-range":e.range.index,"data-slot-index":e.index},e.children)}),g={isWorkHour:!0,isWorkDay:!0};m.displayName="KendoReactSchedulerSlot";exports.SchedulerSlot=m;exports.schedulerSlotDefaultProps=g;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("react"),q=require("@progress/kendo-react-common"),B=require("../hooks/useSchedulerSlot.js");function F(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const o=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(r,a,o.get?o:{enumerable:!0,get:()=>e[a]})}}return r.default=e,Object.freeze(r)}const n=F(T),m=n.forwardRef((e,r)=>{const{onFocus:a,onBlur:o,onClick:c,onMouseEnter:u,onMouseLeave:s,onMouseOut:d,onMouseOver:i,onDoubleClick:k,onKeyDown:b,onKeyPress:f,onKeyUp:y}=e,{slot:l,element:C}=B.useSchedulerSlot(e,r),S=e.tabIndex!==void 0?e.tabIndex===null?void 0:e.tabIndex:e.selected?0:-1,D=n.useMemo(()=>{var v,h;const t=(v=e.isWorkHour)!=null?v:g.isWorkHour,I=(h=e.isWorkDay)!=null?h:g.isWorkDay;return q.classNames("k-scheduler-cell",e.className,"k-slot-cell",{"k-nonwork-hour":!t||!I,"k-selected":e.selected})},[e.className,e.selected,e.isWorkHour,e.isWorkDay]),M=n.useMemo(()=>({userSelect:"none",...e.style}),[e.style]),O=n.useCallback(t=>{a&&a.call(void 0,{syntheticEvent:t,target:l.current})},[a,l]),K=n.useCallback(t=>{o&&o.call(void 0,{syntheticEvent:t,target:l.current})},[o,l]),W=n.useCallback(t=>{c&&c.call(void 0,{syntheticEvent:t,target:l.current})},[c,l]),x=n.useCallback(t=>{i&&i.call(void 0,{syntheticEvent:t,target:l.current})},[i,l]),P=n.useCallback(t=>{d&&d.call(void 0,{syntheticEvent:t,target:l.current})},[d,l]),w=n.useCallback(t=>{u&&u.call(void 0,{syntheticEvent:t,target:l.current})},[u,l]),N=n.useCallback(t=>{s&&s.call(void 0,{syntheticEvent:t,target:l.current})},[s,l]),j=n.useCallback(t=>{k&&k.call(void 0,{syntheticEvent:t,target:l.current})},[k,l]),H=n.useCallback(t=>{b&&b.call(void 0,{syntheticEvent:t,target:l.current})},[b,l]),R=n.useCallback(t=>{f&&f.call(void 0,{syntheticEvent:t,target:l.current})},[f,l]),E=n.useCallback(t=>{y&&y.call(void 0,{syntheticEvent:t,target:l.current})},[y,l]);return n.createElement("div",{ref:C,id:e.id,style:M,className:D,tabIndex:S,role:e.role,"aria-selected":e.selected||void 0,onFocus:O,onBlur:K,onClick:W,onMouseEnter:w,onMouseLeave:N,onMouseOver:x,onMouseOut:P,onDoubleClick:j,onKeyDown:H,onKeyPress:R,onKeyUp:E,"data-slot":!0,"data-slot-allday":e.isAllDay,"data-slot-start":e.start.getTime(),"data-slot-end":e.end.getTime(),"data-slot-group":e.group.index,"data-slot-range":e.range.index,"data-slot-index":e.index},e.children)}),g={isWorkHour:!0,isWorkDay:!0};m.displayName="KendoReactSchedulerSlot";exports.SchedulerSlot=m;exports.schedulerSlotDefaultProps=g;