@progress/kendo-react-scheduler 14.5.0-develop.7 → 14.5.0-develop.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,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 be=require("react"),l=require("@progress/kendo-react-common"),G=require("@progress/kendo-react-intl"),K=require("@progress/kendo-svg-icons"),o=require("../messages/index.js"),fe=require("../utils/index.js"),ve=require("../hooks/useSchedulerItem.js"),he=require("../hooks/useEditable.js");function ze(e){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const c=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(s,r,c.get?c:{enumerable:!0,get:()=>e[r]})}}return s.default=e,Object.freeze(s)}const t=ze(be),J=t.forwardRef((e,s)=>{const{onFocus:r,onBlur:c,onMouseDown:b,onClick:f,onMouseUp:v,onMouseOut:h,onMouseOver:z,onMouseEnter:C,onMouseLeave:D,onDoubleClick:R,onRemoveClick:E,onKeyUp:M,onKeyDown:y,onKeyPress:S,onPress:I,onDrag:N,onRelease:P,onResizePress:x,onResizeEndDrag:H,onResizeRelease:q,onResizeStartDrag:O}=e,{item:a,element:F}=ve.useSchedulerItem(e,s),w=l.useDir(F),L=t.useRef(null),U=t.useRef(null),j=t.useRef(null),A=t.useRef(null),i=he.useEditable(e.editable),d=G.useInternationalization(),T=G.useLocalization(),B=T.toLanguageString(o.deleteTitle,o.messages[o.deleteTitle]),W=T.toLanguageString(o.allDay,o.messages[o.allDay]),g=e.group.resources.find(n=>!!(n.colorField&&n[n.colorField]!==""&&n[n.colorField]!==void 0)),u=g&&g.colorField&&g[g.colorField],Q=e.tabIndex!==void 0?e.tabIndex===null?void 0:e.tabIndex:e.selected?0:-1,V=t.useMemo(()=>l.classNames({"k-event":!e.resizeHint,"k-selected":e.selected&&i.select,"k-event-drag-hint":e.dragHint,"k-scheduler-marquee":e.resizeHint,"k-marquee":e.resizeHint,"k-first":e.resizeHint&&!e.tail,"k-last":e.resizeHint&&!e.head},e.className),[e.resizeHint,e.selected,e.dragHint,e.tail,e.head,e.className,i.select]),X=t.useMemo(()=>`${e.title}, ${fe.formatEventTime(d,e.zonedStart,e.zonedEnd,e.isAllDay,W)}`,[d,e.isAllDay,e.title,e.zonedEnd,e.zonedStart,W]),Y=t.useMemo(()=>({cursor:"pointer",userSelect:"none",borderColor:e.resizeHint?void 0:u,backgroundColor:e.resizeHint?void 0:u,touchAction:"none",...e.style}),[u,e.style,e.resizeHint]),Z=t.useCallback(n=>{r&&r.call(void 0,{syntheticEvent:n,target:a.current})},[r,a]),p=t.useCallback(n=>{c&&c.call(void 0,{syntheticEvent:n,target:a.current})},[c,a]),ee=t.useCallback(n=>{b&&b.call(void 0,{syntheticEvent:n,target:a.current})},[b,a]),te=t.useCallback(n=>{f&&f.call(void 0,{syntheticEvent:n,target:a.current})},[f,a]),ne=t.useCallback(n=>{v&&v.call(void 0,{syntheticEvent:n,target:a.current})},[v,a]),ae=t.useCallback(n=>{z&&z.call(void 0,{syntheticEvent:n,target:a.current})},[z,a]),le=t.useCallback(n=>{h&&h.call(void 0,{syntheticEvent:n,target:a.current})},[h,a]),re=t.useCallback(n=>{C&&C.call(void 0,{syntheticEvent:n,target:a.current})},[C,a]),ce=t.useCallback(n=>{D&&D.call(void 0,{syntheticEvent:n,target:a.current})},[D,a]),oe=t.useCallback(n=>{R&&R.call(void 0,{syntheticEvent:n,target:a.current})},[R,a]),se=t.useCallback(n=>{E&&E.call(void 0,{syntheticEvent:n,target:a.current})},[E,a]),ie=t.useCallback(n=>{y&&y.call(void 0,{syntheticEvent:n,target:a.current})},[y,a]),ue=t.useCallback(n=>{S&&S.call(void 0,{syntheticEvent:n,target:a.current})},[S,a]),de=t.useCallback(n=>{M&&M.call(void 0,{syntheticEvent:n,target:a.current})},[M,a]),ge=t.useCallback(n=>{I&&I.call(void 0,{dragEvent:n,target:a.current})},[I,a]),me=t.useCallback(n=>{N&&N.call(void 0,{dragEvent:n,target:a.current})},[N,a]),ke=t.useCallback(n=>{P&&P.call(void 0,{dragEvent:n,target:a.current})},[P,a]),m=t.useCallback(n=>{x&&x.call(void 0,{dragEvent:n,target:a.current})},[x,a]),_=t.useCallback(n=>{O&&O.call(void 0,{dragEvent:n,target:a.current})},[O,a]),$=t.useCallback(n=>{H&&H.call(void 0,{dragEvent:n,target:a.current})},[H,a]),k=t.useCallback(n=>{q&&q.call(void 0,{dragEvent:n,target:a.current})},[q,a]);return l.useDraggable(F,{onPress:ge,onDrag:me,onRelease:ke}),l.useDraggable(L,{onPress:m,onDrag:$,onRelease:k}),l.useDraggable(U,{onPress:m,onDrag:_,onRelease:k}),l.useDraggable(j,{onPress:m,onDrag:_,onRelease:k}),l.useDraggable(A,{onPress:m,onDrag:$,onRelease:k}),t.createElement("div",{ref:F,id:e.id,style:Y,tabIndex:Q,className:V,role:"button","aria-label":X,onFocus:Z,onBlur:p,onMouseUp:ne,onMouseDown:ee,onClick:te,onMouseOver:ae,onMouseOut:le,onMouseEnter:re,onMouseLeave:ce,onDoubleClick:oe,onKeyDown:ie,onKeyPress:ue,onKeyUp:de,"data-group-index":e.group.index,"data-range-index":e.range.index},e.children,!e.resizeHint&&t.createElement("span",{className:"k-event-actions"},i.remove&&t.createElement("a",{tabIndex:-1,"aria-hidden":"true",className:"k-link k-event-delete",title:B,"aria-label":B,onClick:se},t.createElement(l.IconWrap,{name:"x",icon:K.xIcon})),e.head&&t.createElement(l.IconWrap,{name:w==="rtl"?"caret-alt-left":"caret-alt-right",icon:w==="rtl"?K.caretAltLeftIcon:K.caretAltRightIcon})),i.resize&&e.vertical&&t.createElement(t.Fragment,null,t.createElement("span",{className:"k-resize-handle k-resize-n",ref:j}),t.createElement("span",{className:"k-resize-handle k-resize-s",ref:A})),i.resize&&!e.vertical&&t.createElement(t.Fragment,null,t.createElement("span",{className:"k-resize-handle k-resize-w",ref:U}),t.createElement("span",{className:"k-resize-handle k-resize-e",ref:L})),e.resizeHint&&t.createElement(t.Fragment,null,t.createElement("div",{className:"k-marquee-color",style:{borderColor:u,backgroundColor:u}}),t.createElement("div",{className:"k-marquee-text"},!e.tail&&t.createElement("div",{className:"k-label-top"},d.formatDate(e.zonedStart,e.format)),!e.head&&t.createElement("div",{className:"k-label-bottom"},d.formatDate(e.zonedEnd,e.format)))))});J.displayName="KendoReactSchedulerItem";exports.SchedulerItem=J;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const be=require("react"),l=require("@progress/kendo-react-common"),G=require("@progress/kendo-react-intl"),K=require("@progress/kendo-svg-icons"),o=require("../messages/index.js"),ve=require("../utils/index.js"),fe=require("../hooks/useSchedulerItem.js"),he=require("../hooks/useEditable.js");function ze(e){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const c=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(s,r,c.get?c:{enumerable:!0,get:()=>e[r]})}}return s.default=e,Object.freeze(s)}const t=ze(be),J=t.forwardRef((e,s)=>{const{onFocus:r,onBlur:c,onMouseDown:b,onClick:v,onMouseUp:f,onMouseOut:h,onMouseOver:z,onMouseEnter:C,onMouseLeave:D,onDoubleClick:R,onRemoveClick:E,onKeyUp:M,onKeyDown:y,onKeyPress:S,onPress:I,onDrag:N,onRelease:P,onResizePress:x,onResizeEndDrag:H,onResizeRelease:q,onResizeStartDrag:O}=e,{item:a,element:F}=fe.useSchedulerItem(e,s),w=l.useDir(F),L=t.useRef(null),U=t.useRef(null),j=t.useRef(null),T=t.useRef(null),i=he.useEditable(e.editable),d=G.useInternationalization(),B=G.useLocalization(),A=B.toLanguageString(o.deleteTitle,o.messages[o.deleteTitle]),W=B.toLanguageString(o.allDay,o.messages[o.allDay]),g=e.group.resources.find(n=>!!(n.colorField&&n[n.colorField]!==""&&n[n.colorField]!==void 0)),u=g&&g.colorField&&g[g.colorField],Q=e.tabIndex!==void 0?e.tabIndex===null?void 0:e.tabIndex:e.selected?0:-1,V=t.useMemo(()=>l.classNames({"k-event":!e.resizeHint,"k-selected":e.selected&&i.select,"k-event-drag-hint":e.dragHint,"k-scheduler-marquee":e.resizeHint,"k-marquee":e.resizeHint,"k-first":e.resizeHint&&!e.tail,"k-last":e.resizeHint&&!e.head},e.className),[e.resizeHint,e.selected,e.dragHint,e.tail,e.head,e.className,i.select]),X=t.useMemo(()=>`${e.title}, ${ve.formatEventTime(d,e.zonedStart,e.zonedEnd,e.isAllDay,W)}`,[d,e.isAllDay,e.title,e.zonedEnd,e.zonedStart,W]),Y=t.useMemo(()=>({cursor:"pointer",userSelect:"none",borderColor:e.resizeHint?void 0:u,backgroundColor:e.resizeHint?void 0:u,touchAction:"none",...e.style}),[u,e.style,e.resizeHint]),Z=t.useCallback(n=>{r&&r.call(void 0,{syntheticEvent:n,target:a.current})},[r,a]),p=t.useCallback(n=>{c&&c.call(void 0,{syntheticEvent:n,target:a.current})},[c,a]),ee=t.useCallback(n=>{b&&b.call(void 0,{syntheticEvent:n,target:a.current})},[b,a]),te=t.useCallback(n=>{v&&v.call(void 0,{syntheticEvent:n,target:a.current})},[v,a]),ne=t.useCallback(n=>{f&&f.call(void 0,{syntheticEvent:n,target:a.current})},[f,a]),ae=t.useCallback(n=>{z&&z.call(void 0,{syntheticEvent:n,target:a.current})},[z,a]),le=t.useCallback(n=>{h&&h.call(void 0,{syntheticEvent:n,target:a.current})},[h,a]),re=t.useCallback(n=>{C&&C.call(void 0,{syntheticEvent:n,target:a.current})},[C,a]),ce=t.useCallback(n=>{D&&D.call(void 0,{syntheticEvent:n,target:a.current})},[D,a]),oe=t.useCallback(n=>{R&&R.call(void 0,{syntheticEvent:n,target:a.current})},[R,a]),se=t.useCallback(n=>{E&&E.call(void 0,{syntheticEvent:n,target:a.current})},[E,a]),ie=t.useCallback(n=>{y&&y.call(void 0,{syntheticEvent:n,target:a.current})},[y,a]),ue=t.useCallback(n=>{S&&S.call(void 0,{syntheticEvent:n,target:a.current})},[S,a]),de=t.useCallback(n=>{M&&M.call(void 0,{syntheticEvent:n,target:a.current})},[M,a]),ge=t.useCallback(n=>{I&&I.call(void 0,{dragEvent:n,target:a.current})},[I,a]),me=t.useCallback(n=>{N&&N.call(void 0,{dragEvent:n,target:a.current})},[N,a]),ke=t.useCallback(n=>{P&&P.call(void 0,{dragEvent:n,target:a.current})},[P,a]),m=t.useCallback(n=>{x&&x.call(void 0,{dragEvent:n,target:a.current})},[x,a]),_=t.useCallback(n=>{O&&O.call(void 0,{dragEvent:n,target:a.current})},[O,a]),$=t.useCallback(n=>{H&&H.call(void 0,{dragEvent:n,target:a.current})},[H,a]),k=t.useCallback(n=>{q&&q.call(void 0,{dragEvent:n,target:a.current})},[q,a]);return l.useDraggable(F,{onPress:ge,onDrag:me,onRelease:ke}),l.useDraggable(L,{onPress:m,onDrag:$,onRelease:k}),l.useDraggable(U,{onPress:m,onDrag:_,onRelease:k}),l.useDraggable(j,{onPress:m,onDrag:_,onRelease:k}),l.useDraggable(T,{onPress:m,onDrag:$,onRelease:k}),t.createElement("div",{ref:F,id:e.id,style:Y,tabIndex:Q,className:V,role:"button","aria-label":X,onFocus:Z,onBlur:p,onMouseUp:ne,onMouseDown:ee,onClick:te,onMouseOver:ae,onMouseOut:le,onMouseEnter:re,onMouseLeave:ce,onDoubleClick:oe,onKeyDown:ie,onKeyPress:ue,onKeyUp:de,"data-group-index":e.group.index,"data-range-index":e.range.index},e.children,!e.resizeHint&&t.createElement("span",{className:"k-event-actions"},i.remove&&t.createElement("a",{tabIndex:-1,"aria-hidden":"true",className:"k-link k-event-delete",title:A,"aria-label":A,onClick:se},t.createElement(l.IconWrap,{name:"x",icon:K.xIcon})),e.head&&t.createElement(l.IconWrap,{name:w==="rtl"?"chevron-left":"chevron-right",icon:w==="rtl"?K.chevronLeftIcon:K.chevronRightIcon})),i.resize&&e.vertical&&t.createElement(t.Fragment,null,t.createElement("span",{className:"k-resize-handle k-resize-n",ref:j}),t.createElement("span",{className:"k-resize-handle k-resize-s",ref:T})),i.resize&&!e.vertical&&t.createElement(t.Fragment,null,t.createElement("span",{className:"k-resize-handle k-resize-w",ref:U}),t.createElement("span",{className:"k-resize-handle k-resize-e",ref:L})),e.resizeHint&&t.createElement(t.Fragment,null,t.createElement("div",{className:"k-marquee-color",style:{borderColor:u,backgroundColor:u}}),t.createElement("div",{className:"k-marquee-text"},!e.tail&&t.createElement("div",{className:"k-label-top"},d.formatDate(e.zonedStart,e.format)),!e.head&&t.createElement("div",{className:"k-label-bottom"},d.formatDate(e.zonedEnd,e.format)))))});J.displayName="KendoReactSchedulerItem";exports.SchedulerItem=J;
@@ -6,9 +6,9 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  import * as t from "react";
9
- import { useDir as fe, classNames as ve, useDraggable as o, IconWrap as $ } from "@progress/kendo-react-common";
10
- import { useInternationalization as be, useLocalization as ze } from "@progress/kendo-react-intl";
11
- import { xIcon as he, caretAltLeftIcon as Ce, caretAltRightIcon as De } from "@progress/kendo-svg-icons";
9
+ import { useDir as ve, classNames as fe, useDraggable as o, IconWrap as $ } from "@progress/kendo-react-common";
10
+ import { useInternationalization as he, useLocalization as be } from "@progress/kendo-react-intl";
11
+ import { xIcon as ze, chevronLeftIcon as Ce, chevronRightIcon as De } from "@progress/kendo-svg-icons";
12
12
  import { deleteTitle as j, messages as G, allDay as J } from "../messages/index.mjs";
