@progress/kendo-react-scheduler 15.2.0-develop.4 → 15.2.0-develop.6
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.d.ts +2 -2
- package/Scheduler.js +1 -1
- package/Scheduler.mjs +394 -302
- package/components/DateHeaderCell.js +1 -1
- package/components/DateHeaderCell.mjs +23 -20
- package/components/MoreEventsPopover.d.ts +25 -0
- package/components/MoreEventsPopover.js +8 -0
- package/components/MoreEventsPopover.mjs +59 -0
- package/components/SchedulerForm.d.ts +4 -0
- package/components/SchedulerForm.js +1 -1
- package/components/SchedulerForm.mjs +113 -100
- package/components/SchedulerRemoveDialog.d.ts +4 -0
- package/components/SchedulerRemoveDialog.js +1 -1
- package/components/SchedulerRemoveDialog.mjs +29 -29
- package/components/ShowMoreItemsButton.d.ts +1 -0
- package/components/ShowMoreItemsButton.js +1 -1
- package/components/ShowMoreItemsButton.mjs +33 -26
- package/components/header/navigation/NavigationDatePicker.d.ts +9 -1
- package/components/header/navigation/NavigationDatePicker.js +1 -1
- package/components/header/navigation/NavigationDatePicker.mjs +65 -71
- package/components/header/view-selector/ViewSelectorList.d.ts +9 -1
- package/components/header/view-selector/ViewSelectorList.js +1 -1
- package/components/header/view-selector/ViewSelectorList.mjs +35 -51
- package/dist/cdn/js/kendo-react-scheduler.js +1 -1
- package/editors/RemoveRecurrenceConfirmDialog.d.ts +17 -0
- package/editors/RemoveRecurrenceConfirmDialog.js +8 -0
- package/editors/RemoveRecurrenceConfirmDialog.mjs +28 -0
- package/editors/ResourceEditor.d.ts +1 -0
- package/editors/ResourceEditor.js +1 -1
- package/editors/ResourceEditor.mjs +18 -17
- package/editors/SchedulerFormEditor.d.ts +69 -356
- package/editors/SchedulerFormEditor.js +1 -1
- package/editors/SchedulerFormEditor.mjs +360 -227
- package/editors/SchedulerRecurrenceDialog.d.ts +30 -0
- package/editors/SchedulerRecurrenceDialog.js +8 -0
- package/editors/SchedulerRecurrenceDialog.mjs +463 -0
- package/editors/{FilterableComboBox.d.ts → TimezoneDropDownList.d.ts} +2 -2
- package/editors/TimezoneDropDownList.js +8 -0
- package/editors/TimezoneDropDownList.mjs +42 -0
- package/editors/ZonedDateTime.d.ts +2 -0
- package/editors/ZonedDateTime.js +1 -1
- package/editors/ZonedDateTime.mjs +11 -18
- package/editors/ZonedSplitDateTime.d.ts +34 -0
- package/editors/ZonedSplitDateTime.js +8 -0
- package/editors/ZonedSplitDateTime.mjs +72 -0
- package/hooks/index.d.ts +2 -0
- package/hooks/useGroupRowHeightSync.d.ts +10 -0
- package/hooks/useGroupRowHeightSync.js +8 -0
- package/hooks/useGroupRowHeightSync.mjs +84 -0
- package/hooks/useRecurrenceSummary.d.ts +10 -0
- package/hooks/useRecurrenceSummary.js +8 -0
- package/hooks/useRecurrenceSummary.mjs +69 -0
- package/hooks/useSlotExpand.js +1 -1
- package/hooks/useSlotExpand.mjs +55 -45
- package/hooks/useToolbarResponsive.d.ts +22 -0
- package/hooks/useToolbarResponsive.js +8 -0
- package/hooks/useToolbarResponsive.mjs +37 -0
- package/index.d.mts +5 -2
- package/index.d.ts +5 -2
- package/index.js +1 -1
- package/index.mjs +83 -79
- package/items/SchedulerEditItem.js +1 -1
- package/items/SchedulerEditItem.mjs +361 -347
- package/items/SchedulerItem.d.ts +4 -0
- package/items/SchedulerItem.js +1 -1
- package/items/SchedulerItem.mjs +171 -185
- package/items/SchedulerProportionalViewItem.js +1 -1
- package/items/SchedulerProportionalViewItem.mjs +111 -94
- package/items/SchedulerViewItem.js +1 -1
- package/items/SchedulerViewItem.mjs +175 -142
- package/messages/index.d.ts +75 -0
- package/messages/index.js +1 -1
- package/messages/index.mjs +147 -97
- package/models/Item.d.ts +2 -0
- package/models/Occurrence.d.ts +2 -0
- package/models/SchedulerModelFields.d.ts +5 -0
- package/models/SchedulerResource.d.ts +6 -0
- package/models/SchedulerView.d.ts +3 -0
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +12 -11
- package/services/itemsService.js +1 -1
- package/services/itemsService.mjs +34 -32
- package/services/occurrenceService.js +1 -1
- package/services/occurrenceService.mjs +27 -26
- package/tasks/SchedulerTask.js +1 -1
- package/tasks/SchedulerTask.mjs +26 -26
- package/utils/index.d.ts +1 -0
- package/utils/index.js +1 -1
- package/utils/index.mjs +7 -6
- package/views/agenda/AgendaView.js +1 -1
- package/views/agenda/AgendaView.mjs +7 -7
- package/views/day/DayView.js +1 -1
- package/views/day/DayView.mjs +2 -2
- package/views/day/MultiDayView.js +1 -1
- package/views/day/MultiDayView.mjs +2 -2
- package/views/month/MonthView.js +1 -1
- package/views/month/MonthView.mjs +111 -82
- package/views/time/MultiDayTimelineView.js +1 -1
- package/views/time/MultiDayTimelineView.mjs +23 -23
- package/views/time/TimelineView.js +1 -1
- package/views/time/TimelineView.mjs +2 -2
- package/views/week/WeekView.js +1 -1
- package/views/week/WeekView.mjs +5 -5
- package/views/week/WorkWeekView.js +1 -1
- package/views/week/WorkWeekView.mjs +15 -15
- package/editors/FilterableComboBox.js +0 -8
- package/editors/FilterableComboBox.mjs +0 -30
|
@@ -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 k=require("react"),y=require("@progress/kendo-react-intl"),g=require("@progress/kendo-react-common");function D(e){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const c=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(l,a,c.get?c:{enumerable:!0,get:()=>e[a]})}}return l.default=e,Object.freeze(l)}const t=D(k),u=t.forwardRef((e,l)=>{var m;const{as:a=o.as,...c}=e,n=t.useRef(null),s=t.useRef(null),d=y.useInternationalization(),i=t.useMemo(()=>g.classNames("k-scheduler-cell k-heading-cell",e.className),[e.className]);t.useImperativeHandle(s,()=>({element:n.current&&n.current.element?n.current.element:n.current,props:e})),t.useImperativeHandle(l,()=>s.current);const r=(m=e.format)!=null?m:o.format,f=typeof r=="object"&&"skeleton"in r&&typeof r.skeleton=="string"&&r.skeleton.includes("E")&&r.skeleton.includes("d");return t.createElement(a,{ref:a!==o.as?void 0:n,...c,className:i},f?t.createElement(t.Fragment,null,t.createElement("span",{className:"k-scheduler-date-day"},d.formatDate(e.date,"EEE")),t.createElement("span",{className:"k-link k-nav-day"},d.formatDate(e.date,{skeleton:"d"}))," "):t.createElement("span",{className:"k-link k-nav-day"},d.formatDate(e.date,r)))}),o={as:t.forwardRef(({as:e,format:l,start:a,end:c,...n},s)=>t.createElement("div",{...n,ref:s})),format:"d"};u.displayName="KendoReactSchedulerDateHeaderCell";exports.DateHeaderCell=u;exports.dateHeaderCellDefaultProps=o;
|
|
@@ -6,31 +6,34 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import * as e from "react";
|
|
9
|
-
import { useInternationalization as
|
|
10
|
-
import { classNames as
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
import { useInternationalization as u } from "@progress/kendo-react-intl";
|
|
10
|
+
import { classNames as k } from "@progress/kendo-react-common";
|
|
11
|
+
const E = e.forwardRef((t, m) => {
|
|
12
|
+
var d;
|
|
13
|
+
const { as: r = c.as, ...o } = t, a = e.useRef(null), l = e.useRef(null), s = u(), f = e.useMemo(
|
|
14
|
+
() => k("k-scheduler-cell k-heading-cell", t.className),
|
|
15
|
+
[t.className]
|
|
15
16
|
);
|
|
16
|
-
|
|
17
|
-
element:
|
|
18
|
-
props:
|
|
19
|
-
})), e.useImperativeHandle(m, () =>
|
|
20
|
-
|
|
17
|
+
e.useImperativeHandle(l, () => ({
|
|
18
|
+
element: a.current && a.current.element ? a.current.element : a.current,
|
|
19
|
+
props: t
|
|
20
|
+
})), e.useImperativeHandle(m, () => l.current);
|
|
21
|
+
const n = (d = t.format) != null ? d : c.format, i = typeof n == "object" && "skeleton" in n && typeof n.skeleton == "string" && n.skeleton.includes("E") && n.skeleton.includes("d");
|
|
22
|
+
return /* @__PURE__ */ e.createElement(
|
|
23
|
+
r,
|
|
21
24
|
{
|
|
22
|
-
ref:
|
|
23
|
-
...
|
|
24
|
-
className:
|
|
25
|
+
ref: r !== c.as ? void 0 : a,
|
|
26
|
+
...o,
|
|
27
|
+
className: f
|
|
25
28
|
},
|
|
26
|
-
/* @__PURE__ */ e.createElement("span", { className: "k-link k-nav-day" },
|
|
29
|
+
i ? /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("span", { className: "k-scheduler-date-day" }, s.formatDate(t.date, "EEE")), /* @__PURE__ */ e.createElement("span", { className: "k-link k-nav-day" }, s.formatDate(t.date, { skeleton: "d" })), " ") : /* @__PURE__ */ e.createElement("span", { className: "k-link k-nav-day" }, s.formatDate(t.date, n))
|
|
27
30
|
);
|
|
28
|
-
}),
|
|
29
|
-
as: e.forwardRef(({ as:
|
|
31
|
+
}), c = {
|
|
32
|
+
as: e.forwardRef(({ as: t, format: m, start: r, end: o, ...a }, l) => /* @__PURE__ */ e.createElement("div", { ...a, ref: l })),
|
|
30
33
|
format: "d"
|
|
31
34
|
};
|
|
32
|
-
|
|
35
|
+
E.displayName = "KendoReactSchedulerDateHeaderCell";
|
|
33
36
|
export {
|
|
34
|
-
|
|
35
|
-
|
|
37
|
+
E as DateHeaderCell,
|
|
38
|
+
c as dateHeaderCellDefaultProps
|
|
36
39
|
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { Item, Slot } from '../models/index.js';
|
|
9
|
+
import * as React from 'react';
|
|
10
|
+
/**
|
|
11
|
+
* @hidden
|
|
12
|
+
*/
|
|
13
|
+
export interface MoreEventsPopoverProps {
|
|
14
|
+
show: boolean;
|
|
15
|
+
anchor: HTMLElement | null;
|
|
16
|
+
slot: Slot | null;
|
|
17
|
+
items: Item[];
|
|
18
|
+
itemsPerSlot: number;
|
|
19
|
+
onDayClick?: (slot: Slot) => void;
|
|
20
|
+
onClose?: () => void;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* @hidden
|
|
24
|
+
*/
|
|
25
|
+
export declare const MoreEventsPopover: React.FC<MoreEventsPopoverProps>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("react"),O=require("@progress/kendo-react-tooltip"),f=require("@progress/kendo-react-intl"),c=require("../messages/index.js");function z(r){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const o in r)if(o!=="default"){const t=Object.getOwnPropertyDescriptor(r,o);Object.defineProperty(s,o,t.get?t:{enumerable:!0,get:()=>r[o]})}}return s.default=r,Object.freeze(s)}const e=z(N),w={skeleton:"MMM"},P={skeleton:"dd"},R="t",g=r=>{const{show:s,anchor:o,slot:t,itemsPerSlot:d,onDayClick:i,onClose:a}=r,u=f.useInternationalization(),m=f.useLocalization(),p=e.useMemo(()=>t?t.items.filter((n,l)=>l>=d):[],[t,d]),y=e.useCallback(n=>{t&&i&&i(t)},[t,i]);e.useEffect(()=>{if(!s)return;const n=l=>{const k=l.target,E=document.querySelector(".k-scheduler-popover");E&&!E.contains(k)&&o&&!o.contains(k)&&(a==null||a())};return document.addEventListener("mousedown",n),()=>{document.removeEventListener("mousedown",n)}},[s,o,a]);const h=e.useCallback(n=>{n.key==="Escape"&&(a==null||a())},[a]);if(!t)return null;const v=new Date(t.zonedEnd.getTime()-(t.zonedEnd.getTime()-t.zonedStart.getTime())/2),D=u.formatDate(v,w),M=u.formatDate(v,P),b=m.toLanguageString(c.noEvents,c.messages[c.noEvents]),T=m.toLanguageString(c.popoverEvents,c.messages[c.popoverEvents]),S=e.createElement(e.Fragment,null,e.createElement("div",{className:"k-month"},D),e.createElement("div",{className:"k-link k-day",onClick:y},M));return e.createElement(O.Popover,{anchor:o,show:s,popoverClass:"k-scheduler-popover",position:"right",collision:{horizontal:"flip",vertical:"flip"},callout:!0,title:S,style:{width:220},onKeyDown:h,animate:{type:"slide",direction:"right",openDuration:500,closeDuration:500}},p.length>0?e.createElement("div",{className:"k-popover-events",role:"list","aria-label":T},p.map((n,l)=>e.createElement("div",{key:n.uid||l,className:"k-popover-event k-event",role:"listitem"},e.createElement("div",{className:"k-event-title"},n.title||""),e.createElement("span",{className:"k-event-time"},u.formatDate(n.zonedStart,R))))):e.createElement("span",{className:"k-no-data"},b))};g.displayName="KendoReactSchedulerMoreEventsPopover";exports.MoreEventsPopover=g;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import * as e from "react";
|
|
9
|
+
import { Popover as w } from "@progress/kendo-react-tooltip";
|
|
10
|
+
import { useInternationalization as L, useLocalization as S } from "@progress/kendo-react-intl";
|
|
11
|
+
import { noEvents as k, messages as E, popoverEvents as f } from "../messages/index.mjs";
|
|
12
|
+
const b = { skeleton: "MMM" }, C = { skeleton: "dd" }, R = "t", A = (g) => {
|
|
13
|
+
const { show: r, anchor: s, slot: t, itemsPerSlot: c, onDayClick: l, onClose: o } = g, i = L(), m = S(), d = e.useMemo(() => t ? t.items.filter((n, a) => a >= c) : [], [t, c]), h = e.useCallback(
|
|
14
|
+
(n) => {
|
|
15
|
+
t && l && l(t);
|
|
16
|
+
},
|
|
17
|
+
[t, l]
|
|
18
|
+
);
|
|
19
|
+
e.useEffect(() => {
|
|
20
|
+
if (!r)
|
|
21
|
+
return;
|
|
22
|
+
const n = (a) => {
|
|
23
|
+
const u = a.target, v = document.querySelector(".k-scheduler-popover");
|
|
24
|
+
v && !v.contains(u) && s && !s.contains(u) && (o == null || o());
|
|
25
|
+
};
|
|
26
|
+
return document.addEventListener("mousedown", n), () => {
|
|
27
|
+
document.removeEventListener("mousedown", n);
|
|
28
|
+
};
|
|
29
|
+
}, [r, s, o]);
|
|
30
|
+
const D = e.useCallback(
|
|
31
|
+
(n) => {
|
|
32
|
+
n.key === "Escape" && (o == null || o());
|
|
33
|
+
},
|
|
34
|
+
[o]
|
|
35
|
+
);
|
|
36
|
+
if (!t)
|
|
37
|
+
return null;
|
|
38
|
+
const p = new Date(t.zonedEnd.getTime() - (t.zonedEnd.getTime() - t.zonedStart.getTime()) / 2), y = i.formatDate(p, b), M = i.formatDate(p, C), T = m.toLanguageString(k, E[k]), N = m.toLanguageString(f, E[f]), z = /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("div", { className: "k-month" }, y), /* @__PURE__ */ e.createElement("div", { className: "k-link k-day", onClick: h }, M));
|
|
39
|
+
return /* @__PURE__ */ e.createElement(
|
|
40
|
+
w,
|
|
41
|
+
{
|
|
42
|
+
anchor: s,
|
|
43
|
+
show: r,
|
|
44
|
+
popoverClass: "k-scheduler-popover",
|
|
45
|
+
position: "right",
|
|
46
|
+
collision: { horizontal: "flip", vertical: "flip" },
|
|
47
|
+
callout: !0,
|
|
48
|
+
title: z,
|
|
49
|
+
style: { width: 220 },
|
|
50
|
+
onKeyDown: D,
|
|
51
|
+
animate: { type: "slide", direction: "right", openDuration: 500, closeDuration: 500 }
|
|
52
|
+
},
|
|
53
|
+
d.length > 0 ? /* @__PURE__ */ e.createElement("div", { className: "k-popover-events", role: "list", "aria-label": N }, d.map((n, a) => /* @__PURE__ */ e.createElement("div", { key: n.uid || a, className: "k-popover-event k-event", role: "listitem" }, /* @__PURE__ */ e.createElement("div", { className: "k-event-title" }, n.title || ""), /* @__PURE__ */ e.createElement("span", { className: "k-event-time" }, i.formatDate(n.zonedStart, R))))) : /* @__PURE__ */ e.createElement("span", { className: "k-no-data" }, T)
|
|
54
|
+
);
|
|
55
|
+
};
|
|
56
|
+
A.displayName = "KendoReactSchedulerMoreEventsPopover";
|
|
57
|
+
export {
|
|
58
|
+
A as MoreEventsPopover
|
|
59
|
+
};
|
|
@@ -51,6 +51,10 @@ export interface SchedulerFormProps extends Omit<FormProps, 'render' | 'onSubmit
|
|
|
51
51
|
* Fires when you click the `submit` button.
|
|
52
52
|
*/
|
|
53
53
|
onSubmit: (event: SchedulerFormStateChangeEvent<any>) => void;
|
|
54
|
+
/**
|
|
55
|
+
* Fires when you click the `delete` button.
|
|
56
|
+
*/
|
|
57
|
+
onDelete?: (event: SchedulerFormStateChangeEvent<any>) => void;
|
|
54
58
|
/**
|
|
55
59
|
* Overrides the component used for visualizing the `editor`.
|
|
56
60
|
* The [SchedulerFormEditor](https://www.telerik.com/kendo-react-ui/components/scheduler/api/schedulerformeditor) component is used, by default.
|
|
@@ -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 K=require("react"),U=require("react-dom"),J=require("@progress/kendo-react-common"),b=require("@progress/kendo-react-buttons"),Q=require("@progress/kendo-react-form"),I=require("@progress/kendo-react-dialogs"),W=require("@progress/kendo-react-intl"),X=require("../editors/SchedulerFormEditor.js"),Y=require("@progress/kendo-svg-icons"),t=require("../messages/index.js"),Z=require("../context/SchedulerContext.js");function y(r){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const s in r)if(s!=="default"){const l=Object.getOwnPropertyDescriptor(r,s);Object.defineProperty(c,s,l.get?l:{enumerable:!0,get:()=>r[s]})}}return c.default=r,Object.freeze(c)}const e=y(K),$=y(U),F=e.forwardRef((r,c)=>{const{onCancel:s,onClose:l,onSubmit:g,onDelete:u,editor:L,dialog:O=E.dialog,validator:M=E.validator,...B}=r,d=e.useRef(null);e.useImperativeHandle(d,()=>({props:r})),e.useImperativeHandle(c,()=>d.current);const o=W.useLocalization(),n=Z.useSchedulerFieldsContext(),f=!!(r.dataItem&&r.dataItem[n.id]),h=e.useMemo(()=>o.toLanguageString(t.editorValidationRequired,t.messages[t.editorValidationRequired]),[o]),k=e.useMemo(()=>o.toLanguageString(t.editorValidationEnd,t.messages[t.editorValidationEnd]),[o]),w=e.useMemo(()=>o.toLanguageString(t.editorSave,t.messages[t.editorSave]),[o]),T=e.useMemo(()=>o.toLanguageString(t.editorCancel,t.messages[t.editorCancel]),[o]),V=e.useMemo(()=>o.toLanguageString(t.editorDelete,t.messages[t.editorDelete]),[o]),D=e.useMemo(()=>o.toLanguageString(t.editorValidationStart,t.messages[t.editorValidationStart]),[o]),j=e.useMemo(()=>o.toLanguageString(t.editorNewEvent,t.messages[t.editorNewEvent]),[o]),_=e.useMemo(()=>o.toLanguageString(t.editorEditEvent,t.messages[t.editorEditEvent]),[o]),N=f?_:j,P=e.useCallback(a=>{s&&s({value:null,syntheticEvent:a,target:d.current})},[s]),x=e.useCallback(({syntheticEvent:a})=>{l&&l({value:null,syntheticEvent:a,target:d.current})},[l]),z=e.useCallback((a,i)=>{g&&g({value:a,syntheticEvent:i,target:d.current})},[g]),A=e.useCallback(a=>{u&&u({value:r.dataItem,syntheticEvent:a,target:d.current})},[u,r.dataItem]),q=e.useCallback((a,i)=>a&&i(n.end)&&a.getTime()>i(n.end).getTime()?D:void 0,[n,D]),R=e.useCallback((a,i)=>a&&i(n.start)&&a.getTime()<i(n.start).getTime()?k:void 0,[n,k]),m=e.useCallback(a=>a?void 0:h,[h]),H=e.useCallback((a,i)=>{const S={};S[n.start]=[m(i(n.start)),q(i(n.start),i)].filter(Boolean).reduce((v,C)=>v||C,""),S[n.end]=[m(i(n.start)),R(i(n.start),i)].filter(Boolean).reduce((v,C)=>v||C,"");const p=M(a,i);return{...S,...p}},[R,n.end,n.start,m,q,M]);return J.canUseDOM?$.createPortal(e.createElement(Q.Form,{initialValues:r.dataItem,onSubmit:z,validator:H,render:a=>e.createElement(O,{title:N,width:650,onClose:x},e.createElement(X.SchedulerFormEditor,{...a,as:L}),e.createElement(I.DialogActionsBar,{layout:"end"},f&&u&&e.createElement(b.Button,{fillMode:"flat",themeColor:"primary",svgIcon:Y.trashIcon,onClick:A},V),e.createElement(b.Button,{onClick:P},T),e.createElement(b.Button,{themeColor:"primary",disabled:!a.allowSubmit,onClick:a.onSubmit},w))),...B}),document&&document.body):null}),E={dialog:I.Dialog,validator:()=>({})};F.displayName="KendoReactSchedulerForm";exports.SchedulerForm=F;exports.schedulerFormDefaultProps=E;
|
|
@@ -6,135 +6,148 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import * as e from "react";
|
|
9
|
-
import * as
|
|
10
|
-
import { canUseDOM as
|
|
11
|
-
import { Button as
|
|
12
|
-
import { Form as
|
|
13
|
-
import { Dialog as
|
|
14
|
-
import { useLocalization as
|
|
15
|
-
import { SchedulerFormEditor as
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { useSchedulerFieldsContext as
|
|
19
|
-
const
|
|
9
|
+
import * as Y from "react-dom";
|
|
10
|
+
import { canUseDOM as Z } from "@progress/kendo-react-common";
|
|
11
|
+
import { Button as f } from "@progress/kendo-react-buttons";
|
|
12
|
+
import { Form as _ } from "@progress/kendo-react-form";
|
|
13
|
+
import { Dialog as $, DialogActionsBar as G } from "@progress/kendo-react-dialogs";
|
|
14
|
+
import { useLocalization as ee } from "@progress/kendo-react-intl";
|
|
15
|
+
import { SchedulerFormEditor as te } from "../editors/SchedulerFormEditor.mjs";
|
|
16
|
+
import { trashIcon as ae } from "@progress/kendo-svg-icons";
|
|
17
|
+
import { editorValidationRequired as I, messages as i, editorValidationEnd as L, editorSave as F, editorCancel as R, editorDelete as w, editorValidationStart as y, editorNewEvent as B, editorEditEvent as T } from "../messages/index.mjs";
|
|
18
|
+
import { useSchedulerFieldsContext as oe } from "../context/SchedulerContext.mjs";
|
|
19
|
+
const ne = e.forwardRef((r, V) => {
|
|
20
20
|
const {
|
|
21
|
-
onCancel:
|
|
21
|
+
onCancel: d,
|
|
22
22
|
onClose: c,
|
|
23
|
-
onSubmit:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
[
|
|
33
|
-
|
|
34
|
-
() => i.toLanguageString(E, n[E]),
|
|
35
|
-
[i]
|
|
36
|
-
), q = e.useMemo(
|
|
37
|
-
() => i.toLanguageString(I, n[I]),
|
|
38
|
-
[i]
|
|
39
|
-
), A = e.useMemo(
|
|
40
|
-
() => i.toLanguageString(L, n[L]),
|
|
41
|
-
[i]
|
|
42
|
-
), w = e.useMemo(
|
|
43
|
-
() => i.toLanguageString(D, n[D]),
|
|
44
|
-
[i]
|
|
23
|
+
onSubmit: m,
|
|
24
|
+
onDelete: s,
|
|
25
|
+
editor: q,
|
|
26
|
+
dialog: A = p.dialog,
|
|
27
|
+
validator: M = p.validator,
|
|
28
|
+
...x
|
|
29
|
+
} = r, l = e.useRef(null);
|
|
30
|
+
e.useImperativeHandle(l, () => ({ props: r })), e.useImperativeHandle(V, () => l.current);
|
|
31
|
+
const a = ee(), o = oe(), v = !!(r.dataItem && r.dataItem[o.id]), E = e.useMemo(
|
|
32
|
+
() => a.toLanguageString(I, i[I]),
|
|
33
|
+
[a]
|
|
45
34
|
), b = e.useMemo(
|
|
46
|
-
() =>
|
|
47
|
-
[
|
|
48
|
-
),
|
|
35
|
+
() => a.toLanguageString(L, i[L]),
|
|
36
|
+
[a]
|
|
37
|
+
), z = e.useMemo(
|
|
38
|
+
() => a.toLanguageString(F, i[F]),
|
|
39
|
+
[a]
|
|
40
|
+
), H = e.useMemo(
|
|
41
|
+
() => a.toLanguageString(R, i[R]),
|
|
42
|
+
[a]
|
|
43
|
+
), N = e.useMemo(
|
|
44
|
+
() => a.toLanguageString(w, i[w]),
|
|
45
|
+
[a]
|
|
46
|
+
), h = e.useMemo(
|
|
47
|
+
() => a.toLanguageString(y, i[y]),
|
|
48
|
+
[a]
|
|
49
|
+
), O = e.useMemo(
|
|
50
|
+
() => a.toLanguageString(B, i[B]),
|
|
51
|
+
[a]
|
|
52
|
+
), K = e.useMemo(
|
|
53
|
+
() => a.toLanguageString(T, i[T]),
|
|
54
|
+
[a]
|
|
55
|
+
), U = v ? K : O, j = e.useCallback(
|
|
49
56
|
(t) => {
|
|
50
|
-
|
|
57
|
+
d && d({
|
|
51
58
|
value: null,
|
|
52
59
|
syntheticEvent: t,
|
|
53
|
-
target:
|
|
60
|
+
target: l.current
|
|
54
61
|
});
|
|
55
62
|
},
|
|
56
|
-
[
|
|
57
|
-
),
|
|
63
|
+
[d]
|
|
64
|
+
), J = e.useCallback(
|
|
58
65
|
({ syntheticEvent: t }) => {
|
|
59
|
-
c && c
|
|
66
|
+
c && c({
|
|
60
67
|
value: null,
|
|
61
68
|
syntheticEvent: t,
|
|
62
|
-
target:
|
|
69
|
+
target: l.current
|
|
63
70
|
});
|
|
64
71
|
},
|
|
65
72
|
[c]
|
|
66
|
-
),
|
|
67
|
-
(t,
|
|
68
|
-
|
|
73
|
+
), P = e.useCallback(
|
|
74
|
+
(t, n) => {
|
|
75
|
+
m && m({
|
|
69
76
|
value: t,
|
|
70
|
-
syntheticEvent:
|
|
71
|
-
target:
|
|
77
|
+
syntheticEvent: n,
|
|
78
|
+
target: l.current
|
|
72
79
|
});
|
|
73
80
|
},
|
|
74
|
-
[
|
|
75
|
-
),
|
|
76
|
-
(t
|
|
81
|
+
[m]
|
|
82
|
+
), Q = e.useCallback(
|
|
83
|
+
(t) => {
|
|
84
|
+
s && s({
|
|
85
|
+
value: r.dataItem,
|
|
86
|
+
syntheticEvent: t,
|
|
87
|
+
target: l.current
|
|
88
|
+
});
|
|
89
|
+
},
|
|
90
|
+
[s, r.dataItem]
|
|
91
|
+
), k = e.useCallback(
|
|
92
|
+
(t, n) => t && n(o.end) && t.getTime() > n(o.end).getTime() ? h : void 0,
|
|
93
|
+
[o, h]
|
|
94
|
+
), D = e.useCallback(
|
|
95
|
+
(t, n) => t && n(o.start) && t.getTime() < n(o.start).getTime() ? b : void 0,
|
|
77
96
|
[o, b]
|
|
78
|
-
),
|
|
79
|
-
(t
|
|
80
|
-
[
|
|
81
|
-
),
|
|
82
|
-
(t) =>
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
].filter(Boolean).reduce((
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
].filter(Boolean).reduce((g, v) => g || v, "");
|
|
94
|
-
const O = S(t, a);
|
|
95
|
-
return { ...u, ...O };
|
|
97
|
+
), u = e.useCallback(
|
|
98
|
+
(t) => t ? void 0 : E,
|
|
99
|
+
[E]
|
|
100
|
+
), W = e.useCallback(
|
|
101
|
+
(t, n) => {
|
|
102
|
+
const g = {};
|
|
103
|
+
g[o.start] = [
|
|
104
|
+
u(n(o.start)),
|
|
105
|
+
k(n(o.start), n)
|
|
106
|
+
].filter(Boolean).reduce((C, S) => C || S, ""), g[o.end] = [
|
|
107
|
+
u(n(o.start)),
|
|
108
|
+
D(n(o.start), n)
|
|
109
|
+
].filter(Boolean).reduce((C, S) => C || S, "");
|
|
110
|
+
const X = M(t, n);
|
|
111
|
+
return { ...g, ...X };
|
|
96
112
|
},
|
|
97
|
-
[
|
|
113
|
+
[D, o.end, o.start, u, k, M]
|
|
98
114
|
);
|
|
99
|
-
return
|
|
115
|
+
return Z ? Y.createPortal(
|
|
100
116
|
/* @__PURE__ */ e.createElement(
|
|
101
|
-
|
|
117
|
+
_,
|
|
102
118
|
{
|
|
103
|
-
initialValues:
|
|
104
|
-
onSubmit:
|
|
105
|
-
validator:
|
|
106
|
-
render: (t) => /* @__PURE__ */ e.createElement(
|
|
107
|
-
|
|
119
|
+
initialValues: r.dataItem,
|
|
120
|
+
onSubmit: P,
|
|
121
|
+
validator: W,
|
|
122
|
+
render: (t) => /* @__PURE__ */ e.createElement(A, { title: U, width: 650, onClose: J }, /* @__PURE__ */ e.createElement(te, { ...t, as: q }), /* @__PURE__ */ e.createElement(G, { layout: "end" }, v && s && /* @__PURE__ */ e.createElement(
|
|
123
|
+
f,
|
|
124
|
+
{
|
|
125
|
+
fillMode: "flat",
|
|
126
|
+
themeColor: "primary",
|
|
127
|
+
svgIcon: ae,
|
|
128
|
+
onClick: Q
|
|
129
|
+
},
|
|
130
|
+
N
|
|
131
|
+
), /* @__PURE__ */ e.createElement(f, { onClick: j }, H), /* @__PURE__ */ e.createElement(
|
|
132
|
+
f,
|
|
108
133
|
{
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
className: "k-scheduler-edit-dialog"
|
|
134
|
+
themeColor: "primary",
|
|
135
|
+
disabled: !t.allowSubmit,
|
|
136
|
+
onClick: t.onSubmit
|
|
113
137
|
},
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
{
|
|
118
|
-
themeColor: "primary",
|
|
119
|
-
disabled: !t.allowSubmit,
|
|
120
|
-
onClick: t.onSubmit,
|
|
121
|
-
icon: "save",
|
|
122
|
-
svgIcon: X
|
|
123
|
-
},
|
|
124
|
-
q
|
|
125
|
-
), /* @__PURE__ */ e.createElement(p, { onClick: x, icon: "cancel", svgIcon: Y }, A))
|
|
126
|
-
),
|
|
127
|
-
...V
|
|
138
|
+
z
|
|
139
|
+
))),
|
|
140
|
+
...x
|
|
128
141
|
}
|
|
129
142
|
),
|
|
130
143
|
document && document.body
|
|
131
144
|
) : null;
|
|
132
|
-
}),
|
|
133
|
-
dialog:
|
|
145
|
+
}), p = {
|
|
146
|
+
dialog: $,
|
|
134
147
|
validator: () => ({})
|
|
135
148
|
};
|
|
136
|
-
|
|
149
|
+
ne.displayName = "KendoReactSchedulerForm";
|
|
137
150
|
export {
|
|
138
|
-
|
|
139
|
-
|
|
151
|
+
ne as SchedulerForm,
|
|
152
|
+
p as schedulerFormDefaultProps
|
|
140
153
|
};
|
|
@@ -29,6 +29,10 @@ export interface SchedulerRemoveDialogProps {
|
|
|
29
29
|
* Specifies the `DataItem` currently being deleted.
|
|
30
30
|
*/
|
|
31
31
|
dataItem: DataItem;
|
|
32
|
+
/**
|
|
33
|
+
* Indicates whether the delete action targets an entire series.
|
|
34
|
+
*/
|
|
35
|
+
isSeries?: boolean;
|
|
32
36
|
/**
|
|
33
37
|
* Fires when you click the `close` button.
|
|
34
38
|
*/
|
|
@@ -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 M=require("react"),O=require("react-dom"),g=require("@progress/kendo-react-dialogs"),q=require("@progress/kendo-react-intl"),e=require("../messages/index.js"),y=require("@progress/kendo-react-common"),d=require("@progress/kendo-react-buttons");function m(n){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const o in n)if(o!=="default"){const a=Object.getOwnPropertyDescriptor(n,o);Object.defineProperty(r,o,a.get?a:{enumerable:!0,get:()=>n[o]})}}return r.default=n,Object.freeze(r)}const t=m(M),L=m(O),f=t.forwardRef((n,r)=>{const{onClose:o,onCancel:a,onConfirm:s,isSeries:u}=n,c=t.useRef(null);t.useImperativeHandle(c,()=>({props:n})),t.useImperativeHandle(r,()=>c.current);const l=q.useLocalization(),C=l.toLanguageString(e.editorCancel,e.messages[e.editorCancel]),D=l.toLanguageString(e.editorDelete,e.messages[e.editorDelete]),S=u?l.toLanguageString(e.deleteSeriesConfirmation,e.messages[e.deleteSeriesConfirmation]):l.toLanguageString(e.deleteConfirmation,e.messages[e.deleteConfirmation]),v=u?l.toLanguageString(e.deleteSeriesDialogTitle,e.messages[e.deleteSeriesDialogTitle]):l.toLanguageString(e.deleteDialogTitle,e.messages[e.deleteDialogTitle]),R=t.useCallback(({syntheticEvent:i})=>{if(!o)return;const p={syntheticEvent:i,value:null,target:c.current};o.call(void 0,p)},[o]),b=t.useCallback(i=>{a&&a.call(void 0,{syntheticEvent:i,value:null})},[a]),k=t.useCallback(i=>{s&&s.call(void 0,{syntheticEvent:i,value:null})},[s]);return y.canUseDOM?L.createPortal(t.createElement(g.Dialog,{title:v,onClose:R},S,t.createElement(g.DialogActionsBar,null,t.createElement(d.Button,{onClick:b},C),t.createElement(d.Button,{onClick:k},D))),document&&document.body):null});f.displayName="KendoReactSchedulerRemoveDialog";exports.SchedulerRemoveDialog=f;
|
|
@@ -6,55 +6,55 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import * as e from "react";
|
|
9
|
-
import * as
|
|
10
|
-
import { Dialog as
|
|
11
|
-
import { useLocalization as
|
|
12
|
-
import { editorCancel as
|
|
13
|
-
import { canUseDOM as
|
|
14
|
-
import { Button as
|
|
15
|
-
const
|
|
16
|
-
(c,
|
|
17
|
-
const { onClose:
|
|
9
|
+
import * as E from "react-dom";
|
|
10
|
+
import { Dialog as T, DialogActionsBar as y } from "@progress/kendo-react-dialogs";
|
|
11
|
+
import { useLocalization as z } from "@progress/kendo-react-intl";
|
|
12
|
+
import { editorCancel as m, messages as o, editorDelete as u, deleteSeriesConfirmation as g, deleteConfirmation as d, deleteSeriesDialogTitle as f, deleteDialogTitle as C } from "../messages/index.mjs";
|
|
13
|
+
import { canUseDOM as B } from "@progress/kendo-react-common";
|
|
14
|
+
import { Button as v } from "@progress/kendo-react-buttons";
|
|
15
|
+
const H = e.forwardRef(
|
|
16
|
+
(c, S) => {
|
|
17
|
+
const { onClose: n, onCancel: l, onConfirm: r, isSeries: s } = c, i = e.useRef(null);
|
|
18
18
|
e.useImperativeHandle(i, () => ({ props: c })), e.useImperativeHandle(
|
|
19
|
-
|
|
19
|
+
S,
|
|
20
20
|
() => i.current
|
|
21
21
|
);
|
|
22
|
-
const t =
|
|
23
|
-
({ syntheticEvent:
|
|
24
|
-
if (!
|
|
22
|
+
const t = z(), D = t.toLanguageString(m, o[m]), p = t.toLanguageString(u, o[u]), L = s ? t.toLanguageString(g, o[g]) : t.toLanguageString(d, o[d]), R = s ? t.toLanguageString(f, o[f]) : t.toLanguageString(C, o[C]), M = e.useCallback(
|
|
23
|
+
({ syntheticEvent: a }) => {
|
|
24
|
+
if (!n)
|
|
25
25
|
return;
|
|
26
|
-
const
|
|
27
|
-
syntheticEvent:
|
|
26
|
+
const b = {
|
|
27
|
+
syntheticEvent: a,
|
|
28
28
|
value: null,
|
|
29
29
|
target: i.current
|
|
30
30
|
};
|
|
31
|
-
|
|
31
|
+
n.call(void 0, b);
|
|
32
32
|
},
|
|
33
|
-
[
|
|
34
|
-
),
|
|
35
|
-
(
|
|
36
|
-
|
|
37
|
-
syntheticEvent:
|
|
33
|
+
[n]
|
|
34
|
+
), h = e.useCallback(
|
|
35
|
+
(a) => {
|
|
36
|
+
l && l.call(void 0, {
|
|
37
|
+
syntheticEvent: a,
|
|
38
38
|
value: null
|
|
39
39
|
});
|
|
40
40
|
},
|
|
41
|
-
[
|
|
42
|
-
),
|
|
43
|
-
(
|
|
41
|
+
[l]
|
|
42
|
+
), k = e.useCallback(
|
|
43
|
+
(a) => {
|
|
44
44
|
r && r.call(void 0, {
|
|
45
|
-
syntheticEvent:
|
|
45
|
+
syntheticEvent: a,
|
|
46
46
|
value: null
|
|
47
47
|
});
|
|
48
48
|
},
|
|
49
49
|
[r]
|
|
50
50
|
);
|
|
51
|
-
return
|
|
52
|
-
/* @__PURE__ */ e.createElement(
|
|
51
|
+
return B ? E.createPortal(
|
|
52
|
+
/* @__PURE__ */ e.createElement(T, { title: R, onClose: M }, L, /* @__PURE__ */ e.createElement(y, null, /* @__PURE__ */ e.createElement(v, { onClick: h }, D), /* @__PURE__ */ e.createElement(v, { onClick: k }, p))),
|
|
53
53
|
document && document.body
|
|
54
54
|
) : null;
|
|
55
55
|
}
|
|
56
56
|
);
|
|
57
|
-
|
|
57
|
+
H.displayName = "KendoReactSchedulerRemoveDialog";
|
|
58
58
|
export {
|
|
59
|
-
|
|
59
|
+
H as SchedulerRemoveDialog
|
|
60
60
|
};
|
|
@@ -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 f=require("react"),g=require("@progress/kendo-react-buttons"),k=require("@progress/kendo-react-intl"),l=require("../messages/index.js");function C(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const n=C(f),s=n.forwardRef((e,a)=>{const t=n.useRef(null),o=n.useRef(null),i=k.useLocalization();n.useImperativeHandle(t,()=>({element:o.current&&o.current.element,...e})),n.useImperativeHandle(a,()=>t.current);const d=n.useCallback(r=>{!e.onClick||!t.current||e.onClick.call(void 0,{target:t.current,syntheticEvent:r})},[t,e.slot,e.onClick]),m=n.useCallback(r=>{r.stopPropagation()},[]),b=n.useCallback(r=>{r.stopPropagation()},[]),c=i.toLanguageString(l.moreEvents,l.messages[l.moreEvents]),u=e.hiddenCount!==void 0?`${String(e.hiddenCount)} ${c}`:c;return n.createElement(g.Button,{ref:o,tabIndex:-1,size:"xs",fillMode:"flat",themeColor:"primary",className:"k-more-events",onClick:d,onDoubleClick:b,onFocus:m,"aria-label":u},u)});s.displayName="KendoReactSchedulerShowMoreItemsButton";exports.ShowMoreItemsButton=s;
|