@progress/kendo-react-scheduler 16.1.0-develop.6 → 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.
- package/Scheduler.js +1 -1
- package/Scheduler.mjs +199 -191
- package/components/BaseView.d.ts +1 -0
- package/components/BaseView.js +1 -1
- package/components/BaseView.mjs +7 -7
- package/components/DateHeaderCell.js +1 -1
- package/components/DateHeaderCell.mjs +5 -5
- package/constants/index.d.ts +2 -0
- package/constants/index.js +1 -1
- package/constants/index.mjs +15 -13
- package/dist/cdn/js/kendo-react-scheduler.js +1 -1
- package/editors/SchedulerRecurrenceDialog.js +1 -1
- package/editors/SchedulerRecurrenceDialog.mjs +191 -188
- package/hooks/useSlotExpand.js +1 -1
- package/hooks/useSlotExpand.mjs +22 -22
- package/items/SchedulerProportionalViewItem.js +1 -1
- package/items/SchedulerProportionalViewItem.mjs +94 -97
- package/items/SchedulerViewItem.d.ts +2 -0
- package/items/SchedulerViewItem.js +1 -1
- package/items/SchedulerViewItem.mjs +152 -150
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +12 -12
- package/slots/SchedulerSlot.d.ts +2 -0
- package/slots/SchedulerSlot.js +1 -1
- package/slots/SchedulerSlot.mjs +1 -0
- package/tasks/SchedulerTask.js +1 -1
- package/tasks/SchedulerTask.mjs +12 -12
- package/views/agenda/AgendaView.js +1 -1
- package/views/agenda/AgendaView.mjs +48 -24
- package/views/common/VerticalResourceIterator.d.ts +1 -0
- package/views/common/VerticalResourceIterator.js +1 -1
- package/views/common/VerticalResourceIterator.mjs +29 -29
- package/views/day/MultiDayView.js +1 -1
- package/views/day/MultiDayView.mjs +77 -77
- package/views/month/MonthView.js +1 -1
- package/views/month/MonthView.mjs +67 -67
- package/views/time/MultiDayTimelineView.js +1 -1
- package/views/time/MultiDayTimelineView.mjs +44 -44
- package/components/footer/bussiness-hours/BussinessHours.d.ts +0 -20
- package/components/footer/bussiness-hours/BussinessHours.js +0 -8
- package/components/footer/bussiness-hours/BussinessHours.mjs +0 -29
|
@@ -6,232 +6,234 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import * as t from "react";
|
|
9
|
-
import { SchedulerItem as
|
|
10
|
-
import { first as
|
|
11
|
-
import { getRect as
|
|
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
|
|
14
|
-
import { SchedulerItemContent as
|
|
15
|
-
import { useDir as
|
|
16
|
-
import { chevronRightIcon as
|
|
17
|
-
import { useEditable as
|
|
18
|
-
import { useSchedulerViewItemsContext as
|
|
19
|
-
import { useSchedulerElementContext as
|
|
20
|
-
import { useRowSync as
|
|
21
|
-
const
|
|
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
22
|
(e, ne) => {
|
|
23
|
-
const { item:
|
|
24
|
-
t.useImperativeHandle(
|
|
25
|
-
const
|
|
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
|
-
var
|
|
28
|
-
return e.isAllDay ? (
|
|
27
|
+
var r, 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
|
-
[
|
|
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
|
|
35
|
-
() =>
|
|
36
|
-
[
|
|
37
|
-
),
|
|
38
|
-
let
|
|
39
|
-
return
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
}),
|
|
43
|
-
},
|
|
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
|
+
let a = 1;
|
|
39
|
+
return r.forEach((o) => {
|
|
40
|
+
const s = n.filter((H) => L(o.current.props, H.props));
|
|
41
|
+
s.length > a && (a = s.length);
|
|
42
|
+
}), a;
|
|
43
|
+
}, we = (r, n) => r.map((o) => n.filter((s) => L(o.current.props, s.props))), ye = (r, n, a, o = !1) => {
|
|
44
44
|
var V;
|
|
45
|
-
const
|
|
46
|
-
let
|
|
45
|
+
const s = n.filter((i) => i.props.order !== null && i.props.order !== void 0).map((i) => {
|
|
46
|
+
let l = i.props.start, u = i.props.end;
|
|
47
47
|
if (i.props.isAllDay || o) {
|
|
48
|
-
|
|
49
|
-
const I = new Date(
|
|
50
|
-
|
|
48
|
+
l = new Date(l.getFullYear(), l.getMonth(), l.getDate());
|
|
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
|
-
return { order: i.props.order, start:
|
|
53
|
-
}),
|
|
54
|
-
for (const i of
|
|
55
|
-
|
|
56
|
-
const
|
|
57
|
-
for (const i of
|
|
58
|
-
const
|
|
59
|
-
let
|
|
60
|
-
|
|
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), w = /* @__PURE__ */ new Map();
|
|
54
|
+
for (const i of s)
|
|
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
|
+
for (const i of H) {
|
|
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
|
|
64
|
-
if (!
|
|
63
|
+
const R = w.get(x);
|
|
64
|
+
if (!R)
|
|
65
65
|
return;
|
|
66
|
-
|
|
67
|
-
(
|
|
68
|
-
(
|
|
66
|
+
l.some(
|
|
67
|
+
(M) => R.some(
|
|
68
|
+
(c) => C(c.start, c.end, M.start, M.end, a)
|
|
69
69
|
)
|
|
70
|
-
) &&
|
|
70
|
+
) && g + 1 > I && (I = g + 1);
|
|
71
71
|
});
|
|
72
|
-
for (let
|
|
73
|
-
if (
|
|
74
|
-
(
|
|
75
|
-
(N) => !
|
|
72
|
+
for (let g = I; g < b.length; g++)
|
|
73
|
+
if (l.every(
|
|
74
|
+
(R) => b[g].every(
|
|
75
|
+
(N) => !C(
|
|
76
76
|
N.start,
|
|
77
77
|
N.end,
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
78
|
+
R.start,
|
|
79
|
+
R.end,
|
|
80
|
+
a
|
|
81
81
|
)
|
|
82
82
|
)
|
|
83
83
|
)) {
|
|
84
|
-
|
|
84
|
+
u = g;
|
|
85
85
|
break;
|
|
86
86
|
}
|
|
87
|
-
|
|
87
|
+
u === -1 && (u = b.length, b.push([])), b[u].push(...l), E.set(i, u);
|
|
88
88
|
}
|
|
89
|
-
return (V =
|
|
90
|
-
},
|
|
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
|
-
(
|
|
93
|
-
var
|
|
94
|
-
const
|
|
95
|
-
if (
|
|
96
|
-
|
|
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
|
+
if (r.length === 0) {
|
|
96
|
+
B(!1);
|
|
97
97
|
return;
|
|
98
98
|
}
|
|
99
|
-
if (!
|
|
99
|
+
if (!a.current || !n)
|
|
100
100
|
return;
|
|
101
|
-
const o =
|
|
102
|
-
(
|
|
103
|
-
|
|
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
|
|
106
|
-
|
|
107
|
-
e.dragHint ?
|
|
108
|
-
|
|
105
|
+
const b = e.dragHint || e.resizeHint ? Ae(
|
|
106
|
+
m.current,
|
|
107
|
+
e.dragHint ? H : w,
|
|
108
|
+
r,
|
|
109
109
|
e.ignoreIsAllDay
|
|
110
|
-
) : (
|
|
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
|
|
113
|
-
|
|
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
|
-
|
|
116
|
-
|
|
117
|
-
|
|
115
|
+
A,
|
|
116
|
+
Y,
|
|
117
|
+
v
|
|
118
118
|
);
|
|
119
119
|
} else
|
|
120
|
-
|
|
121
|
-
let
|
|
122
|
-
const V =
|
|
120
|
+
f.current = b;
|
|
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
|
-
const
|
|
125
|
-
if (V.forEach((
|
|
126
|
-
let
|
|
127
|
-
|
|
128
|
-
if (
|
|
129
|
-
const
|
|
130
|
-
|
|
124
|
+
const l = !e.vertical && f.current !== null;
|
|
125
|
+
if (V.forEach((c) => {
|
|
126
|
+
let A = 0;
|
|
127
|
+
c.forEach((h) => {
|
|
128
|
+
if (!l) {
|
|
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
|
-
}),
|
|
133
|
-
}),
|
|
134
|
-
const
|
|
135
|
-
if (
|
|
136
|
-
i =
|
|
137
|
-
else if (!Number.isNaN(
|
|
138
|
-
i =
|
|
132
|
+
}), A > i && (i = A);
|
|
133
|
+
}), l) {
|
|
134
|
+
const c = (R = e.style) == null ? void 0 : R.height, A = typeof c == "number" ? c : parseFloat(c);
|
|
135
|
+
if (c == null)
|
|
136
|
+
i = f.current * (G + q);
|
|
137
|
+
else if (!Number.isNaN(A))
|
|
138
|
+
i = f.current * (A + q);
|
|
139
139
|
else {
|
|
140
|
-
const
|
|
141
|
-
(
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
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 || C(
|
|
142
|
+
d.props.start,
|
|
143
|
+
d.props.end,
|
|
144
|
+
a.current.props.start,
|
|
145
|
+
a.current.props.end
|
|
146
146
|
))
|
|
147
|
-
),
|
|
148
|
-
|
|
149
|
-
var F,
|
|
150
|
-
const
|
|
151
|
-
if (
|
|
147
|
+
), S = /* @__PURE__ */ new Map();
|
|
148
|
+
h.forEach((d) => {
|
|
149
|
+
var F, Q;
|
|
150
|
+
const v = d._order;
|
|
151
|
+
if (v == null || v >= f.current)
|
|
152
152
|
return;
|
|
153
|
-
const
|
|
154
|
-
|
|
155
|
-
}), i = Array.from(
|
|
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
|
-
if (
|
|
159
|
-
|
|
158
|
+
if (r.length === 0) {
|
|
159
|
+
B(!1);
|
|
160
160
|
return;
|
|
161
161
|
}
|
|
162
|
-
const
|
|
163
|
-
o.width = e.vertical ? o.width /
|
|
164
|
-
|
|
165
|
-
(n)
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
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(
|
|
167
|
+
(r) => {
|
|
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
|
-
[
|
|
173
|
+
[_]
|
|
172
174
|
);
|
|
173
|
-
t.useEffect(() => (
|
|
174
|
-
|
|
175
|
-
|
|
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
|
-
|
|
180
|
+
y.current !== void 0 && (window.cancelAnimationFrame(y.current), y.current = void 0);
|
|
179
181
|
}));
|
|
180
|
-
const
|
|
181
|
-
return
|
|
182
|
-
element:
|
|
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 (!
|
|
191
|
+
if (!O.current)
|
|
190
192
|
return;
|
|
191
|
-
const
|
|
192
|
-
return
|
|
193
|
-
|
|
193
|
+
const r = window.ResizeObserver, n = r && new r(J);
|
|
194
|
+
return n && n.observe(O.current), () => {
|
|
195
|
+
n && n.disconnect();
|
|
194
196
|
};
|
|
195
|
-
}, [
|
|
196
|
-
|
|
197
|
+
}, [J, O]), /* @__PURE__ */ t.createElement(
|
|
198
|
+
se,
|
|
197
199
|
{
|
|
198
200
|
...le,
|
|
199
|
-
_ref:
|
|
200
|
-
_maxSiblingsPerSlot:
|
|
201
|
-
_order:
|
|
202
|
-
itemRef:
|
|
201
|
+
_ref: m,
|
|
202
|
+
_maxSiblingsPerSlot: K,
|
|
203
|
+
_order: f,
|
|
204
|
+
itemRef: m,
|
|
203
205
|
style: {
|
|
204
|
-
visibility:
|
|
205
|
-
display:
|
|
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:
|
|
213
|
-
icon:
|
|
214
|
+
name: P === "rtl" ? "chevron-right" : "chevron-left",
|
|
215
|
+
icon: P === "rtl" ? p : ee
|
|
214
216
|
}
|
|
215
|
-
)), /* @__PURE__ */ t.createElement("div", { title:
|
|
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" ?
|
|
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:
|
|
225
|
-
icon:
|
|
226
|
+
name: P === "rtl" ? "chevron-left" : "chevron-right",
|
|
227
|
+
icon: P === "rtl" ? ee : p
|
|
226
228
|
}
|
|
227
229
|
)))
|
|
228
230
|
);
|
|
229
231
|
}
|
|
230
|
-
),
|
|
231
|
-
item:
|
|
232
|
+
), Oe = {
|
|
233
|
+
item: Ie
|
|
232
234
|
};
|
|
233
|
-
|
|
235
|
+
Te.displayName = "KendoReactSchedulerViewItem";
|
|
234
236
|
export {
|
|
235
|
-
|
|
236
|
-
|
|
237
|
+
Te as SchedulerViewItem,
|
|
238
|
+
Oe as schedulerViewItemDefaultProps
|
|
237
239
|
};
|
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: 1787742136,version:"16.1.0-develop.8",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: '16.1.0-develop.
|
|
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.
|
|
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.
|
|
33
|
-
"@progress/kendo-react-common": "16.1.0-develop.
|
|
34
|
-
"@progress/kendo-react-dateinputs": "16.1.0-develop.
|
|
35
|
-
"@progress/kendo-react-dialogs": "16.1.0-develop.
|
|
36
|
-
"@progress/kendo-react-dropdowns": "16.1.0-develop.
|
|
37
|
-
"@progress/kendo-react-form": "16.1.0-develop.
|
|
38
|
-
"@progress/kendo-react-inputs": "16.1.0-develop.
|
|
39
|
-
"@progress/kendo-react-intl": "16.1.0-develop.
|
|
40
|
-
"@progress/kendo-react-popup": "16.1.0-develop.
|
|
41
|
-
"@progress/kendo-react-tooltip": "16.1.0-develop.
|
|
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":
|
|
116
|
+
"publishDate": 1787742136,
|
|
117
117
|
"licensingDocsUrl": "https://www.telerik.com/kendo-react-ui"
|
|
118
118
|
}
|
|
119
119
|
},
|
package/slots/SchedulerSlot.d.ts
CHANGED
|
@@ -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
|
*/
|
package/slots/SchedulerSlot.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 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;
|
package/slots/SchedulerSlot.mjs
CHANGED
package/tasks/SchedulerTask.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 R=require("react"),
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("react"),E=require("@progress/kendo-react-intl"),u=require("../messages/index.js"),s=require("@progress/kendo-react-common"),d=require("@progress/kendo-svg-icons"),y=require("../hooks/useEditable.js");function N(e){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const n=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(c,a,n.get?n:{enumerable:!0,get:()=>e[a]})}}return c.default=e,Object.freeze(c)}const t=N(R),b=t.forwardRef((e,c)=>{const{_ref:a,onRemoveClick:n}=e,l=t.useRef(null),m=t.useRef(null);t.useImperativeHandle(l,()=>({props:e,element:m.current})),t.useImperativeHandle(c,()=>l.current),t.useImperativeHandle(a,()=>l.current);const f=y.useEditable(e.editable),g=e.readonly?{remove:!1}:f,k=E.useLocalization().toLanguageString(u.deleteTitle,u.messages[u.deleteTitle]),r=e.group.resources.find(o=>!!(o.colorField&&o[o.colorField]!==void 0)),i=r&&r.colorField&&r[r.colorField],v=t.useCallback(o=>{n&&n.call(void 0,{syntheticEvent:o,target:l.current})},[n,l]),I=t.useMemo(()=>s.classNames("k-task",e.className),[e.className]);return t.createElement("div",{id:e.id,ref:m,style:e.style,className:I,tabIndex:e.tabIndex||void 0},i&&t.createElement("span",{className:"k-scheduler-mark",style:{color:i,backgroundColor:i}}),e.isRecurring&&t.createElement(s.IconWrap,{name:"arrow-rotate-cw",icon:d.arrowRotateCwIcon}),e.isException&&t.createElement(s.IconWrap,{name:"arrows-no-repeat",icon:d.arrowsNoRepeatIcon}),t.createElement("span",{className:"k-scheduler-task-text"},e.title),g.remove&&t.createElement("a",{className:"k-link k-event-delete",title:k,"aria-label":k,onClick:v},t.createElement(s.IconWrap,{name:"x",icon:d.xIcon})))});b.displayName="KendoReactSchedulerTask";exports.SchedulerTask=b;
|
package/tasks/SchedulerTask.mjs
CHANGED
|
@@ -6,16 +6,16 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import * as e from "react";
|
|
9
|
-
import { useLocalization as
|
|
10
|
-
import { deleteTitle as m, messages as
|
|
11
|
-
import { classNames as
|
|
9
|
+
import { useLocalization as E } from "@progress/kendo-react-intl";
|
|
10
|
+
import { deleteTitle as m, messages as R } from "../messages/index.mjs";
|
|
11
|
+
import { classNames as g, IconWrap as r } from "@progress/kendo-react-common";
|
|
12
12
|
import { arrowRotateCwIcon as I, arrowsNoRepeatIcon as N, xIcon as w } from "@progress/kendo-svg-icons";
|
|
13
13
|
import { useEditable as x } from "../hooks/useEditable.mjs";
|
|
14
14
|
const C = e.forwardRef(
|
|
15
15
|
(a, d) => {
|
|
16
|
-
const { _ref: u, onRemoveClick: n } = a, t = e.useRef(null),
|
|
17
|
-
e.useImperativeHandle(t, () => ({ props: a, element:
|
|
18
|
-
const
|
|
16
|
+
const { _ref: u, onRemoveClick: n } = a, t = e.useRef(null), s = e.useRef(null);
|
|
17
|
+
e.useImperativeHandle(t, () => ({ props: a, element: s.current })), e.useImperativeHandle(d, () => t.current), e.useImperativeHandle(u, () => t.current);
|
|
18
|
+
const k = x(a.editable), f = a.readonly ? { remove: !1 } : k, i = E().toLanguageString(m, R[m]), o = a.group.resources.find(
|
|
19
19
|
(l) => !!(l.colorField && l[l.colorField] !== void 0)
|
|
20
20
|
), c = o && o.colorField && o[o.colorField], v = e.useCallback(
|
|
21
21
|
(l) => {
|
|
@@ -25,12 +25,12 @@ const C = e.forwardRef(
|
|
|
25
25
|
});
|
|
26
26
|
},
|
|
27
27
|
[n, t]
|
|
28
|
-
), b = e.useMemo(() =>
|
|
28
|
+
), b = e.useMemo(() => g("k-task", a.className), [a.className]);
|
|
29
29
|
return /* @__PURE__ */ e.createElement(
|
|
30
30
|
"div",
|
|
31
31
|
{
|
|
32
32
|
id: a.id,
|
|
33
|
-
ref:
|
|
33
|
+
ref: s,
|
|
34
34
|
style: a.style,
|
|
35
35
|
className: b,
|
|
36
36
|
tabIndex: a.tabIndex || void 0
|
|
@@ -38,13 +38,13 @@ const C = e.forwardRef(
|
|
|
38
38
|
c && /* @__PURE__ */ e.createElement("span", { className: "k-scheduler-mark", style: { color: c, backgroundColor: c } }),
|
|
39
39
|
a.isRecurring && /* @__PURE__ */ e.createElement(r, { name: "arrow-rotate-cw", icon: I }),
|
|
40
40
|
a.isException && /* @__PURE__ */ e.createElement(r, { name: "arrows-no-repeat", icon: N }),
|
|
41
|
-
a.title,
|
|
42
|
-
|
|
41
|
+
/* @__PURE__ */ e.createElement("span", { className: "k-scheduler-task-text" }, a.title),
|
|
42
|
+
f.remove && /* @__PURE__ */ e.createElement(
|
|
43
43
|
"a",
|
|
44
44
|
{
|
|
45
45
|
className: "k-link k-event-delete",
|
|
46
|
-
title:
|
|
47
|
-
"aria-label":
|
|
46
|
+
title: i,
|
|
47
|
+
"aria-label": i,
|
|
48
48
|
onClick: v
|
|
49
49
|
},
|
|
50
50
|
/* @__PURE__ */ e.createElement(r, { name: "x", icon: w })
|