13
13
  import { formatEventTime as Ee } from "../utils/index.mjs";
14
14
  import { useSchedulerItem as Re } from "../hooks/useSchedulerItem.mjs";
@@ -22,11 +22,11 @@ const ye = t.forwardRef(
22
22
  // Mouse
23
23
  onMouseDown: g,
24
24
  onClick: k,
25
- onMouseUp: f,
26
- onMouseOut: v,
27
- onMouseOver: b,
28
- onMouseEnter: z,
29
- onMouseLeave: h,
25
+ onMouseUp: v,
26
+ onMouseOut: f,
27
+ onMouseOver: h,
28
+ onMouseEnter: b,
29
+ onMouseLeave: z,
30
30
  onDoubleClick: C,
31
31
  onRemoveClick: D,
32
32
  // Keyboard
@@ -42,10 +42,10 @@ const ye = t.forwardRef(
42
42
  onResizeEndDrag: I,
43
43
  onResizeRelease: P,
44
44
  onResizeStartDrag: S
45
- } = e, { item: n, element: F } = Re(e, Q), K = fe(F), w = t.useRef(null), L = t.useRef(null), O = t.useRef(null), U = t.useRef(null), l = Me(e.editable), c = be(), A = ze(), q = A.toLanguageString(j, G[j]), B = A.toLanguageString(J, G[J]), s = e.group.resources.find(
46
- (a) => !!(a.colorField && a[a.colorField] !== "" && a[a.colorField] !== void 0)
45
+ } = e, { item: a, element: F } = Re(e, Q), K = ve(F), w = t.useRef(null), L = t.useRef(null), O = t.useRef(null), U = t.useRef(null), l = Me(e.editable), c = he(), q = be(), B = q.toLanguageString(j, G[j]), A = q.toLanguageString(J, G[J]), s = e.group.resources.find(
46
+ (n) => !!(n.colorField && n[n.colorField] !== "" && n[n.colorField] !== void 0)
47
47
  ), r = s && s.colorField && s[s.colorField], V = e.tabIndex !== void 0 ? e.tabIndex === null ? void 0 : e.tabIndex : e.selected ? 0 : -1, X = t.useMemo(
48
- () => ve(
48
+ () => fe(
49
49
  {
50
50
  "k-event": !e.resizeHint,
51
51
  "k-selected": e.selected && l.select,
@@ -64,9 +64,9 @@ const ye = t.forwardRef(
64
64
  e.zonedStart,
65
65
  e.zonedEnd,
66
66
  e.isAllDay,
67
- B
67
+ A
68
68
  )}`,
69
- [c, e.isAllDay, e.title, e.zonedEnd, e.zonedStart, B]
69
+ [c, e.isAllDay, e.title, e.zonedEnd, e.zonedStart, A]
70
70
  ), Z = t.useMemo(
71
71
  () => ({
72
72
  cursor: "pointer",
@@ -78,173 +78,173 @@ const ye = t.forwardRef(
78
78
  }),
79
79
  [r, e.style, e.resizeHint]
80
80
  ), _ = t.useCallback(
81
- (a) => {
81
+ (n) => {
82
82
  d && d.call(void 0, {
83
- syntheticEvent: a,
84
- target: n.current
83
+ syntheticEvent: n,
84
+ target: a.current
85
85
  });
86
86
  },
87
- [d, n]
87
+ [d, a]
88
88
  ), p = t.useCallback(
89
- (a) => {
89
+ (n) => {
90
90
  m && m.call(void 0, {
91
- syntheticEvent: a,
92
- target: n.current
91
+ syntheticEvent: n,
92
+ target: a.current
93
93
  });
94
94
  },
95
- [m, n]
95
+ [m, a]
96
96
  ), ee = t.useCallback(
97
- (a) => {
97
+ (n) => {
98
98
  g && g.call(void 0, {
99
- syntheticEvent: a,
100
- target: n.current
99
+ syntheticEvent: n,
100
+ target: a.current
101
101
  });
102
102
  },
103
- [g, n]
103
+ [g, a]
104
104
  ), te = t.useCallback(
105
- (a) => {
105
+ (n) => {
106
106
  k && k.call(void 0, {
107
- syntheticEvent: a,
108
- target: n.current
107
+ syntheticEvent: n,
108
+ target: a.current
109
109
  });
110
110
  },
111
- [k, n]
112
- ), ae = t.useCallback(
113
- (a) => {
114
- f && f.call(void 0, {
115
- syntheticEvent: a,
116
- target: n.current
111
+ [k, a]
112
+ ), ne = t.useCallback(
113
+ (n) => {
114
+ v && v.call(void 0, {
115
+ syntheticEvent: n,
116
+ target: a.current
117
117
  });
118
118
  },
119
- [f, n]
120
- ), ne = t.useCallback(
121
- (a) => {
122
- b && b.call(void 0, {
123
- syntheticEvent: a,
124
- target: n.current
119
+ [v, a]
120
+ ), ae = t.useCallback(
121
+ (n) => {
122
+ h && h.call(void 0, {
123
+ syntheticEvent: n,
124
+ target: a.current
125
125
  });
126
126
  },
127
- [b, n]
127
+ [h, a]
128
128
  ), le = t.useCallback(
129
- (a) => {
130
- v && v.call(void 0, {
131
- syntheticEvent: a,
132
- target: n.current
129
+ (n) => {
130
+ f && f.call(void 0, {
131
+ syntheticEvent: n,
132
+ target: a.current
133
133
  });
134
134
  },
135
- [v, n]
135
+ [f, a]
136
136
  ), re = t.useCallback(
137
- (a) => {
138
- z && z.call(void 0, {
139
- syntheticEvent: a,
140
- target: n.current
137
+ (n) => {
138
+ b && b.call(void 0, {
139
+ syntheticEvent: n,
140
+ target: a.current
141
141
  });
142
142
  },
143
- [z, n]
143
+ [b, a]
144
144
  ), oe = t.useCallback(
145
- (a) => {
146
- h && h.call(void 0, {
147
- syntheticEvent: a,
148
- target: n.current
145
+ (n) => {
146
+ z && z.call(void 0, {
147
+ syntheticEvent: n,
148
+ target: a.current
149
149
  });
150
150
  },
151
- [h, n]
151
+ [z, a]
152
152
  ), ce = t.useCallback(
153
- (a) => {
153
+ (n) => {
154
154
  C && C.call(void 0, {
155
- syntheticEvent: a,
156
- target: n.current
155
+ syntheticEvent: n,
156
+ target: a.current
157
157
  });
158
158
  },
159
- [C, n]
159
+ [C, a]
160
160
  ), se = t.useCallback(
161
- (a) => {
161
+ (n) => {
162
162
  D && D.call(void 0, {
163
- syntheticEvent: a,
164
- target: n.current
163
+ syntheticEvent: n,
164
+ target: a.current
165
165
  });
166
166
  },
167
- [D, n]
167
+ [D, a]
168
168
  ), ie = t.useCallback(
169
- (a) => {
169
+ (n) => {
170
170
  R && R.call(void 0, {
171
- syntheticEvent: a,
172
- target: n.current
171
+ syntheticEvent: n,
172
+ target: a.current
173
173
  });
174
174
  },
175
- [R, n]
175
+ [R, a]
176
176
  ), ue = t.useCallback(
177
- (a) => {
177
+ (n) => {
178
178
  M && M.call(void 0, {
179
- syntheticEvent: a,
180
- target: n.current
179
+ syntheticEvent: n,
180
+ target: a.current
181
181
  });
182
182
  },
183
- [M, n]
183
+ [M, a]
184
184
  ), de = t.useCallback(
185
- (a) => {
185
+ (n) => {
186
186
  E && E.call(void 0, {
187
- syntheticEvent: a,
188
- target: n.current
187
+ syntheticEvent: n,
188
+ target: a.current
189
189
  });
190
190
  },
191
- [E, n]
191
+ [E, a]
192
192
  ), me = t.useCallback(
193
- (a) => {
193
+ (n) => {
194
194
  y && y.call(void 0, {
195
- dragEvent: a,
196
- target: n.current
195
+ dragEvent: n,
196
+ target: a.current
197
197
  });
198
198
  },
199
- [y, n]
199
+ [y, a]
200
200
  ), ge = t.useCallback(
201
- (a) => {
201
+ (n) => {
202
202
  N && N.call(void 0, {
203
- dragEvent: a,
204
- target: n.current
203
+ dragEvent: n,
204
+ target: a.current
205
205
  });
206
206
  },
207
- [N, n]
207
+ [N, a]
208
208
  ), ke = t.useCallback(
209
- (a) => {
209
+ (n) => {
210
210
  x && x.call(void 0, {
211
- dragEvent: a,
212
- target: n.current
211
+ dragEvent: n,
212
+ target: a.current
213
213
  });
214
214
  },
215
- [x, n]
215
+ [x, a]
216
216
  ), i = t.useCallback(
217
- (a) => {
217
+ (n) => {
218
218
  H && H.call(void 0, {
219
- dragEvent: a,
220
- target: n.current
219
+ dragEvent: n,
220
+ target: a.current
221
221
  });
222
222
  },
223
- [H, n]
223
+ [H, a]
224
224
  ), T = t.useCallback(
225
- (a) => {
225
+ (n) => {
226
226
  S && S.call(void 0, {
227
- dragEvent: a,
228
- target: n.current
227
+ dragEvent: n,
228
+ target: a.current
229
229
  });
230
230
  },
231
- [S, n]
231
+ [S, a]
232
232
  ), W = t.useCallback(
233
- (a) => {
233
+ (n) => {
234
234
  I && I.call(void 0, {
235
- dragEvent: a,
236
- target: n.current
235
+ dragEvent: n,
236
+ target: a.current
237
237
  });
238
238
  },
239
- [I, n]
239
+ [I, a]
240
240
  ), u = t.useCallback(
241
- (a) => {
241
+ (n) => {
242
242
  P && P.call(void 0, {
243
- dragEvent: a,
244
- target: n.current
243
+ dragEvent: n,
244
+ target: a.current
245
245
  });
246
246
  },
247
- [P, n]
247
+ [P, a]
248
248
  );
249
249
  return o(F, {
250
250
  onPress: me,
@@ -278,10 +278,10 @@ const ye = t.forwardRef(
278
278
  "aria-label": Y,
279
279
  onFocus: _,
280
280
  onBlur: p,
281
- onMouseUp: ae,
281
+ onMouseUp: ne,
282
282
  onMouseDown: ee,
283
283
  onClick: te,
284
- onMouseOver: ne,
284
+ onMouseOver: ae,
285
285
  onMouseOut: le,
286
286
  onMouseEnter: re,
287
287
  onMouseLeave: oe,
@@ -299,15 +299,15 @@ const ye = t.forwardRef(
299
299
  tabIndex: -1,
300
300
  "aria-hidden": "true",
301
301
  className: "k-link k-event-delete",
302
- title: q,
303
- "aria-label": q,
302
+ title: B,
303
+ "aria-label": B,
304
304
  onClick: se
305
305
  },
306
- /* @__PURE__ */ t.createElement($, { name: "x", icon: he })
306
+ /* @__PURE__ */ t.createElement($, { name: "x", icon: ze })
307
307
  ), e.head && /* @__PURE__ */ t.createElement(
308
308
  $,
309
309
  {
310
- name: K === "rtl" ? "caret-alt-left" : "caret-alt-right",
310
+ name: K === "rtl" ? "chevron-left" : "chevron-right",
311
311
  icon: K === "rtl" ? Ce : De
312
312
  }
313
313
  )),
@@ -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 fe=require("react"),he=require("./SchedulerItem.js"),m=require("../utils/index.js"),E=require("../views/common/utils.js"),I=require("../constants/index.js"),ge=require("@progress/kendo-react-intl"),Q=require("./SchedulerItemContent.js"),P=require("@progress/kendo-react-common"),H=require("@progress/kendo-svg-icons"),U=require("../context/SchedulerViewContext.js"),Se=require("../context/SchedulerContext.js"),Re=require("../hooks/useRowSync.js");function Ie(e){const w=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const S in e)if(S!=="default"){const x=Object.getOwnPropertyDescriptor(e,S);Object.defineProperty(w,S,x.get?x:{enumerable:!0,get:()=>e[S]})}}return w.default=e,Object.freeze(w)}const n=Ie(fe),we=1,X=25,Y=n.forwardRef((e,w)=>{const{item:S,_ref:x,itemRef:ee,...te}=e,M=n.useRef(void 0),o=n.useRef(null),q=n.useRef(null),C=n.useRef(null);n.useImperativeHandle(q,()=>({props:e,element:o.current&&o.current.element})),n.useImperativeHandle(w,()=>q.current),n.useImperativeHandle(x,()=>o.current),n.useImperativeHandle(ee,()=>o.current);const re=S||Z.item,p=ge.useInternationalization(),[ne]=U.useSchedulerViewItemsContext(),[ie]=U.useSchedulerViewSlotsContext(),D=Se.useSchedulerElementContext(),[ce,k]=n.useState(!0),[oe,se]=n.useState(!1),V=n.useRef(0),h=n.useRef(null),g=n.useRef([]),W=P.useDir(D),B=n.useMemo(()=>{var i,r;return e.isAllDay?(i=e.title)!=null?i:"":`(${p.format("{0:t} - {1:t}",e.zonedStart,e.zonedEnd)}): ${(r=e.title)!=null?r:""}`},[p,e.isAllDay,e.title,e.zonedEnd,e.zonedStart]),le=(i,r)=>{let c=0;return r.forEach(l=>{l._order!==void 0&&l._order!==null&&c<l._order&&(c=l._order)}),c+1},ae=(i,r,c)=>{const[l,f]=r,a=new Date(Math.min(f.props.end.getTime()-c,Math.max(e.start.getTime(),l.props.start.getTime()))),R=new Date(Math.max(a.getTime()+c,Math.min(e.end.getTime(),f.props.end.getTime())));return i.filter(u=>{const _=Math.max(Math.min(f.props.end.getTime()-c,u.props.start.getTime()),l.props.start.getTime()),v=Math.min(Math.max(_+c,u.props.end.getTime()),f.props.end.getTime());return u.props.id!==e.id&&u.props.group.index===e.group.index&&u.props.range.index===e.range.index&&(e.ignoreIsAllDay||u.props.isAllDay===e.isAllDay)&&m.intersects(new Date(_),new Date(v),a,R)&&m.intersects(l.props.start,f.props.end,u.props.start,u.props.end)})},ue=(i,r)=>i.group.index===r.group.index&&i.range.index===r.range.index&&(i.range.isAllDay===void 0||r.range.isAllDay===void 0||i.range.isAllDay===r.range.isAllDay)&&(e.ignoreIsAllDay||i.isAllDay===r.isAllDay),A=()=>{var $,G,L,K,J;const i=ie.filter(t=>t.current&&ue(t.current.props,e)).sort((t,T)=>t.current.props.start.getTime()-T.current.props.start.getTime()),r=i.filter(t=>m.intersects(t.current.props.start,t.current.props.end,e.start,e.end)),c=o.current&&o.current.element;if(!c||!r.length)return;const l=m.first(i),f=m.last(i),a=m.first(r),R=m.last(r);if(!a.current||!o.current||!R.current||!l.current||!f.current)return;if(!m.intersects(a.current.props.start,R.current.props.end,e.start,e.end)){k(!1);return}const b=[],u=[],_=[],v=E.getRect(a.current.element),O=(e.vertical?v.height:v.width)/(a.current.props.end.getTime()-a.current.props.start.getTime()),j=(e.vertical?X:8)/O,y=(Math.min(e.start.getTime(),R.current.props.end.getTime()-j)-a.current.props.start.getTime())*O,F=Math.floor(Math.min(e.end.getTime(),R.current.props.end.getTime())-Math.max(e.start.getTime(),a.current.props.start.getTime()))*O;(ne||[]).forEach(t=>{t.current&&(t.current.props.dragHint?u.push(t.current):t.current.props.resizeHint?_.push(t.current):b.push(t.current))}),g.current=ae(b,[l.current,f.current],j),h.current=e.resizeHint||e.dragHint?0:m.calculateProportionalOrder(o.current,g.current);let d=1;e.resizeHint||e.dragHint||(d=le(o.current,g.current),g.current.forEach(t=>{t._maxSiblingsPerSlot&&d<t._maxSiblingsPerSlot&&(d=t._maxSiblingsPerSlot)}),g.current.forEach(t=>{t._maxSiblingsPerSlot!==void 0&&t._maxSiblingsPerSlot!==null&&t._maxSiblingsPerSlot<d&&(t._maxSiblingsPerSlot=d)}));let z=0;const s=v;g.current.forEach(t=>{let T=0;t._order!==void 0&&t._order!==null&&t._order<h.current&&(T=E.getRect(t.element).top+E.getRect(t.element).height-s.top-I.BORDER_WIDTH*h.current+we),T>z&&(z=T)});const me=20;s.width=e.vertical?s.width/d-I.BORDER_WIDTH-me/d:F-I.BORDER_WIDTH,e.vertical?s.height=F-I.BORDER_WIDTH:(e.resizeHint||e.dragHint)&&d<=1||(s.height=(G=($=e.style)==null?void 0:$.height)!=null?G:X),s.left=e.vertical?s.left+((L=h.current)!=null?L:0)+I.BORDER_WIDTH*((K=h.current)!=null?K:0)*s.width:s.left+(y<0?0:y),s.top=e.vertical?s.top+(y<0?0:y):s.top+z+I.BORDER_WIDTH*((J=h.current)!=null?J:0),V.current=d,E.setRect(c,s),se(!0),k(!0)},N=n.useCallback(i=>{const r=i&&i[0],c=C.current;M.current!==void 0&&window.cancelAnimationFrame(M.current),c&&r&&(c.width!==r.contentRect.width||c.height!==r.contentRect.height)&&(M.current=window.requestAnimationFrame(()=>{A()})),C.current={width:r.contentRect.width,height:r.contentRect.height}},[A]);n.useEffect(A);const de=o.current&&o.current.element?o.current.element.closest(".k-scheduler-layout"):null;return Re.useRowSync({element:de,selector:".k-resource-row",horizontalAttribute:"data-depth-index",verticalAttribute:"data-resource-index",applyTo:".k-resource-cell",syncHeight:e.isLast}),n.useEffect(()=>{if(!D.current)return;const i=window.ResizeObserver,r=i&&new i(N);return r&&r.observe(D.current),()=>{r&&r.disconnect()}},[N,D]),n.createElement(re,{...te,_ref:o,_order:h,_maxSiblingsPerSlot:V,_siblings:g,itemRef:o,style:{visibility:oe?void 0:"hidden",display:ce?void 0:"none",...e.style}},!e.resizeHint&&n.createElement("span",{className:"k-event-actions"},e.tail&&n.createElement(P.IconWrap,{name:W==="rtl"?"caret-alt-right":"caret-alt-left",icon:W==="rtl"?H.caretAltRightIcon:H.caretAltLeftIcon}),e.isRecurring&&!e.isException&&n.createElement(P.IconWrap,{name:"reload",icon:H.arrowRotateCwIcon}),!e.isRecurring&&e.isException&&n.createElement(P.IconWrap,{name:"non-recurrence",icon:H.nonRecurrenceIcon})),!e.resizeHint&&n.createElement("div",{title:B},!e.isAllDay&&n.createElement(Q.SchedulerItemContent,{className:"k-event-time"},B),n.createElement(Q.SchedulerItemContent,null,e.title)))}),Z={item:he.SchedulerItem};Y.displayName="KendoReactSchedulerProportionalViewItem";exports.SchedulerProportionalViewItem=Y;exports.schedulerProportionalViewItemDefaultProps=Z;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const he=require("react"),fe=require("./SchedulerItem.js"),m=require("../utils/index.js"),E=require("../views/common/utils.js"),I=require("../constants/index.js"),ge=require("@progress/kendo-react-intl"),Q=require("./SchedulerItemContent.js"),P=require("@progress/kendo-react-common"),H=require("@progress/kendo-svg-icons"),U=require("../context/SchedulerViewContext.js"),Se=require("../context/SchedulerContext.js"),Re=require("../hooks/useRowSync.js");function Ie(e){const v=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const S in e)if(S!=="default"){const x=Object.getOwnPropertyDescriptor(e,S);Object.defineProperty(v,S,x.get?x:{enumerable:!0,get:()=>e[S]})}}return v.default=e,Object.freeze(v)}const n=Ie(he),ve=1,X=25,Y=n.forwardRef((e,v)=>{const{item:S,_ref:x,itemRef:ee,...te}=e,M=n.useRef(void 0),o=n.useRef(null),q=n.useRef(null),C=n.useRef(null);n.useImperativeHandle(q,()=>({props:e,element:o.current&&o.current.element})),n.useImperativeHandle(v,()=>q.current),n.useImperativeHandle(x,()=>o.current),n.useImperativeHandle(ee,()=>o.current);const re=S||Z.item,p=ge.useInternationalization(),[ne]=U.useSchedulerViewItemsContext(),[ie]=U.useSchedulerViewSlotsContext(),D=Se.useSchedulerElementContext(),[ce,k]=n.useState(!0),[oe,se]=n.useState(!1),V=n.useRef(0),f=n.useRef(null),g=n.useRef([]),W=P.useDir(D),B=n.useMemo(()=>{var i,r;return e.isAllDay?(i=e.title)!=null?i:"":`(${p.format("{0:t} - {1:t}",e.zonedStart,e.zonedEnd)}): ${(r=e.title)!=null?r:""}`},[p,e.isAllDay,e.title,e.zonedEnd,e.zonedStart]),le=(i,r)=>{let c=0;return r.forEach(l=>{l._order!==void 0&&l._order!==null&&c<l._order&&(c=l._order)}),c+1},ae=(i,r,c)=>{const[l,h]=r,a=new Date(Math.min(h.props.end.getTime()-c,Math.max(e.start.getTime(),l.props.start.getTime()))),R=new Date(Math.max(a.getTime()+c,Math.min(e.end.getTime(),h.props.end.getTime())));return i.filter(u=>{const _=Math.max(Math.min(h.props.end.getTime()-c,u.props.start.getTime()),l.props.start.getTime()),w=Math.min(Math.max(_+c,u.props.end.getTime()),h.props.end.getTime());return u.props.id!==e.id&&u.props.group.index===e.group.index&&u.props.range.index===e.range.index&&(e.ignoreIsAllDay||u.props.isAllDay===e.isAllDay)&&m.intersects(new Date(_),new Date(w),a,R)&&m.intersects(l.props.start,h.props.end,u.props.start,u.props.end)})},ue=(i,r)=>i.group.index===r.group.index&&i.range.index===r.range.index&&(i.range.isAllDay===void 0||r.range.isAllDay===void 0||i.range.isAllDay===r.range.isAllDay)&&(e.ignoreIsAllDay||i.isAllDay===r.isAllDay),b=()=>{var $,G,L,K,J;const i=ie.filter(t=>t.current&&ue(t.current.props,e)).sort((t,T)=>t.current.props.start.getTime()-T.current.props.start.getTime()),r=i.filter(t=>m.intersects(t.current.props.start,t.current.props.end,e.start,e.end)),c=o.current&&o.current.element;if(!c||!r.length)return;const l=m.first(i),h=m.last(i),a=m.first(r),R=m.last(r);if(!a.current||!o.current||!R.current||!l.current||!h.current)return;if(!m.intersects(a.current.props.start,R.current.props.end,e.start,e.end)){k(!1);return}const A=[],u=[],_=[],w=E.getRect(a.current.element),O=(e.vertical?w.height:w.width)/(a.current.props.end.getTime()-a.current.props.start.getTime()),j=(e.vertical?X:8)/O,y=(Math.min(e.start.getTime(),R.current.props.end.getTime()-j)-a.current.props.start.getTime())*O,F=Math.floor(Math.min(e.end.getTime(),R.current.props.end.getTime())-Math.max(e.start.getTime(),a.current.props.start.getTime()))*O;(ne||[]).forEach(t=>{t.current&&(t.current.props.dragHint?u.push(t.current):t.current.props.resizeHint?_.push(t.current):A.push(t.current))}),g.current=ae(A,[l.current,h.current],j),f.current=e.resizeHint||e.dragHint?0:m.calculateProportionalOrder(o.current,g.current);let d=1;e.resizeHint||e.dragHint||(d=le(o.current,g.current),g.current.forEach(t=>{t._maxSiblingsPerSlot&&d<t._maxSiblingsPerSlot&&(d=t._maxSiblingsPerSlot)}),g.current.forEach(t=>{t._maxSiblingsPerSlot!==void 0&&t._maxSiblingsPerSlot!==null&&t._maxSiblingsPerSlot<d&&(t._maxSiblingsPerSlot=d)}));let z=0;const s=w;g.current.forEach(t=>{let T=0;t._order!==void 0&&t._order!==null&&t._order<f.current&&(T=E.getRect(t.element).top+E.getRect(t.element).height-s.top-I.BORDER_WIDTH*f.current+ve),T>z&&(z=T)});const me=20;s.width=e.vertical?s.width/d-I.BORDER_WIDTH-me/d:F-I.BORDER_WIDTH,e.vertical?s.height=F-I.BORDER_WIDTH:(e.resizeHint||e.dragHint)&&d<=1||(s.height=(G=($=e.style)==null?void 0:$.height)!=null?G:X),s.left=e.vertical?s.left+((L=f.current)!=null?L:0)+I.BORDER_WIDTH*((K=f.current)!=null?K:0)*s.width:s.left+(y<0?0:y),s.top=e.vertical?s.top+(y<0?0:y):s.top+z+I.BORDER_WIDTH*((J=f.current)!=null?J:0),V.current=d,E.setRect(c,s),se(!0),k(!0)},N=n.useCallback(i=>{const r=i&&i[0],c=C.current;M.current!==void 0&&window.cancelAnimationFrame(M.current),c&&r&&(c.width!==r.contentRect.width||c.height!==r.contentRect.height)&&(M.current=window.requestAnimationFrame(()=>{b()})),C.current={width:r.contentRect.width,height:r.contentRect.height}},[b]);n.useEffect(b);const de=o.current&&o.current.element?o.current.element.closest(".k-scheduler-layout"):null;return Re.useRowSync({element:de,selector:".k-resource-row",horizontalAttribute:"data-depth-index",verticalAttribute:"data-resource-index",applyTo:".k-resource-cell",syncHeight:e.isLast}),n.useEffect(()=>{if(!D.current)return;const i=window.ResizeObserver,r=i&&new i(N);return r&&r.observe(D.current),()=>{r&&r.disconnect()}},[N,D]),n.createElement(re,{...te,_ref:o,_order:f,_maxSiblingsPerSlot:V,_siblings:g,itemRef:o,style:{visibility:oe?void 0:"hidden",display:ce?void 0:"none",...e.style}},!e.resizeHint&&n.createElement("span",{className:"k-event-actions"},e.tail&&n.createElement(P.IconWrap,{name:W==="rtl"?"chevron-right":"chevron-left",icon:W==="rtl"?H.chevronRightIcon:H.chevronLeftIcon}),e.isRecurring&&!e.isException&&n.createElement(P.IconWrap,{name:"reload",icon:H.arrowRotateCwIcon}),!e.isRecurring&&e.isException&&n.createElement(P.IconWrap,{name:"non-recurrence",icon:H.nonRecurrenceIcon})),!e.resizeHint&&n.createElement("div",{title:B},!e.isAllDay&&n.createElement(Q.SchedulerItemContent,{className:"k-event-time"},B),n.createElement(Q.SchedulerItemContent,null,e.title)))}),Z={item:fe.SchedulerItem};Y.displayName="KendoReactSchedulerProportionalViewItem";exports.SchedulerProportionalViewItem=Y;exports.schedulerProportionalViewItemDefaultProps=Z;
@@ -8,12 +8,12 @@
8
8
  import * as n from "react";
9
9
  import { SchedulerItem as me } from "./SchedulerItem.mjs";
10
10
  import { intersects as T, first as B, last as K, calculateProportionalOrder as de } from "../utils/index.mjs";
11
- import { getRect as M, setRect as fe } from "../views/common/utils.mjs";
11
+ import { getRect as A, setRect as fe } from "../views/common/utils.mjs";
12
12
  import { BORDER_WIDTH as S } from "../constants/index.mjs";
13
13
  import { useInternationalization as he } from "@progress/kendo-react-intl";
14
14
  import { SchedulerItemContent as j } from "./SchedulerItemContent.mjs";
15
15
  import { useDir as ge, IconWrap as H } from "@progress/kendo-react-common";
16
- import { caretAltRightIcon as Se, caretAltLeftIcon as ve, arrowRotateCwIcon as we, nonRecurrenceIcon as xe } from "@progress/kendo-svg-icons";
16
+ import { chevronRightIcon as Se, chevronLeftIcon as ve, arrowRotateCwIcon as we, nonRecurrenceIcon as xe } from "@progress/kendo-svg-icons";
17
17
  import { useSchedulerViewItemsContext as Re, useSchedulerViewSlotsContext as Ie } from "../context/SchedulerViewContext.mjs";
18
18
  import { useSchedulerElementContext as Te } from "../context/SchedulerContext.mjs";
19
19
  import { useRowSync as Ee } from "../hooks/useRowSync.mjs";
@@ -21,7 +21,7 @@ const ye = 1, J = 25, _e = n.forwardRef(
21
21
  (e, Q) => {
22
22
  const { item: U, _ref: X, itemRef: Y, ...Z } = e, E = n.useRef(void 0), o = n.useRef(null), P = n.useRef(null), z = n.useRef(null);
23
23
  n.useImperativeHandle(P, () => ({ props: e, element: o.current && o.current.element })), n.useImperativeHandle(Q, () => P.current), n.useImperativeHandle(X, () => o.current), n.useImperativeHandle(Y, () => o.current);
24
- const ee = U || Ae.item, p = he(), [te] = Re(), [re] = Ie(), x = Te(), [ne, b] = n.useState(!0), [ie, ce] = n.useState(!1), C = n.useRef(0), f = n.useRef(null), h = n.useRef([]), O = ge(x), k = n.useMemo(
24
+ const ee = U || De.item, p = he(), [te] = Re(), [re] = Ie(), x = Te(), [ne, b] = n.useState(!0), [ie, ce] = n.useState(!1), C = n.useRef(0), f = n.useRef(null), h = n.useRef([]), O = ge(x), k = n.useMemo(
25
25
  () => {
26
26
  var i, r;
27
27
  return e.isAllDay ? (i = e.title) != null ? i : "" : `(${p.format("{0:t} - {1:t}", e.zonedStart, e.zonedEnd)}): ${(r = e.title) != null ? r : ""}`;
@@ -67,9 +67,9 @@ const ye = 1, J = 25, _e = n.forwardRef(
67
67
  b(!1);
68
68
  return;
69
69
  }
70
- const _ = [], u = [], R = [], v = M(a.current.element), A = (e.vertical ? v.height : v.width) / (a.current.props.end.getTime() - a.current.props.start.getTime()), N = (e.vertical ? J : 8) / A, I = (Math.min(e.start.getTime(), g.current.props.end.getTime() - N) - a.current.props.start.getTime()) * A, F = Math.floor(
70
+ const _ = [], u = [], R = [], v = A(a.current.element), D = (e.vertical ? v.height : v.width) / (a.current.props.end.getTime() - a.current.props.start.getTime()), N = (e.vertical ? J : 8) / D, I = (Math.min(e.start.getTime(), g.current.props.end.getTime() - N) - a.current.props.start.getTime()) * D, F = Math.floor(
71
71
  Math.min(e.end.getTime(), g.current.props.end.getTime()) - Math.max(e.start.getTime(), a.current.props.start.getTime())
72
- ) * A;
72
+ ) * D;
73
73
  (te || []).forEach((t) => {
74
74
  t.current && (t.current.props.dragHint ? u.push(t.current) : t.current.props.resizeHint ? R.push(t.current) : _.push(t.current));
75
75
  }), h.current = se(_, [l.current, d.current], N), f.current = e.resizeHint || e.dragHint ? 0 : de(o.current, h.current);
@@ -79,14 +79,14 @@ const ye = 1, J = 25, _e = n.forwardRef(
79
79
  }), h.current.forEach((t) => {
80
80
  t._maxSiblingsPerSlot !== void 0 && t._maxSiblingsPerSlot !== null && t._maxSiblingsPerSlot < m && (t._maxSiblingsPerSlot = m);
81
81
  }));
82
- let D = 0;
82
+ let M = 0;
83
83
  const s = v;
84
84
  h.current.forEach((t) => {
85
85
  let w = 0;
86
- t._order !== void 0 && t._order !== null && t._order < f.current && (w = M(t.element).top + M(t.element).height - s.top - S * f.current + ye), w > D && (D = w);
86
+ t._order !== void 0 && t._order !== null && t._order < f.current && (w = A(t.element).top + A(t.element).height - s.top - S * f.current + ye), w > M && (M = w);
87
87
  });
88
88
  const ue = 20;
89
- s.width = e.vertical ? s.width / m - S - ue / m : F - S, e.vertical ? s.height = F - S : (e.resizeHint || e.dragHint) && m <= 1 || (s.height = (L = (G = e.style) == null ? void 0 : G.height) != null ? L : J), s.left = e.vertical ? s.left + ((W = f.current) != null ? W : 0) + S * (($ = f.current) != null ? $ : 0) * s.width : s.left + (I < 0 ? 0 : I), s.top = e.vertical ? s.top + (I < 0 ? 0 : I) : s.top + D + S * ((q = f.current) != null ? q : 0), C.current = m, fe(c, s), ce(!0), b(!0);
89
+ s.width = e.vertical ? s.width / m - S - ue / m : F - S, e.vertical ? s.height = F - S : (e.resizeHint || e.dragHint) && m <= 1 || (s.height = (L = (G = e.style) == null ? void 0 : G.height) != null ? L : J), s.left = e.vertical ? s.left + ((W = f.current) != null ? W : 0) + S * (($ = f.current) != null ? $ : 0) * s.width : s.left + (I < 0 ? 0 : I), s.top = e.vertical ? s.top + (I < 0 ? 0 : I) : s.top + M + S * ((q = f.current) != null ? q : 0), C.current = m, fe(c, s), ce(!0), b(!0);
90
90
  }, V = n.useCallback(
91
91
  (i) => {
92
92
  const r = i && i[0], c = z.current;
@@ -130,18 +130,18 @@ const ye = 1, J = 25, _e = n.forwardRef(
130
130
  !e.resizeHint && /* @__PURE__ */ n.createElement("span", { className: "k-event-actions" }, e.tail && /* @__PURE__ */ n.createElement(
131
131
  H,
132
132
  {
133
- name: O === "rtl" ? "caret-alt-right" : "caret-alt-left",
133
+ name: O === "rtl" ? "chevron-right" : "chevron-left",
134
134
  icon: O === "rtl" ? Se : ve
135
135
  }
136
136
  ), e.isRecurring && !e.isException && /* @__PURE__ */ n.createElement(H, { name: "reload", icon: we }), !e.isRecurring && e.isException && /* @__PURE__ */ n.createElement(H, { name: "non-recurrence", icon: xe })),
137
137
  !e.resizeHint && /* @__PURE__ */ n.createElement("div", { title: k }, !e.isAllDay && /* @__PURE__ */ n.createElement(j, { className: "k-event-time" }, k), /* @__PURE__ */ n.createElement(j, null, e.title))
138
138
  );
139
139
  }
140
- ), Ae = {
140
+ ), De = {
141
141
  item: me
142
142
  };
143
143
  _e.displayName = "KendoReactSchedulerProportionalViewItem";
144
144
  export {
145
145
  _e as SchedulerProportionalViewItem,
146
- Ae as schedulerProportionalViewItemDefaultProps
146
+ De as schedulerProportionalViewItemDefaultProps
147
147
  };
@@ -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 ue=require("react"),de=require("./SchedulerItem.js"),b=require("../utils/index.js"),P=require("../views/common/utils.js"),w=require("../constants/index.js"),me=require("@progress/kendo-react-intl"),Y=require("./SchedulerItemContent.js"),O=require("@progress/kendo-react-common"),z=require("@progress/kendo-svg-icons"),fe=require("../hooks/useRowSync.js"),he=require("../hooks/useEditable.js"),K=require("../context/SchedulerViewContext.js"),ge=require("../context/SchedulerContext.js");function Se(e){const y=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const I in e)if(I!=="default"){const E=Object.getOwnPropertyDescriptor(e,I);Object.defineProperty(y,I,E.get?E:{enumerable:!0,get:()=>e[I]})}}return y.default=e,Object.freeze(y)}const i=Se(ue),U=1,J=25,Q=i.forwardRef((e,y)=>{const{item:I,_ref:E,itemRef:Z,...p}=e,x=i.useRef(void 0),u=i.useRef(null),C=i.useRef(null),k=i.useRef(null),ee=he.useEditable(e.editable);i.useImperativeHandle(C,()=>({props:e,element:u.current&&u.current.element})),i.useImperativeHandle(y,()=>C.current),i.useImperativeHandle(E,()=>u.current),i.useImperativeHandle(Z,()=>u.current);const te=I||X.item,M=me.useInternationalization(),[re]=K.useSchedulerViewItemsContext(),[ne]=K.useSchedulerViewSlotsContext(),H=ge.useSchedulerElementContext(),[ie,_]=i.useState(!0),[ce,le]=i.useState(!1),f=i.useRef(e.order),V=i.useRef(0),F=O.useDir(H),W=i.useMemo(()=>{var t,r;return e.isAllDay?(t=e.title)!=null?t:"":`(${M.format("{0:t} - {1:t}",e.zonedStart,e.zonedEnd)}): ${(r=e.title)!=null?r:""}`},[M,e.isAllDay,e.title,e.zonedEnd,e.zonedStart]),B=(t,r)=>{let o=1;return t.forEach(c=>{const a=r.filter(m=>T(c.current.props,m.props));a.length>o&&(o=a.length)}),o},se=(t,r)=>t.map(c=>r.filter(a=>T(c.current.props,a.props))),oe=(t,r)=>{var A;const o=r.filter(n=>n.props.order!==null&&n.props.order!==void 0).map(n=>{let d=n.props.start,l=n.props.end;return n.props.isAllDay&&(d=new Date(d.getFullYear(),d.getMonth(),d.getDate()),l=new Date(l.getFullYear(),l.getMonth(),l.getDate())),{order:n.props.order,start:d,end:l}}),c=Array.from(new Set(o.map(n=>n.order))).sort((n,d)=>n-d),a=new Map;for(const n of o)a.has(n.order)||a.set(n.order,[]),a.get(n.order).push({start:n.start,end:n.end});const m=[],R=new Map;for(const n of c){const d=a.get(n);let l=-1;for(let g=0;g<m.length;g++)if(d.every(v=>m[g].every(D=>!b.intersects(D.start,D.end,v.start,v.end,!0)))){l=g;break}l===-1&&(l=m.length,m.push([])),m[l].push(...d),R.set(n,l)}return(A=R.get(t))!=null?A:t},T=(t,r)=>b.intersects(t.start,t.end,r.start,r.end)&&t.group.index===r.group.index&&t.range.index===r.range.index&&(t.range.isAllDay===void 0||r.range.isAllDay===void 0||t.range.isAllDay===r.range.isAllDay)&&(e.ignoreIsAllDay||t.isAllDay===r.isAllDay),q=()=>{var v,D,L,$;const t=(ne||[]).filter(s=>s.current&&T(s.current.props,e)),r=u.current&&u.current.element,o=b.first(t);if(t.length===0){_(!1);return}if(!o.current||!r)return;const c=P.getRect(o.current.element),a=[],m=[],R=[];(re||[]).forEach(s=>{s.current&&(s.current.props.dragHint?m.push(s.current):s.current.props.resizeHint?R.push(s.current):a.push(s.current))});const A=e.dragHint||e.resizeHint?b.calculateOrder(u.current,e.dragHint?m:R,t,e.ignoreIsAllDay):(v=e.order)!=null?v:0;if(!e.vertical&&!(e.dragHint||e.resizeHint)&&e.order!==null&&e.order!==void 0){const s=a.filter(S=>S.props.isAllDay);f.current=oe(e.order,s)}else f.current=A;let n=e.dragHint||e.resizeHint?B(t,e.dragHint?m:R):B(t,a);const d=se(t,a);let l=0;const g=!e.vertical&&f.current!==null;if(d.forEach(s=>{let S=0;s.forEach(h=>{if(b.intersects(h.props.start,h.props.end,e.start,e.end)&&!(e.dragHint||e.resizeHint)&&h._maxSiblingsPerSlot&&h._maxSiblingsPerSlot>n&&h.element!==r&&(n=h._maxSiblingsPerSlot),!g){const G=P.getRect(h.element);h.props.order!==null&&h.props.order!==void 0&&h.props.order<f.current&&(S=G.top+G.height-c.top-w.BORDER_WIDTH*f.current+U)}}),S>l&&(l=S)}),g){const s=(D=e.style)==null?void 0:D.height,S=typeof s=="number"?s:J;l=f.current*(S+U)}if(t.length===0){_(!1);return}const j=ee.add?20:0;c.width=e.vertical?c.width/n-w.BORDER_WIDTH-j/n:c.width*t.length-w.BORDER_WIDTH,e.vertical?c.height=c.height*t.length-w.BORDER_WIDTH:(e.resizeHint||e.dragHint)&&n<=1||(c.height=($=(L=e.style)==null?void 0:L.height)!=null?$:J),c.left=e.vertical?c.left+f.current*c.width+w.BORDER_WIDTH*f.current:c.left,c.top=e.vertical?c.top:c.top+l+w.BORDER_WIDTH*f.current,V.current=n,P.setRect(r,c),le(!0),_(!0)},N=i.useCallback(t=>{const r=t&&t[0],o=k.current;x.current!==void 0&&window.cancelAnimationFrame(x.current),o&&r&&(o.width!==r.contentRect.width||o.height!==r.contentRect.height)&&(x.current=window.requestAnimationFrame(()=>{q()})),k.current={width:r.contentRect.width,height:r.contentRect.height}},[q]);i.useEffect(q);const ae=u.current&&u.current.element?u.current.element.closest(".k-scheduler-layout"):null;return fe.useRowSync({element:ae,selector:".k-resource-row",horizontalAttribute:"data-depth-index",verticalAttribute:"data-resource-index",applyTo:".k-resource-cell",syncHeight:e.isLast}),i.useEffect(()=>{if(!H.current)return;const t=window.ResizeObserver,r=t&&new t(N);return r&&r.observe(H.current),()=>{r&&r.disconnect()}},[N,H]),i.createElement(te,{...p,_ref:u,_maxSiblingsPerSlot:V,_order:f,itemRef:u,style:{visibility:ce?void 0:"hidden",display:ie?void 0:"none",...e.style}},!e.resizeHint&&i.createElement("span",{className:"k-event-actions"},e.tail&&i.createElement(O.IconWrap,{name:F==="rtl"?"caret-alt-right":"caret-alt-left",icon:F==="rtl"?z.caretAltRightIcon:z.caretAltLeftIcon}),e.isRecurring&&!e.isException&&i.createElement(O.IconWrap,{name:"arrow-rotate-cw",icon:z.arrowRotateCwIcon}),!e.isRecurring&&e.isException&&i.createElement(O.IconWrap,{name:"arrows-no-repeat",icon:z.arrowsNoRepeatIcon})),!e.resizeHint&&i.createElement("div",{title:W},!e.isAllDay&&i.createElement(Y.SchedulerItemContent,{className:"k-event-time"},W),i.createElement(Y.SchedulerItemContent,null,e.title)))}),X={item:de.SchedulerItem};Q.displayName="KendoReactSchedulerViewItem";exports.SchedulerViewItem=Q;exports.schedulerViewItemDefaultProps=X;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ue=require("react"),de=require("./SchedulerItem.js"),b=require("../utils/index.js"),P=require("../views/common/utils.js"),w=require("../constants/index.js"),me=require("@progress/kendo-react-intl"),Y=require("./SchedulerItemContent.js"),A=require("@progress/kendo-react-common"),z=require("@progress/kendo-svg-icons"),fe=require("../hooks/useRowSync.js"),he=require("../hooks/useEditable.js"),K=require("../context/SchedulerViewContext.js"),ge=require("../context/SchedulerContext.js");function Se(e){const v=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const I in e)if(I!=="default"){const E=Object.getOwnPropertyDescriptor(e,I);Object.defineProperty(v,I,E.get?E:{enumerable:!0,get:()=>e[I]})}}return v.default=e,Object.freeze(v)}const i=Se(ue),U=1,J=25,Q=i.forwardRef((e,v)=>{const{item:I,_ref:E,itemRef:Z,...p}=e,x=i.useRef(void 0),u=i.useRef(null),C=i.useRef(null),k=i.useRef(null),ee=he.useEditable(e.editable);i.useImperativeHandle(C,()=>({props:e,element:u.current&&u.current.element})),i.useImperativeHandle(v,()=>C.current),i.useImperativeHandle(E,()=>u.current),i.useImperativeHandle(Z,()=>u.current);const te=I||X.item,M=me.useInternationalization(),[ne]=K.useSchedulerViewItemsContext(),[re]=K.useSchedulerViewSlotsContext(),H=ge.useSchedulerElementContext(),[ie,_]=i.useState(!0),[ce,se]=i.useState(!1),f=i.useRef(e.order),V=i.useRef(0),F=A.useDir(H),W=i.useMemo(()=>{var t,n;return e.isAllDay?(t=e.title)!=null?t:"":`(${M.format("{0:t} - {1:t}",e.zonedStart,e.zonedEnd)}): ${(n=e.title)!=null?n:""}`},[M,e.isAllDay,e.title,e.zonedEnd,e.zonedStart]),B=(t,n)=>{let o=1;return t.forEach(c=>{const a=n.filter(m=>T(c.current.props,m.props));a.length>o&&(o=a.length)}),o},le=(t,n)=>t.map(c=>n.filter(a=>T(c.current.props,a.props))),oe=(t,n)=>{var O;const o=n.filter(r=>r.props.order!==null&&r.props.order!==void 0).map(r=>{let d=r.props.start,s=r.props.end;return r.props.isAllDay&&(d=new Date(d.getFullYear(),d.getMonth(),d.getDate()),s=new Date(s.getFullYear(),s.getMonth(),s.getDate())),{order:r.props.order,start:d,end:s}}),c=Array.from(new Set(o.map(r=>r.order))).sort((r,d)=>r-d),a=new Map;for(const r of o)a.has(r.order)||a.set(r.order,[]),a.get(r.order).push({start:r.start,end:r.end});const m=[],R=new Map;for(const r of c){const d=a.get(r);let s=-1;for(let g=0;g<m.length;g++)if(d.every(y=>m[g].every(D=>!b.intersects(D.start,D.end,y.start,y.end,!0)))){s=g;break}s===-1&&(s=m.length,m.push([])),m[s].push(...d),R.set(r,s)}return(O=R.get(t))!=null?O:t},T=(t,n)=>b.intersects(t.start,t.end,n.start,n.end)&&t.group.index===n.group.index&&t.range.index===n.range.index&&(t.range.isAllDay===void 0||n.range.isAllDay===void 0||t.range.isAllDay===n.range.isAllDay)&&(e.ignoreIsAllDay||t.isAllDay===n.isAllDay),q=()=>{var y,D,L,$;const t=(re||[]).filter(l=>l.current&&T(l.current.props,e)),n=u.current&&u.current.element,o=b.first(t);if(t.length===0){_(!1);return}if(!o.current||!n)return;const c=P.getRect(o.current.element),a=[],m=[],R=[];(ne||[]).forEach(l=>{l.current&&(l.current.props.dragHint?m.push(l.current):l.current.props.resizeHint?R.push(l.current):a.push(l.current))});const O=e.dragHint||e.resizeHint?b.calculateOrder(u.current,e.dragHint?m:R,t,e.ignoreIsAllDay):(y=e.order)!=null?y:0;if(!e.vertical&&!(e.dragHint||e.resizeHint)&&e.order!==null&&e.order!==void 0){const l=a.filter(S=>S.props.isAllDay);f.current=oe(e.order,l)}else f.current=O;let r=e.dragHint||e.resizeHint?B(t,e.dragHint?m:R):B(t,a);const d=le(t,a);let s=0;const g=!e.vertical&&f.current!==null;if(d.forEach(l=>{let S=0;l.forEach(h=>{if(b.intersects(h.props.start,h.props.end,e.start,e.end)&&!(e.dragHint||e.resizeHint)&&h._maxSiblingsPerSlot&&h._maxSiblingsPerSlot>r&&h.element!==n&&(r=h._maxSiblingsPerSlot),!g){const G=P.getRect(h.element);h.props.order!==null&&h.props.order!==void 0&&h.props.order<f.current&&(S=G.top+G.height-c.top-w.BORDER_WIDTH*f.current+U)}}),S>s&&(s=S)}),g){const l=(D=e.style)==null?void 0:D.height,S=typeof l=="number"?l:J;s=f.current*(S+U)}if(t.length===0){_(!1);return}const j=ee.add?20:0;c.width=e.vertical?c.width/r-w.BORDER_WIDTH-j/r:c.width*t.length-w.BORDER_WIDTH,e.vertical?c.height=c.height*t.length-w.BORDER_WIDTH:(e.resizeHint||e.dragHint)&&r<=1||(c.height=($=(L=e.style)==null?void 0:L.height)!=null?$:J),c.left=e.vertical?c.left+f.current*c.width+w.BORDER_WIDTH*f.current:c.left,c.top=e.vertical?c.top:c.top+s+w.BORDER_WIDTH*f.current,V.current=r,P.setRect(n,c),se(!0),_(!0)},N=i.useCallback(t=>{const n=t&&t[0],o=k.current;x.current!==void 0&&window.cancelAnimationFrame(x.current),o&&n&&(o.width!==n.contentRect.width||o.height!==n.contentRect.height)&&(x.current=window.requestAnimationFrame(()=>{q()})),k.current={width:n.contentRect.width,height:n.contentRect.height}},[q]);i.useEffect(q);const ae=u.current&&u.current.element?u.current.element.closest(".k-scheduler-layout"):null;return fe.useRowSync({element:ae,selector:".k-resource-row",horizontalAttribute:"data-depth-index",verticalAttribute:"data-resource-index",applyTo:".k-resource-cell",syncHeight:e.isLast}),i.useEffect(()=>{if(!H.current)return;const t=window.ResizeObserver,n=t&&new t(N);return n&&n.observe(H.current),()=>{n&&n.disconnect()}},[N,H]),i.createElement(te,{...p,_ref:u,_maxSiblingsPerSlot:V,_order:f,itemRef:u,style:{visibility:ce?void 0:"hidden",display:ie?void 0:"none",...e.style}},!e.resizeHint&&i.createElement("span",{className:"k-event-actions"},e.tail&&i.createElement(A.IconWrap,{name:F==="rtl"?"chevron-right":"chevron-left",icon:F==="rtl"?z.chevronRightIcon:z.chevronLeftIcon}),e.isRecurring&&!e.isException&&i.createElement(A.IconWrap,{name:"arrow-rotate-cw",icon:z.arrowRotateCwIcon}),!e.isRecurring&&e.isException&&i.createElement(A.IconWrap,{name:"arrows-no-repeat",icon:z.arrowsNoRepeatIcon})),!e.resizeHint&&i.createElement("div",{title:W},!e.isAllDay&&i.createElement(Y.SchedulerItemContent,{className:"k-event-time"},W),i.createElement(Y.SchedulerItemContent,null,e.title)))}),X={item:de.SchedulerItem};Q.displayName="KendoReactSchedulerViewItem";exports.SchedulerViewItem=Q;exports.schedulerViewItemDefaultProps=X;