@progress/kendo-react-scheduler 16.2.0-develop.8 → 16.2.0
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/EULA.pdf +0 -0
- package/EULA.rtf +2730 -0
- package/EULA.txt +292 -0
- package/components/MoreEventsPopover.d.ts +1 -0
- package/components/MoreEventsPopover.js +1 -1
- package/components/MoreEventsPopover.mjs +31 -29
- package/dist/cdn/js/kendo-react-scheduler.js +1 -1
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +12 -17
- package/views/month/MonthView.js +1 -1
- package/views/month/MonthView.mjs +246 -146
|
@@ -6,27 +6,28 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import * as e from "react";
|
|
9
|
-
import { Popover as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
import { Popover as S } from "@progress/kendo-react-tooltip";
|
|
10
|
+
import { classNames as R } from "@progress/kendo-react-common";
|
|
11
|
+
import { useInternationalization as A, useLocalization as I } from "@progress/kendo-react-intl";
|
|
12
|
+
import { noEvents as h, messages as D, popoverEvents as y } from "../messages/index.mjs";
|
|
13
|
+
const O = { skeleton: "MMM" }, P = { skeleton: "dd" }, _ = "t", x = (M) => {
|
|
14
|
+
const { show: i, anchor: c, slot: o, itemsPerSlot: u, onDayClick: m, onItemDoubleClick: p, onClose: n } = M, d = A(), v = I(), k = e.useMemo(() => o ? o.items.filter((t, s) => s >= u) : [], [o, u]), N = e.useCallback(
|
|
14
15
|
(t) => {
|
|
15
|
-
o &&
|
|
16
|
+
o && m && m(o);
|
|
16
17
|
},
|
|
17
|
-
[o,
|
|
18
|
+
[o, m]
|
|
18
19
|
);
|
|
19
20
|
e.useEffect(() => {
|
|
20
|
-
if (!
|
|
21
|
+
if (!i)
|
|
21
22
|
return;
|
|
22
|
-
const t = (
|
|
23
|
-
const a =
|
|
24
|
-
|
|
23
|
+
const t = (s) => {
|
|
24
|
+
const a = s.target, r = document.querySelector(".k-scheduler-popover");
|
|
25
|
+
r && !r.contains(a) && c && !c.contains(a) && (n == null || n());
|
|
25
26
|
};
|
|
26
27
|
return document.addEventListener("mousedown", t), () => {
|
|
27
28
|
document.removeEventListener("mousedown", t);
|
|
28
29
|
};
|
|
29
|
-
}, [
|
|
30
|
+
}, [i, c, n]);
|
|
30
31
|
const T = e.useCallback(
|
|
31
32
|
(t) => {
|
|
32
33
|
t.key === "Escape" && (n == null || n());
|
|
@@ -35,12 +36,12 @@ const A = { skeleton: "MMM" }, O = { skeleton: "dd" }, P = "t", _ = (D) => {
|
|
|
35
36
|
);
|
|
36
37
|
if (!o)
|
|
37
38
|
return null;
|
|
38
|
-
const
|
|
39
|
+
const E = new Date(o.zonedEnd.getTime() - (o.zonedEnd.getTime() - o.zonedStart.getTime()) / 2), b = d.formatDate(E, O), C = d.formatDate(E, P), F = v.toLanguageString(h, D[h]), z = v.toLanguageString(y, D[y]), w = /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("div", { className: "k-month" }, b), /* @__PURE__ */ e.createElement("div", { className: "k-link k-day", onClick: N }, C));
|
|
39
40
|
return /* @__PURE__ */ e.createElement(
|
|
40
|
-
|
|
41
|
+
S,
|
|
41
42
|
{
|
|
42
|
-
anchor:
|
|
43
|
-
show:
|
|
43
|
+
anchor: c,
|
|
44
|
+
show: i,
|
|
44
45
|
popoverClass: "k-scheduler-popover",
|
|
45
46
|
position: "right",
|
|
46
47
|
collision: { horizontal: "flip", vertical: "flip" },
|
|
@@ -48,28 +49,29 @@ const A = { skeleton: "MMM" }, O = { skeleton: "dd" }, P = "t", _ = (D) => {
|
|
|
48
49
|
title: w,
|
|
49
50
|
style: { width: 220 },
|
|
50
51
|
onKeyDown: T,
|
|
51
|
-
animate: {
|
|
52
|
+
animate: { openDuration: 1, closeDuration: 1 }
|
|
52
53
|
},
|
|
53
|
-
|
|
54
|
-
var
|
|
55
|
-
const a = (
|
|
56
|
-
(
|
|
57
|
-
),
|
|
54
|
+
k.length > 0 ? /* @__PURE__ */ e.createElement("div", { className: "k-popover-events", role: "list", "aria-label": z }, k.map((t, s) => {
|
|
55
|
+
var f, g;
|
|
56
|
+
const a = (g = (f = t.group) == null ? void 0 : f.resources) == null ? void 0 : g.find(
|
|
57
|
+
(l) => !!(l.colorField && l[l.colorField] !== "" && l[l.colorField] !== void 0)
|
|
58
|
+
), r = (a == null ? void 0 : a.colorField) && a[a.colorField], L = r ? { backgroundColor: r, borderColor: r } : void 0;
|
|
58
59
|
return /* @__PURE__ */ e.createElement(
|
|
59
60
|
"div",
|
|
60
61
|
{
|
|
61
|
-
key: t.uid ||
|
|
62
|
-
className: "k-popover-event k-event",
|
|
62
|
+
key: t.uid || s,
|
|
63
|
+
className: R("k-popover-event k-event", { "k-readonly": !!t.readonly }),
|
|
63
64
|
role: "listitem",
|
|
64
|
-
style:
|
|
65
|
+
style: L,
|
|
66
|
+
onDoubleClick: p ? (l) => p(t, l) : void 0
|
|
65
67
|
},
|
|
66
68
|
/* @__PURE__ */ e.createElement("div", { className: "k-event-title" }, t.title || ""),
|
|
67
|
-
/* @__PURE__ */ e.createElement("span", { className: "k-event-time" },
|
|
69
|
+
/* @__PURE__ */ e.createElement("span", { className: "k-event-time" }, d.formatDate(t.zonedStart, _))
|
|
68
70
|
);
|
|
69
|
-
})) : /* @__PURE__ */ e.createElement("span", { className: "k-no-data" },
|
|
71
|
+
})) : /* @__PURE__ */ e.createElement("span", { className: "k-no-data" }, F)
|
|
70
72
|
);
|
|
71
73
|
};
|
|
72
|
-
|
|
74
|
+
x.displayName = "KendoReactSchedulerMoreEventsPopover";
|
|
73
75
|
export {
|
|
74
|
-
|
|
76
|
+
x as MoreEventsPopover
|
|
75
77
|
};
|