@progress/kendo-react-scheduler 15.1.0-develop.9 → 15.1.1-develop.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/js/kendo-react-scheduler.js +1 -1
- package/items/SchedulerViewItem.js +1 -1
- package/items/SchedulerViewItem.mjs +136 -126
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +11 -11
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ie=require("react"),Re=require("./SchedulerItem.js"),x=require("../utils/index.js"),B=require("../views/common/utils.js"),z=require("../constants/index.js"),we=require("@progress/kendo-react-intl"),p=require("./SchedulerItemContent.js"),M=require("@progress/kendo-react-common"),C=require("@progress/kendo-svg-icons"),ve=require("../hooks/useEditable.js"),ee=require("../context/SchedulerViewContext.js"),Se=require("../context/SchedulerContext.js"),ye=require("../hooks/useRowSync.js");function De(e){const O=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const H in e)if(H!=="default"){const P=Object.getOwnPropertyDescriptor(e,H);Object.defineProperty(O,H,P.get?P:{enumerable:!0,get:()=>e[H]})}}return O.default=e,Object.freeze(O)}const r=De(Ie),F=1,j=25,te=r.forwardRef((e,O)=>{const{item:H,_ref:P,itemRef:re,...ie}=e,N=r.useRef(void 0),m=r.useRef(null),L=r.useRef(null),Y=r.useRef(null),se=ve.useEditable(e.editable);r.useImperativeHandle(L,()=>({props:e,element:m.current&&m.current.element})),r.useImperativeHandle(O,()=>L.current),r.useImperativeHandle(P,()=>m.current),r.useImperativeHandle(re,()=>m.current);const le=H||ne.item,$=we.useInternationalization(),[oe]=ee.useSchedulerViewItemsContext(),[ce]=ee.useSchedulerViewSlotsContext(),q=Se.useSchedulerElementContext(),[ae,k]=r.useState(!0),[ue,de]=r.useState(!1),f=r.useRef(e.order),G=r.useRef(0),K=M.useDir(q),U=r.useMemo(()=>{var t,n;return e.isAllDay?(t=e.title)!=null?t:"":`(${$.format("{0:t} - {1:t}",e.zonedStart,e.zonedEnd)}): ${(n=e.title)!=null?n:""}`},[$,e.isAllDay,e.title,e.zonedEnd,e.zonedStart]),J=(t,n)=>{let a=1;return t.forEach(s=>{const u=n.filter(h=>V(s.current.props,h.props));u.length>a&&(a=u.length)}),a},me=(t,n)=>t.map(s=>n.filter(u=>V(s.current.props,u.props))),fe=(t,n,a)=>{var v;const s=n.filter(i=>i.props.order!==null&&i.props.order!==void 0).map(i=>{let l=i.props.start,d=i.props.end;if(i.props.isAllDay){l=new Date(l.getFullYear(),l.getMonth(),l.getDate());const S=new Date(d.getFullYear(),d.getMonth(),d.getDate());d=S.getTime()<=l.getTime()?new Date(l.getFullYear(),l.getMonth(),l.getDate()+1):S}return{order:i.props.order,start:l,end:d}}),u=Array.from(new Set(s.map(i=>i.order))).sort((i,l)=>i-l),h=new Map;for(const i of s)h.has(i.order)||h.set(i.order,[]),h.get(i.order).push({start:i.start,end:i.end});const w=[],_=new Map;for(const i of u){const l=h.get(i);let d=-1,S=0;_.forEach((R,E)=>{if(E>=i)return;const y=h.get(E);if(!y)return;l.some(T=>y.some(o=>x.intersects(o.start,o.end,T.start,T.end,a)))&&R+1>S&&(S=R+1)});for(let R=S;R<w.length;R++)if(l.every(y=>w[R].every(A=>!x.intersects(A.start,A.end,y.start,y.end,a)))){d=R;break}d===-1&&(d=w.length,w.push([])),w[d].push(...l),_.set(i,d)}return(v=_.get(t))!=null?v:t},V=(t,n)=>x.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),W=()=>{var R,E,y,A,T;const t=(ce||[]).filter(o=>o.current&&V(o.current.props,e)),n=m.current&&m.current.element,a=x.first(t);if(t.length===0){k(!1);return}if(!a.current||!n)return;const s=B.getRect(a.current.element),u=[],h=[],w=[];(oe||[]).forEach(o=>{o.current&&(o.current.props.dragHint?h.push(o.current):o.current.props.resizeHint?w.push(o.current):u.push(o.current))});const _=e.dragHint||e.resizeHint?x.calculateOrder(m.current,e.dragHint?h:w,t,e.ignoreIsAllDay):(R=e.order)!=null?R:0;if(!e.vertical&&!(e.dragHint||e.resizeHint)&&e.order!==null&&e.order!==void 0){const D=(e.ignoreIsAllDay?u:u.filter(I=>I.props.isAllDay)).filter(I=>I.props.group.index===e.group.index),c=(E=e.style)==null?void 0:E.height,b=typeof c=="number"?c:parseFloat(c),g=c!=null&&Number.isNaN(b);f.current=fe(e.order,D,!g)}else f.current=_;let v=e.dragHint||e.resizeHint?J(t,e.dragHint?h:w):J(t,u);const i=me(t,u);let l=0;const d=!e.vertical&&f.current!==null;if(i.forEach(o=>{let D=0;o.forEach(c=>{if(x.intersects(c.props.start,c.props.end,e.start,e.end)&&!(e.dragHint||e.resizeHint)&&c._maxSiblingsPerSlot&&c._maxSiblingsPerSlot>v&&c.element!==n&&(v=c._maxSiblingsPerSlot),!d){const b=B.getRect(c.element);c.props.order!==null&&c.props.order!==void 0&&c.props.order<f.current&&(D=b.top+b.height-s.top-z.BORDER_WIDTH*f.current+F)}}),D>l&&(l=D)}),d){const o=(y=e.style)==null?void 0:y.height,D=typeof o=="number"?o:parseFloat(o);if(o==null)l=f.current*(j+F);else if(!Number.isNaN(D))l=f.current*(D+F);else{const c=(e.ignoreIsAllDay?u:u.filter(g=>g.props.isAllDay)).filter(g=>g.props.group.index===e.group.index&&g.element!==n),b=new Map;c.forEach(g=>{var X,Z;const I=g._order;if(I==null||I>=f.current)return;const ge=((X=g.element)==null?void 0:X.offsetHeight)||j;b.set(I,Math.max((Z=b.get(I))!=null?Z:0,ge))}),l=Array.from(b.values()).reduce((g,I)=>g+I+F,0)}}if(t.length===0){k(!1);return}const S=se.add?20:0;s.width=e.vertical?s.width/v-z.BORDER_WIDTH-S/v:s.width*t.length-z.BORDER_WIDTH,e.vertical?s.height=s.height*t.length-z.BORDER_WIDTH:(e.resizeHint||e.dragHint)&&v<=1||(s.height=(T=(A=e.style)==null?void 0:A.height)!=null?T:j),s.left=e.vertical?s.left+f.current*s.width+z.BORDER_WIDTH*f.current:s.left,s.top=e.vertical?s.top:s.top+l+z.BORDER_WIDTH*f.current,G.current=v,B.setRect(n,s),de(!0),k(!0)},Q=r.useCallback(t=>{const n=t&&t[0],a=Y.current;N.current!==void 0&&window.cancelAnimationFrame(N.current),a&&n&&(a.width!==n.contentRect.width||a.height!==n.contentRect.height)&&(N.current=window.requestAnimationFrame(()=>{W()})),Y.current={width:n.contentRect.width,height:n.contentRect.height}},[W]);r.useEffect(W);const he=m.current&&m.current.element?m.current.element.closest(".k-scheduler-layout"):null;return ye.useRowSync({element:he,selector:".k-resource-row",horizontalAttribute:"data-depth-index",verticalAttribute:"data-resource-index",applyTo:".k-resource-cell",syncHeight:e.isLast}),r.useEffect(()=>{if(!q.current)return;const t=window.ResizeObserver,n=t&&new t(Q);return n&&n.observe(q.current),()=>{n&&n.disconnect()}},[Q,q]),r.createElement(le,{...ie,_ref:m,_maxSiblingsPerSlot:G,_order:f,itemRef:m,style:{visibility:ue?void 0:"hidden",display:ae?void 0:"none",...e.style}},!e.resizeHint&&r.createElement("span",{className:"k-event-actions"},e.tail&&r.createElement(M.IconWrap,{name:K==="rtl"?"chevron-right":"chevron-left",icon:K==="rtl"?C.chevronRightIcon:C.chevronLeftIcon}),e.isRecurring&&!e.isException&&r.createElement(M.IconWrap,{name:"arrow-rotate-cw",icon:C.arrowRotateCwIcon}),!e.isRecurring&&e.isException&&r.createElement(M.IconWrap,{name:"arrows-no-repeat",icon:C.arrowsNoRepeatIcon})),!e.resizeHint&&r.createElement("div",{title:U},!e.isAllDay&&r.createElement(p.SchedulerItemContent,{className:"k-event-time"},U),r.createElement(p.SchedulerItemContent,null,e.title)))}),ne={item:Re.SchedulerItem};te.displayName="KendoReactSchedulerViewItem";exports.SchedulerViewItem=te;exports.schedulerViewItemDefaultProps=ne;
|
|
@@ -5,190 +5,200 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import * as
|
|
9
|
-
import { SchedulerItem as
|
|
10
|
-
import { first as
|
|
11
|
-
import { getRect as
|
|
8
|
+
import * as n from "react";
|
|
9
|
+
import { SchedulerItem as me } from "./SchedulerItem.mjs";
|
|
10
|
+
import { first as fe, calculateOrder as he, intersects as F } from "../utils/index.mjs";
|
|
11
|
+
import { getRect as j, setRect as ge } from "../views/common/utils.mjs";
|
|
12
12
|
import { BORDER_WIDTH as A } from "../constants/index.mjs";
|
|
13
|
-
import { useInternationalization as
|
|
14
|
-
import { SchedulerItemContent as
|
|
15
|
-
import { useDir as
|
|
16
|
-
import { chevronRightIcon as
|
|
17
|
-
import { useEditable as
|
|
18
|
-
import { useSchedulerViewItemsContext as
|
|
13
|
+
import { useInternationalization as ve } from "@progress/kendo-react-intl";
|
|
14
|
+
import { SchedulerItemContent as J } from "./SchedulerItemContent.mjs";
|
|
15
|
+
import { useDir as we, IconWrap as V } from "@progress/kendo-react-common";
|
|
16
|
+
import { chevronRightIcon as ye, chevronLeftIcon as Ie, arrowRotateCwIcon as Re, arrowsNoRepeatIcon as Se } from "@progress/kendo-svg-icons";
|
|
17
|
+
import { useEditable as He } from "../hooks/useEditable.mjs";
|
|
18
|
+
import { useSchedulerViewItemsContext as be, useSchedulerViewSlotsContext as De } from "../context/SchedulerViewContext.mjs";
|
|
19
19
|
import { useSchedulerElementContext as Ee } from "../context/SchedulerContext.mjs";
|
|
20
|
-
import { useRowSync as
|
|
21
|
-
const
|
|
22
|
-
(e,
|
|
23
|
-
const { item:
|
|
24
|
-
|
|
25
|
-
const
|
|
20
|
+
import { useRowSync as Ae } from "../hooks/useRowSync.mjs";
|
|
21
|
+
const M = 1, k = 25, xe = n.forwardRef(
|
|
22
|
+
(e, Q) => {
|
|
23
|
+
const { item: X, _ref: Z, itemRef: p, ...ee } = e, _ = n.useRef(void 0), m = n.useRef(null), C = n.useRef(null), W = n.useRef(null), te = He(e.editable);
|
|
24
|
+
n.useImperativeHandle(C, () => ({ props: e, element: m.current && m.current.element })), n.useImperativeHandle(Q, () => C.current), n.useImperativeHandle(Z, () => m.current), n.useImperativeHandle(p, () => m.current);
|
|
25
|
+
const re = X || ze.item, L = ve(), [ne] = be(), [ie] = De(), P = Ee(), [le, N] = n.useState(!0), [oe, se] = n.useState(!1), f = n.useRef(e.order), Y = n.useRef(0), q = we(P), B = n.useMemo(
|
|
26
26
|
() => {
|
|
27
27
|
var t, r;
|
|
28
|
-
return e.isAllDay ? (t = e.title) != null ? t : "" : `(${
|
|
28
|
+
return e.isAllDay ? (t = e.title) != null ? t : "" : `(${L.format("{0:t} - {1:t}", e.zonedStart, e.zonedEnd)}): ${(r = e.title) != null ? r : ""}`;
|
|
29
29
|
},
|
|
30
|
-
[
|
|
31
|
-
),
|
|
32
|
-
let
|
|
30
|
+
[L, e.isAllDay, e.title, e.zonedEnd, e.zonedStart]
|
|
31
|
+
), G = (t, r) => {
|
|
32
|
+
let c = 1;
|
|
33
33
|
return t.forEach((l) => {
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
}),
|
|
37
|
-
},
|
|
38
|
-
var
|
|
39
|
-
const
|
|
40
|
-
let
|
|
41
|
-
if (
|
|
42
|
-
|
|
43
|
-
const
|
|
44
|
-
|
|
34
|
+
const d = r.filter((h) => T(l.current.props, h.props));
|
|
35
|
+
d.length > c && (c = d.length);
|
|
36
|
+
}), c;
|
|
37
|
+
}, ae = (t, r) => t.map((l) => r.filter((d) => T(l.current.props, d.props))), ce = (t, r, c) => {
|
|
38
|
+
var I;
|
|
39
|
+
const l = r.filter((i) => i.props.order !== null && i.props.order !== void 0).map((i) => {
|
|
40
|
+
let o = i.props.start, u = i.props.end;
|
|
41
|
+
if (i.props.isAllDay) {
|
|
42
|
+
o = new Date(o.getFullYear(), o.getMonth(), o.getDate());
|
|
43
|
+
const R = new Date(u.getFullYear(), u.getMonth(), u.getDate());
|
|
44
|
+
u = R.getTime() <= o.getTime() ? new Date(o.getFullYear(), o.getMonth(), o.getDate() + 1) : R;
|
|
45
45
|
}
|
|
46
|
-
return { order:
|
|
47
|
-
}),
|
|
48
|
-
for (const
|
|
49
|
-
|
|
50
|
-
const
|
|
51
|
-
for (const
|
|
52
|
-
const
|
|
53
|
-
let
|
|
54
|
-
|
|
55
|
-
if (D >=
|
|
46
|
+
return { order: i.props.order, start: o, end: u };
|
|
47
|
+
}), d = Array.from(new Set(l.map((i) => i.order))).sort((i, o) => i - o), h = /* @__PURE__ */ new Map();
|
|
48
|
+
for (const i of l)
|
|
49
|
+
h.has(i.order) || h.set(i.order, []), h.get(i.order).push({ start: i.start, end: i.end });
|
|
50
|
+
const y = [], x = /* @__PURE__ */ new Map();
|
|
51
|
+
for (const i of d) {
|
|
52
|
+
const o = h.get(i);
|
|
53
|
+
let u = -1, R = 0;
|
|
54
|
+
x.forEach((w, D) => {
|
|
55
|
+
if (D >= i)
|
|
56
56
|
return;
|
|
57
|
-
const
|
|
58
|
-
if (!
|
|
57
|
+
const S = h.get(D);
|
|
58
|
+
if (!S)
|
|
59
59
|
return;
|
|
60
|
-
|
|
61
|
-
(
|
|
62
|
-
(
|
|
60
|
+
o.some(
|
|
61
|
+
(z) => S.some(
|
|
62
|
+
(s) => F(s.start, s.end, z.start, z.end, c)
|
|
63
63
|
)
|
|
64
|
-
) && w + 1 >
|
|
64
|
+
) && w + 1 > R && (R = w + 1);
|
|
65
65
|
});
|
|
66
|
-
for (let w =
|
|
67
|
-
if (
|
|
68
|
-
(
|
|
66
|
+
for (let w = R; w < y.length; w++)
|
|
67
|
+
if (o.every(
|
|
68
|
+
(S) => y[w].every(
|
|
69
|
+
(E) => !F(
|
|
70
|
+
E.start,
|
|
71
|
+
E.end,
|
|
72
|
+
S.start,
|
|
73
|
+
S.end,
|
|
74
|
+
c
|
|
75
|
+
)
|
|
76
|
+
)
|
|
69
77
|
)) {
|
|
70
|
-
|
|
78
|
+
u = w;
|
|
71
79
|
break;
|
|
72
80
|
}
|
|
73
|
-
|
|
81
|
+
u === -1 && (u = y.length, y.push([])), y[u].push(...o), x.set(i, u);
|
|
74
82
|
}
|
|
75
|
-
return (
|
|
76
|
-
},
|
|
83
|
+
return (I = x.get(t)) != null ? I : t;
|
|
84
|
+
}, T = (t, r) => F(t.start, t.end, r.start, r.end) && t.group.index === r.group.index && t.range.index === r.range.index && // When slotDuration equals a full day, both daySlots and timeSlots have isAllDay=true,
|
|
77
85
|
// so we need to also check range.isAllDay to distinguish between them.
|
|
78
|
-
(t.range.isAllDay === void 0 || r.range.isAllDay === void 0 || t.range.isAllDay === r.range.isAllDay) && (e.ignoreIsAllDay || t.isAllDay === r.isAllDay),
|
|
79
|
-
var D,
|
|
80
|
-
const t = (
|
|
86
|
+
(t.range.isAllDay === void 0 || r.range.isAllDay === void 0 || t.range.isAllDay === r.range.isAllDay) && (e.ignoreIsAllDay || t.isAllDay === r.isAllDay), O = () => {
|
|
87
|
+
var w, D, S, E, z;
|
|
88
|
+
const t = (ie || []).filter((s) => s.current && T(s.current.props, e)), r = m.current && m.current.element, c = fe(t);
|
|
81
89
|
if (t.length === 0) {
|
|
82
|
-
|
|
90
|
+
N(!1);
|
|
83
91
|
return;
|
|
84
92
|
}
|
|
85
|
-
if (!
|
|
93
|
+
if (!c.current || !r)
|
|
86
94
|
return;
|
|
87
|
-
const l =
|
|
88
|
-
(
|
|
89
|
-
|
|
95
|
+
const l = j(c.current.element), d = [], h = [], y = [];
|
|
96
|
+
(ne || []).forEach((s) => {
|
|
97
|
+
s.current && (s.current.props.dragHint ? h.push(s.current) : s.current.props.resizeHint ? y.push(s.current) : d.push(s.current));
|
|
90
98
|
});
|
|
91
|
-
const
|
|
99
|
+
const x = e.dragHint || e.resizeHint ? he(
|
|
92
100
|
m.current,
|
|
93
|
-
e.dragHint ? h :
|
|
101
|
+
e.dragHint ? h : y,
|
|
94
102
|
t,
|
|
95
103
|
e.ignoreIsAllDay
|
|
96
|
-
) : (
|
|
104
|
+
) : (w = e.order) != null ? w : 0;
|
|
97
105
|
if (!e.vertical && !(e.dragHint || e.resizeHint) && e.order !== null && e.order !== void 0) {
|
|
98
|
-
const
|
|
99
|
-
f.current =
|
|
106
|
+
const H = (e.ignoreIsAllDay ? d : d.filter((v) => v.props.isAllDay)).filter((v) => v.props.group.index === e.group.index), a = (D = e.style) == null ? void 0 : D.height, b = typeof a == "number" ? a : parseFloat(a), g = a != null && Number.isNaN(b);
|
|
107
|
+
f.current = ce(e.order, H, !g);
|
|
100
108
|
} else
|
|
101
|
-
f.current =
|
|
102
|
-
let
|
|
103
|
-
const
|
|
104
|
-
let
|
|
105
|
-
const
|
|
106
|
-
if (
|
|
107
|
-
let
|
|
108
|
-
|
|
109
|
-
if (
|
|
110
|
-
const
|
|
111
|
-
|
|
109
|
+
f.current = x;
|
|
110
|
+
let I = e.dragHint || e.resizeHint ? G(t, e.dragHint ? h : y) : G(t, d);
|
|
111
|
+
const i = ae(t, d);
|
|
112
|
+
let o = 0;
|
|
113
|
+
const u = !e.vertical && f.current !== null;
|
|
114
|
+
if (i.forEach((s) => {
|
|
115
|
+
let H = 0;
|
|
116
|
+
s.forEach((a) => {
|
|
117
|
+
if (F(a.props.start, a.props.end, e.start, e.end) && !(e.dragHint || e.resizeHint) && a._maxSiblingsPerSlot && a._maxSiblingsPerSlot > I && a.element !== r && (I = a._maxSiblingsPerSlot), !u) {
|
|
118
|
+
const b = j(a.element);
|
|
119
|
+
a.props.order !== null && a.props.order !== void 0 && a.props.order < f.current && (H = b.top + b.height - l.top - A * f.current + M);
|
|
112
120
|
}
|
|
113
|
-
}),
|
|
114
|
-
}),
|
|
115
|
-
const
|
|
116
|
-
if (
|
|
117
|
-
|
|
121
|
+
}), H > o && (o = H);
|
|
122
|
+
}), u) {
|
|
123
|
+
const s = (S = e.style) == null ? void 0 : S.height, H = typeof s == "number" ? s : parseFloat(s);
|
|
124
|
+
if (s == null)
|
|
125
|
+
o = f.current * (k + M);
|
|
126
|
+
else if (!Number.isNaN(H))
|
|
127
|
+
o = f.current * (H + M);
|
|
118
128
|
else {
|
|
119
|
-
const
|
|
129
|
+
const a = (e.ignoreIsAllDay ? d : d.filter((g) => g.props.isAllDay)).filter(
|
|
120
130
|
(g) => g.props.group.index === e.group.index && g.element !== r
|
|
121
|
-
),
|
|
122
|
-
|
|
123
|
-
var
|
|
124
|
-
const
|
|
125
|
-
if (
|
|
131
|
+
), b = /* @__PURE__ */ new Map();
|
|
132
|
+
a.forEach((g) => {
|
|
133
|
+
var K, U;
|
|
134
|
+
const v = g._order;
|
|
135
|
+
if (v == null || v >= f.current)
|
|
126
136
|
return;
|
|
127
|
-
const
|
|
128
|
-
|
|
129
|
-
}),
|
|
137
|
+
const ue = ((K = g.element) == null ? void 0 : K.offsetHeight) || k;
|
|
138
|
+
b.set(v, Math.max((U = b.get(v)) != null ? U : 0, ue));
|
|
139
|
+
}), o = Array.from(b.values()).reduce((g, v) => g + v + M, 0);
|
|
130
140
|
}
|
|
131
141
|
}
|
|
132
142
|
if (t.length === 0) {
|
|
133
|
-
|
|
143
|
+
N(!1);
|
|
134
144
|
return;
|
|
135
145
|
}
|
|
136
|
-
const
|
|
137
|
-
l.width = e.vertical ? l.width /
|
|
138
|
-
},
|
|
146
|
+
const R = te.add ? 20 : 0;
|
|
147
|
+
l.width = e.vertical ? l.width / I - A - R / I : l.width * t.length - A, e.vertical ? l.height = l.height * t.length - A : (e.resizeHint || e.dragHint) && I <= 1 || (l.height = (z = (E = e.style) == null ? void 0 : E.height) != null ? z : k), l.left = e.vertical ? l.left + f.current * l.width + A * f.current : l.left, l.top = e.vertical ? l.top : l.top + o + A * f.current, Y.current = I, ge(r, l), se(!0), N(!0);
|
|
148
|
+
}, $ = n.useCallback(
|
|
139
149
|
(t) => {
|
|
140
|
-
const r = t && t[0],
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
})),
|
|
150
|
+
const r = t && t[0], c = W.current;
|
|
151
|
+
_.current !== void 0 && window.cancelAnimationFrame(_.current), c && r && (c.width !== r.contentRect.width || c.height !== r.contentRect.height) && (_.current = window.requestAnimationFrame(() => {
|
|
152
|
+
O();
|
|
153
|
+
})), W.current = { width: r.contentRect.width, height: r.contentRect.height };
|
|
144
154
|
},
|
|
145
|
-
[
|
|
155
|
+
[O]
|
|
146
156
|
);
|
|
147
|
-
|
|
148
|
-
const
|
|
149
|
-
return
|
|
150
|
-
element:
|
|
157
|
+
n.useEffect(O);
|
|
158
|
+
const de = m.current && m.current.element ? m.current.element.closest(".k-scheduler-layout") : null;
|
|
159
|
+
return Ae({
|
|
160
|
+
element: de,
|
|
151
161
|
selector: ".k-resource-row",
|
|
152
162
|
horizontalAttribute: "data-depth-index",
|
|
153
163
|
verticalAttribute: "data-resource-index",
|
|
154
164
|
applyTo: ".k-resource-cell",
|
|
155
165
|
syncHeight: e.isLast
|
|
156
|
-
}),
|
|
157
|
-
if (!
|
|
166
|
+
}), n.useEffect(() => {
|
|
167
|
+
if (!P.current)
|
|
158
168
|
return;
|
|
159
|
-
const t = window.ResizeObserver, r = t && new t(
|
|
160
|
-
return r && r.observe(
|
|
169
|
+
const t = window.ResizeObserver, r = t && new t($);
|
|
170
|
+
return r && r.observe(P.current), () => {
|
|
161
171
|
r && r.disconnect();
|
|
162
172
|
};
|
|
163
|
-
}, [
|
|
164
|
-
|
|
173
|
+
}, [$, P]), /* @__PURE__ */ n.createElement(
|
|
174
|
+
re,
|
|
165
175
|
{
|
|
166
|
-
...
|
|
176
|
+
...ee,
|
|
167
177
|
_ref: m,
|
|
168
|
-
_maxSiblingsPerSlot:
|
|
178
|
+
_maxSiblingsPerSlot: Y,
|
|
169
179
|
_order: f,
|
|
170
180
|
itemRef: m,
|
|
171
181
|
style: {
|
|
172
|
-
visibility:
|
|
173
|
-
display:
|
|
182
|
+
visibility: oe ? void 0 : "hidden",
|
|
183
|
+
display: le ? void 0 : "none",
|
|
174
184
|
...e.style
|
|
175
185
|
}
|
|
176
186
|
},
|
|
177
|
-
!e.resizeHint && /* @__PURE__ */
|
|
178
|
-
|
|
187
|
+
!e.resizeHint && /* @__PURE__ */ n.createElement("span", { className: "k-event-actions" }, e.tail && /* @__PURE__ */ n.createElement(
|
|
188
|
+
V,
|
|
179
189
|
{
|
|
180
|
-
name:
|
|
181
|
-
icon:
|
|
190
|
+
name: q === "rtl" ? "chevron-right" : "chevron-left",
|
|
191
|
+
icon: q === "rtl" ? ye : Ie
|
|
182
192
|
}
|
|
183
|
-
), e.isRecurring && !e.isException && /* @__PURE__ */
|
|
184
|
-
!e.resizeHint && /* @__PURE__ */
|
|
193
|
+
), e.isRecurring && !e.isException && /* @__PURE__ */ n.createElement(V, { name: "arrow-rotate-cw", icon: Re }), !e.isRecurring && e.isException && /* @__PURE__ */ n.createElement(V, { name: "arrows-no-repeat", icon: Se })),
|
|
194
|
+
!e.resizeHint && /* @__PURE__ */ n.createElement("div", { title: B }, !e.isAllDay && /* @__PURE__ */ n.createElement(J, { className: "k-event-time" }, B), /* @__PURE__ */ n.createElement(J, null, e.title))
|
|
185
195
|
);
|
|
186
196
|
}
|
|
187
|
-
),
|
|
188
|
-
item:
|
|
197
|
+
), ze = {
|
|
198
|
+
item: me
|
|
189
199
|
};
|
|
190
|
-
|
|
200
|
+
xe.displayName = "KendoReactSchedulerViewItem";
|
|
191
201
|
export {
|
|
192
|
-
|
|
193
|
-
|
|
202
|
+
xe as SchedulerViewItem,
|
|
203
|
+
ze as schedulerViewItemDefaultProps
|
|
194
204
|
};
|
package/package-metadata.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.freeze({name:"@progress/kendo-react-scheduler",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:
|
|
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: 1783674837,version:"15.1.1-develop.1",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui"});exports.packageMetadata=e;
|
package/package-metadata.mjs
CHANGED
|
@@ -6,7 +6,7 @@ export const packageMetadata = Object.freeze({
|
|
|
6
6
|
productName: 'KendoReact',
|
|
7
7
|
productCode: 'KENDOUIREACT',
|
|
8
8
|
productCodes: ['KENDOUIREACT'],
|
|
9
|
-
publishDate:
|
|
10
|
-
version: '15.1.
|
|
9
|
+
publishDate: 1783674837,
|
|
10
|
+
version: '15.1.1-develop.1',
|
|
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": "15.1.
|
|
3
|
+
"version": "15.1.1-develop.1",
|
|
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,15 +29,15 @@
|
|
|
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": "15.1.
|
|
33
|
-
"@progress/kendo-react-common": "15.1.
|
|
34
|
-
"@progress/kendo-react-dateinputs": "15.1.
|
|
35
|
-
"@progress/kendo-react-dialogs": "15.1.
|
|
36
|
-
"@progress/kendo-react-dropdowns": "15.1.
|
|
37
|
-
"@progress/kendo-react-form": "15.1.
|
|
38
|
-
"@progress/kendo-react-inputs": "15.1.
|
|
39
|
-
"@progress/kendo-react-intl": "15.1.
|
|
40
|
-
"@progress/kendo-react-popup": "15.1.
|
|
32
|
+
"@progress/kendo-react-buttons": "15.1.1-develop.1",
|
|
33
|
+
"@progress/kendo-react-common": "15.1.1-develop.1",
|
|
34
|
+
"@progress/kendo-react-dateinputs": "15.1.1-develop.1",
|
|
35
|
+
"@progress/kendo-react-dialogs": "15.1.1-develop.1",
|
|
36
|
+
"@progress/kendo-react-dropdowns": "15.1.1-develop.1",
|
|
37
|
+
"@progress/kendo-react-form": "15.1.1-develop.1",
|
|
38
|
+
"@progress/kendo-react-inputs": "15.1.1-develop.1",
|
|
39
|
+
"@progress/kendo-react-intl": "15.1.1-develop.1",
|
|
40
|
+
"@progress/kendo-react-popup": "15.1.1-develop.1",
|
|
41
41
|
"@progress/kendo-svg-icons": "^4.9.0 || ^5.0.0",
|
|
42
42
|
"react": "^18.0.0 || ^19.0.0",
|
|
43
43
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"package": {
|
|
68
68
|
"productName": "KendoReact",
|
|
69
69
|
"productCode": "KENDOUIREACT",
|
|
70
|
-
"publishDate":
|
|
70
|
+
"publishDate": 1783674837,
|
|
71
71
|
"licensingDocsUrl": "https://www.telerik.com/kendo-react-ui"
|
|
72
72
|
}
|
|
73
73
|
},
|