@progress/kendo-react-scheduler 16.3.0 → 16.4.0-develop.2

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.
Files changed (87) hide show
  1. package/Scheduler.d.ts +46 -0
  2. package/Scheduler.js +1 -1
  3. package/Scheduler.mjs +322 -297
  4. package/components/EventOverviewPopover.d.ts +36 -0
  5. package/components/EventOverviewPopover.js +8 -0
  6. package/components/EventOverviewPopover.mjs +137 -0
  7. package/components/MoreEventsPopover.js +1 -1
  8. package/components/MoreEventsPopover.mjs +42 -40
  9. package/components/SchedulerForm.js +1 -1
  10. package/components/SchedulerForm.mjs +137 -104
  11. package/components/SchedulerQuickCreateForm.d.ts +63 -0
  12. package/components/SchedulerQuickCreateForm.js +8 -0
  13. package/components/SchedulerQuickCreateForm.mjs +148 -0
  14. package/components/ShowMoreItemsButton.js +1 -1
  15. package/components/ShowMoreItemsButton.mjs +1 -1
  16. package/dist/cdn/js/kendo-react-scheduler.js +1 -1
  17. package/editors/DiscardChangesDialog.d.ts +17 -0
  18. package/editors/DiscardChangesDialog.js +8 -0
  19. package/editors/DiscardChangesDialog.mjs +34 -0
  20. package/editors/KeepResetCustomEventsDialog.d.ts +19 -0
  21. package/editors/KeepResetCustomEventsDialog.js +8 -0
  22. package/editors/KeepResetCustomEventsDialog.mjs +34 -0
  23. package/editors/SchedulerFormEditor.d.ts +18 -4
  24. package/editors/SchedulerFormEditor.js +1 -1
  25. package/editors/SchedulerFormEditor.mjs +273 -238
  26. package/editors/SchedulerRecurrenceDialog.js +1 -1
  27. package/editors/SchedulerRecurrenceDialog.mjs +142 -135
  28. package/editors/ZonedSplitDateTime.d.ts +30 -0
  29. package/editors/ZonedSplitDateTime.js +1 -1
  30. package/editors/ZonedSplitDateTime.mjs +58 -47
  31. package/hooks/index.d.ts +4 -0
  32. package/hooks/useCloseOnAnchorScrollOut.d.ts +18 -0
  33. package/hooks/useCloseOnAnchorScrollOut.js +8 -0
  34. package/hooks/useCloseOnAnchorScrollOut.mjs +51 -0
  35. package/hooks/useDeferredClick.d.ts +26 -0
  36. package/hooks/useDeferredClick.js +8 -0
  37. package/hooks/useDeferredClick.mjs +24 -0
  38. package/hooks/useEventOverviewPlacement.d.ts +23 -0
  39. package/hooks/useEventOverviewPlacement.js +8 -0
  40. package/hooks/useEventOverviewPlacement.mjs +14 -0
  41. package/hooks/useQuickCreatePlacement.d.ts +26 -0
  42. package/hooks/useQuickCreatePlacement.js +8 -0
  43. package/hooks/useQuickCreatePlacement.mjs +28 -0
  44. package/index.d.mts +4 -1
  45. package/index.d.ts +4 -1
  46. package/index.js +1 -1
  47. package/index.mjs +123 -116
  48. package/items/SchedulerEditItem.js +1 -1
  49. package/items/SchedulerEditItem.mjs +600 -509
  50. package/items/SchedulerItem.d.ts +2 -0
  51. package/items/SchedulerItem.js +1 -1
  52. package/items/SchedulerItem.mjs +137 -130
  53. package/items/SchedulerProportionalViewItem.js +1 -1
  54. package/items/SchedulerProportionalViewItem.mjs +95 -91
  55. package/items/SchedulerViewItem.js +1 -1
  56. package/items/SchedulerViewItem.mjs +168 -157
  57. package/items/hooks/use-drag-item.js +1 -1
  58. package/items/hooks/use-drag-item.mjs +46 -45
  59. package/items/hooks/use-resize-item.d.ts +1 -0
  60. package/items/hooks/use-resize-item.js +1 -1
  61. package/items/hooks/use-resize-item.mjs +84 -78
  62. package/messages/index.d.ts +45 -0
  63. package/messages/index.js +1 -1
  64. package/messages/index.mjs +174 -144
  65. package/package-metadata.js +1 -1
  66. package/package-metadata.mjs +2 -2
  67. package/package.json +12 -12
  68. package/recurrence/RecurrenceEditor.js +1 -1
  69. package/recurrence/RecurrenceEditor.mjs +64 -64
  70. package/recurrence/common.d.ts +10 -0
  71. package/recurrence/common.js +1 -1
  72. package/recurrence/common.mjs +48 -44
  73. package/services/itemsService.d.ts +5 -2
  74. package/services/itemsService.js +1 -1
  75. package/services/itemsService.mjs +36 -36
  76. package/slots/SchedulerEditSlot.d.ts +15 -0
  77. package/slots/SchedulerEditSlot.js +1 -1
  78. package/slots/SchedulerEditSlot.mjs +162 -92
  79. package/utils/index.d.ts +2 -0
  80. package/utils/index.js +1 -1
  81. package/utils/index.mjs +103 -99
  82. package/views/common/SchedulerDrag.js +1 -1
  83. package/views/common/SchedulerDrag.mjs +26 -23
  84. package/views/common/SchedulerResize.js +1 -1
  85. package/views/common/SchedulerResize.mjs +29 -26
  86. package/views/day/MultiDayView.js +1 -1
  87. package/views/day/MultiDayView.mjs +160 -152
@@ -0,0 +1,17 @@
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 React from 'react';
9
+ /** @hidden */
10
+ export interface DiscardChangesDialogProps {
11
+ /** Fires when the user confirms discarding the unsaved changes. */
12
+ onDiscard: () => void;
13
+ /** Fires when the user cancels and returns to editing. */
14
+ onCancel: () => void;
15
+ }
16
+ /** @hidden */
17
+ export declare const DiscardChangesDialog: React.FC<DiscardChangesDialogProps>;
@@ -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 f=require("react"),h=require("react-dom"),p=require("@progress/kendo-react-common"),i=require("@progress/kendo-react-buttons"),c=require("@progress/kendo-react-dialogs"),b=require("@progress/kendo-react-intl"),e=require("../messages/index.js");function r(t){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const n=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(s,a,n.get?n:{enumerable:!0,get:()=>t[a]})}}return s.default=t,Object.freeze(s)}const o=r(f),y=r(h),l=t=>{const{onDiscard:s,onCancel:a}=t,n=b.useLocalization(),g=o.useId(),d=n.toLanguageString(e.editorDiscardChangesDialogTitle,e.messages[e.editorDiscardChangesDialogTitle]),u=n.toLanguageString(e.editorDiscardChangesConfirmation,e.messages[e.editorDiscardChangesConfirmation]),D=n.toLanguageString(e.editorDiscardChangesDiscard,e.messages[e.editorDiscardChangesDiscard]),m=n.toLanguageString(e.editorDiscardChangesCancel,e.messages[e.editorDiscardChangesCancel]),C=o.createElement(c.Dialog,{title:d,onClose:a,width:410,id:g},o.createElement("p",null,u),o.createElement(c.DialogActionsBar,{layout:"end"},o.createElement(i.Button,{onClick:a},m),o.createElement(i.Button,{themeColor:"primary",onClick:s},D)));return p.canUseDOM?y.createPortal(C,document.body):null};l.displayName="KendoReactDiscardChangesDialog";exports.DiscardChangesDialog=l;
@@ -0,0 +1,34 @@
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 * as f from "react-dom";
10
+ import { canUseDOM as h } from "@progress/kendo-react-common";
11
+ import { Button as n } from "@progress/kendo-react-buttons";
12
+ import { Dialog as M, DialogActionsBar as E } from "@progress/kendo-react-dialogs";
13
+ import { useLocalization as L } from "@progress/kendo-react-intl";
14
+ import { editorDiscardChangesDialogTitle as i, messages as t, editorDiscardChangesConfirmation as r, editorDiscardChangesDiscard as s, editorDiscardChangesCancel as c } from "../messages/index.mjs";
15
+ const y = (l) => {
16
+ const { onDiscard: g, onCancel: a } = l, o = L(), m = e.useId(), d = o.toLanguageString(
17
+ i,
18
+ t[i]
19
+ ), D = o.toLanguageString(
20
+ r,
21
+ t[r]
22
+ ), C = o.toLanguageString(
23
+ s,
24
+ t[s]
25
+ ), u = o.toLanguageString(
26
+ c,
27
+ t[c]
28
+ ), p = /* @__PURE__ */ e.createElement(M, { title: d, onClose: a, width: 410, id: m }, /* @__PURE__ */ e.createElement("p", null, D), /* @__PURE__ */ e.createElement(E, { layout: "end" }, /* @__PURE__ */ e.createElement(n, { onClick: a }, u), /* @__PURE__ */ e.createElement(n, { themeColor: "primary", onClick: g }, C)));
29
+ return h ? f.createPortal(p, document.body) : null;
30
+ };
31
+ y.displayName = "KendoReactDiscardChangesDialog";
32
+ export {
33
+ y as DiscardChangesDialog
34
+ };
@@ -0,0 +1,19 @@
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 React from 'react';
9
+ /** @hidden */
10
+ export interface KeepResetCustomEventsDialogProps {
11
+ /** Fires when the user chooses to keep the custom events (exceptions). */
12
+ onKeep: () => void;
13
+ /** Fires when the user chooses to reset the custom events (delete exceptions). */
14
+ onReset: () => void;
15
+ /** Fires when the user cancels and returns to editing. */
16
+ onCancel: () => void;
17
+ }
18
+ /** @hidden */
19
+ export declare const KeepResetCustomEventsDialog: React.FC<KeepResetCustomEventsDialogProps>;
@@ -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 f=require("react"),v=require("react-dom"),R=require("@progress/kendo-react-common"),a=require("@progress/kendo-react-buttons"),u=require("@progress/kendo-react-dialogs"),D=require("@progress/kendo-react-intl"),e=require("../messages/index.js");function l(t){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const r=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(s,o,r.get?r:{enumerable:!0,get:()=>t[o]})}}return s.default=t,Object.freeze(s)}const n=l(f),M=l(v),i=t=>{const{onKeep:s,onReset:o,onCancel:r}=t,c=D.useLocalization(),g=c.toLanguageString(e.recurrenceCustomEventsDialogTitle,e.messages[e.recurrenceCustomEventsDialogTitle]),m=c.toLanguageString(e.recurrenceCustomEventsConfirmation,e.messages[e.recurrenceCustomEventsConfirmation]),C=c.toLanguageString(e.recurrenceCustomEventsKeep,e.messages[e.recurrenceCustomEventsKeep]),p=c.toLanguageString(e.recurrenceCustomEventsReset,e.messages[e.recurrenceCustomEventsReset]),E=c.toLanguageString(e.recurrenceCustomEventsCancel,e.messages[e.recurrenceCustomEventsCancel]),d=n.createElement(u.Dialog,{title:g,onClose:r,width:510},n.createElement("p",null,m),n.createElement(u.DialogActionsBar,{layout:"start"},n.createElement(a.Button,{fillMode:"flat",onClick:r},E),n.createElement("span",{className:"k-spacer"}),n.createElement(a.Button,{onClick:o},p),n.createElement(a.Button,{themeColor:"primary",onClick:s},C)));return R.canUseDOM?M.createPortal(d,document.body):null};i.displayName="KendoReactKeepResetCustomEventsDialog";exports.KeepResetCustomEventsDialog=i;
@@ -0,0 +1,34 @@
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 * as v from "react-dom";
10
+ import { canUseDOM as D } from "@progress/kendo-react-common";
11
+ import { Button as n } from "@progress/kendo-react-buttons";
12
+ import { Dialog as R, DialogActionsBar as L } from "@progress/kendo-react-dialogs";
13
+ import { useLocalization as k } from "@progress/kendo-react-intl";
14
+ import { recurrenceCustomEventsDialogTitle as r, messages as o, recurrenceCustomEventsConfirmation as s, recurrenceCustomEventsKeep as c, recurrenceCustomEventsReset as l, recurrenceCustomEventsCancel as i } from "../messages/index.mjs";
15
+ const K = (m) => {
16
+ const { onKeep: g, onReset: u, onCancel: a } = m, t = k(), p = t.toLanguageString(
17
+ r,
18
+ o[r]
19
+ ), C = t.toLanguageString(
20
+ s,
21
+ o[s]
22
+ ), E = t.toLanguageString(c, o[c]), f = t.toLanguageString(
23
+ l,
24
+ o[l]
25
+ ), M = t.toLanguageString(
26
+ i,
27
+ o[i]
28
+ ), d = /* @__PURE__ */ e.createElement(R, { title: p, onClose: a, width: 510 }, /* @__PURE__ */ e.createElement("p", null, C), /* @__PURE__ */ e.createElement(L, { layout: "start" }, /* @__PURE__ */ e.createElement(n, { fillMode: "flat", onClick: a }, M), /* @__PURE__ */ e.createElement("span", { className: "k-spacer" }), /* @__PURE__ */ e.createElement(n, { onClick: u }, f), /* @__PURE__ */ e.createElement(n, { themeColor: "primary", onClick: g }, E)));
29
+ return D ? v.createPortal(d, document.body) : null;
30
+ };
31
+ K.displayName = "KendoReactKeepResetCustomEventsDialog";
32
+ export {
33
+ K as KeepResetCustomEventsDialog
34
+ };
@@ -23,6 +23,10 @@ type TargetlessChangeEvent<E extends {
23
23
  };
24
24
  /**
25
25
  * Represents the props passed to the [`recurrenceButtonTextTemplate`](https://www.telerik.com/kendo-react-ui/components/scheduler/api/schedulerformeditorprops#toc-recurrenceButtonTextTemplate) component.
26
+ *
27
+ * @deprecated Since v17.0.0. The recurrence button no longer supports content overrides. Kept for
28
+ * source compatibility; the shape may be removed in a future major release. Migrate to
29
+ * [`recurrenceSummaryTemplate`](https://www.telerik.com/kendo-react-ui/components/scheduler/api/schedulerformeditorprops#toc-recurrenceSummaryTemplate) for summary customization.
26
30
  */
27
31
  export interface RecurrenceButtonTextTemplateProps {
28
32
  /**
@@ -157,14 +161,24 @@ export interface SchedulerFormEditorProps extends Omit<FormElementProps, 'childr
157
161
  */
158
162
  resourceEditor?: React.ComponentType<TargetlessChangeEvent<(MultiSelectProps | DropDownListProps) & FieldProps, any>>;
159
163
  /**
160
- * Overrides the content rendered inside the "Make recurring" button in the event edit form.
164
+ * Overrides the content rendered inside the recurrence button in the event edit form.
165
+ *
166
+ * @deprecated Since v17.0.0. The recurrence button now uses the static localized labels
167
+ * `Make recurring` / `Edit recurrence` (see `scheduler.editorMakeRecurring` and
168
+ * `scheduler.editorEditRecurrence` in the messages). This template is ignored and no longer
169
+ * controls the button content. Use
170
+ * [`recurrenceSummaryTemplate`](https://www.telerik.com/kendo-react-ui/components/scheduler/api/schedulerformeditorprops#toc-recurrenceSummaryTemplate)
171
+ * to customize the recurrence summary rendered below the button and inside the recurrence dialog.
161
172
  *
162
- * Receives the current `recurrenceRule` (RRULE string or `null` when no recurrence is set).
163
- * The developer controls the entire button content for both states.
173
+ * @remarks
174
+ * This property is retained for source compatibility only and is scheduled for removal in a
175
+ * future major release. A codemod will be provided.
164
176
  */
165
177
  recurrenceButtonTextTemplate?: React.ComponentType<RecurrenceButtonTextTemplateProps>;
166
178
  /**
167
- * Overrides the recurrence summary hint displayed inside the recurrence editor dialog.
179
+ * Overrides the recurrence summary rendered:
180
+ * 1. below the recurrence button inside the Create / Edit Event dialog; and
181
+ * 2. inside the recurrence editor dialog.
168
182
  *
169
183
  * Receives the current `recurrenceRule` (RRULE string) and should render the desired summary.
170
184
  * This template is only used when a recurrence rule exists.
@@ -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 ze=require("react"),De=require("@progress/kendo-date-math"),pe=require("@progress/kendo-recurrence"),k=require("@progress/kendo-react-labels"),H=require("@progress/kendo-react-intl"),l=require("@progress/kendo-react-form"),w=require("@progress/kendo-react-inputs"),b=require("@progress/kendo-react-buttons"),L=require("@progress/kendo-react-common"),v=require("@progress/kendo-svg-icons"),t=require("../messages/index.js"),Y=require("./TimezoneDropDownList.js"),Ce=require("../recurrence/RecurrenceEditor.js"),ye=require("./ResourceEditor.js"),G=require("./ZonedSplitDateTime.js"),K=require("@progress/kendo-react-dialogs"),Fe=require("./SchedulerRecurrenceDialog.js"),Ne=require("./RemoveRecurrenceConfirmDialog.js"),Q=require("../hooks/useRecurrenceSummary.js"),J=require("../context/SchedulerContext.js");function Ie(a){const d=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const c in a)if(c!=="default"){const T=Object.getOwnPropertyDescriptor(a,c);Object.defineProperty(d,c,T.get?T:{enumerable:!0,get:()=>a[c]})}}return d.default=a,Object.freeze(d)}const e=Ie(ze),U=e.forwardRef((a,d)=>{const c=e.useRef(null),T=e.useRef(null),C=De.timezoneNames(),n=H.useLocalization(),S=H.useInternationalization(),r=J.useSchedulerFieldsContext(),{resources:x,timezone:u}=J.useSchedulerPropsContext();e.useImperativeHandle(T,()=>{var o;return{element:(o=c.current)!=null&&o.element?c.current.element:c.current,props:a}}),e.useImperativeHandle(d,()=>T.current);const{as:z=i.as,...y}=a,{onChange:m,valueGetter:g}=a,{titleEditor:$=i.titleEditor,startEditor:A=i.startEditor,endEditor:q=i.endEditor,startTimezoneEditor:ee=i.startTimezoneEditor,endTimezoneEditor:te=i.endTimezoneEditor,startLabel:re=i.startLabel,endLabel:M=i.endLabel,allDayEditor:ne=i.allDayEditor,allDayLabel:ae=i.allDayLabel,recurrenceEditor:oe,descriptionEditor:le=i.descriptionEditor,resourceEditor:ie=i.resourceEditor}=a,h=e.useMemo(()=>g(r.start)||new Date,[g,r.start]),R=g(r.isAllDay)||!1,E=g(r.startTimezone)||u||"",s=g(r.recurrenceRule),B=g(r.recurrenceId),ce=!(B!=null),_=e.useMemo(()=>n.toLanguageString(t.editorEventAllDay,t.messages[t.editorEventAllDay]),[n]),[f,O]=e.useState(!!g(r.startTimezone)),[se,F]=e.useState(!1),[me,D]=e.useState(!1),[de,N]=e.useState(!1),Z=a.recurrenceButtonTextTemplate,ue=a.recurrenceSummaryTemplate,I=e.useMemo(()=>n.toLanguageString(t.editorMakeRecurring,t.messages[t.editorMakeRecurring]),[n]),ge=e.useMemo(()=>s&&Q.getRecurrenceSummary(s,h,S,n)||I,[s,h,S,n,I]),Ee=e.useMemo(()=>s?Q.getRecurrenceSummary(s,h,S,n):null,[s,h,S,n]),fe=e.useMemo(()=>s?pe.parseRule({recurrenceRule:s}):null,[s]),P=e.useRef(E);e.useEffect(()=>{f&&E&&E!==P.current&&m(r.endTimezone,{value:E}),P.current=E},[E,f,m,r.endTimezone]);const j=e.useCallback(o=>{o.preventDefault(),f?F(!0):O(!0)},[f]),Te=e.useCallback(()=>{m(r.startTimezone,{value:null}),m(r.endTimezone,{value:null}),O(!1),F(!1)},[m,r.startTimezone,r.endTimezone]),W=e.useCallback(()=>{F(!1)},[]),ve=e.useCallback(()=>{D(!0)},[]),Se=e.useCallback(o=>{m(r.recurrenceRule,{value:o}),D(!1)},[m,r.recurrenceRule]),he=e.useCallback(()=>{D(!1)},[]),Re=e.useCallback(()=>{N(!0)},[]),be=e.useCallback(()=>{m(r.recurrenceRule,{value:null}),m(r.recurrenceExceptions,{value:null}),N(!1),D(!1)},[m,r.recurrenceRule,r.recurrenceExceptions]),Le=e.useCallback(()=>{N(!1)},[]),ke=e.useMemo(()=>L.classNames("k-scheduler-edit-form",a.className),[a.className]);return e.createElement(e.Fragment,null,e.createElement(z,{ref:z===i.as?c:void 0,horizontal:!0,...y,className:ke},e.createElement(e.Fragment,null,e.createElement(l.FieldWrapper,null,e.createElement(k.Label,{className:"k-form-label"},e.createElement(L.SvgIcon,{icon:v.rightDoubleQuotesIcon,size:"xlarge"})),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(l.Field,{id:"k-scheduler-editor-title",name:r.title,field:r.title,component:$,placeholder:n.toLanguageString(t.editorEventTitle,t.messages[t.editorEventTitle]),"aria-label":n.toLanguageString(t.editorEventTitle,t.messages[t.editorEventTitle])}))),e.createElement(l.FieldWrapper,null,e.createElement(k.Label,{className:"k-form-label"},e.createElement(L.SvgIcon,{icon:v.clockIcon,size:"xlarge"})),e.createElement("div",{className:"k-form-field-wrap"},e.createElement("div",{className:"k-scheduler-datetime-section"},e.createElement("div",{className:"k-scheduler-edit-form-row"},e.createElement(l.Field,{id:"k-is-allday-switch",name:r.isAllDay,component:ne,onLabel:"",offLabel:"",ariaLabel:_}),e.createElement(l.Field,{name:r.isAllDay,field:r.isAllDay,editorId:"k-is-allday-switch",component:ae},_)),e.createElement("div",{className:"k-scheduler-datetime-grid"},R?e.createElement("div",{className:"k-scheduler-edit-form-row"},e.createElement(l.Field,{name:r.start,component:A,isAllDay:R,fieldError:a.errors[r.start],ariaLabel:n.toLanguageString(t.editorEventStart,t.messages[t.editorEventStart]),timezone:u}),e.createElement(l.Field,{name:r.end,component:M,editorId:"k-scheduler-editor-end",className:"k-scheduler-datetime-label"},n.toLanguageString(t.editorDateConnectorTo,t.messages[t.editorDateConnectorTo])),e.createElement(l.Field,{name:r.end,component:q,isAllDay:R,dateId:"k-scheduler-editor-end",fieldError:a.errors[r.end],ariaLabel:n.toLanguageString(t.editorEventEnd,t.messages[t.editorEventEnd]),timezone:u})):e.createElement(e.Fragment,null,e.createElement("div",{className:"k-scheduler-edit-form-row"},e.createElement(l.Field,{name:r.start,component:A,isAllDay:R,timeId:"k-scheduler-editor-start-time",connectorElement:e.createElement(l.Field,{name:r.start,component:re,editorId:"k-scheduler-editor-start-time",className:"k-scheduler-datetime-label"},n.toLanguageString(t.editorDateConnectorFrom,t.messages[t.editorDateConnectorFrom])),fieldError:a.errors[r.start],ariaLabel:n.toLanguageString(t.editorEventStart,t.messages[t.editorEventStart]),timeAriaLabel:n.toLanguageString(t.editorStartTimeAriaLabel,t.messages[t.editorStartTimeAriaLabel]),timezone:u})),!f&&e.createElement(b.Button,{className:"k-col-span-2",fillMode:"flat",themeColor:"primary",title:n.toLanguageString(t.editorSetTimezoneTitle,t.messages[t.editorSetTimezoneTitle]),onClick:j,svgIcon:v.globeIcon},n.toLanguageString(t.editorTimezoneButton,t.messages[t.editorTimezoneButton])),f&&e.createElement(e.Fragment,null,e.createElement(l.Field,{name:r.startTimezone,component:ee,data:C,value:E,ariaLabel:n.toLanguageString(t.editorEventStartTimeZone,t.messages[t.editorEventStartTimeZone])}),e.createElement(b.Button,{title:n.toLanguageString(t.editorResetTimezoneTitle,t.messages[t.editorResetTimezoneTitle]),"aria-label":n.toLanguageString(t.editorResetTimezoneAriaLabel,t.messages[t.editorResetTimezoneAriaLabel]),onClick:j,svgIcon:v.globeIcon,fillMode:"flat",themeColor:"primary"})),e.createElement("div",{className:"k-scheduler-edit-form-row"},e.createElement(l.Field,{name:r.end,component:q,isAllDay:R,timeId:"k-scheduler-editor-end-time",connectorElement:e.createElement(l.Field,{name:r.end,component:M,editorId:"k-scheduler-editor-end-time",className:"k-scheduler-datetime-label"},n.toLanguageString(t.editorDateConnectorTo,t.messages[t.editorDateConnectorTo])),fieldError:a.errors[r.end],ariaLabel:n.toLanguageString(t.editorEventEnd,t.messages[t.editorEventEnd]),timeAriaLabel:n.toLanguageString(t.editorEndTimeAriaLabel,t.messages[t.editorEndTimeAriaLabel]),timezone:u})),f&&e.createElement(l.Field,{name:r.endTimezone,component:te,data:C,value:g(r.endTimezone)||u||"",ariaLabel:n.toLanguageString(t.editorEventEndTimeZone,t.messages[t.editorEventEndTimeZone])}))),ce&&e.createElement("div",{className:"k-scheduler-edit-form-row"},e.createElement(b.Button,{className:"k-scheduler-recurrence-button",type:"button",fillMode:"flat",themeColor:"primary",svgIcon:v.arrowRotateCwIcon,onClick:ve},Z?e.createElement(Z,{recurrenceRule:s,text:Ee,parsedRule:fe}):ge))))),e.createElement(l.FieldWrapper,null,e.createElement(k.Label,{className:"k-form-label"},e.createElement(L.SvgIcon,{icon:v.commentIcon,size:"xlarge"})),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(l.Field,{component:le,name:r.description,id:"k-event-description",resizable:"vertical",placeholder:n.toLanguageString(t.editorEventDescription,t.messages[t.editorEventDescription]),"aria-label":n.toLanguageString(t.editorEventDescription,t.messages[t.editorEventDescription])}))),(x||[]).map(o=>e.createElement(l.FieldWrapper,{key:o.field},o.svgIcon&&e.createElement(k.Label,{className:"k-form-label"},e.createElement(L.SvgIcon,{icon:o.svgIcon,size:"xlarge"})),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(l.Field,{name:o.field,component:ie,resource:o,multiple:o.multiple,data:o.data,textField:o.textField,valueField:o.valueField,colorField:o.colorField,ariaLabel:o.name||o.field})))))),me&&e.createElement(Fe.SchedulerRecurrenceDialog,{value:s,start:h,timezone:u||"",onSave:Se,onCancel:he,onRemoveRecurrence:Re,recurrenceSummaryTemplate:ue,recurrenceEditor:oe}),de&&e.createElement(Ne.RemoveRecurrenceConfirmDialog,{onConfirm:be,onCancel:Le}),se&&e.createElement(K.Dialog,{title:n.toLanguageString(t.resetTimezoneDialogTitle,t.messages[t.resetTimezoneDialogTitle]),onClose:W},n.toLanguageString(t.resetTimezoneConfirmation,t.messages[t.resetTimezoneConfirmation]),e.createElement(K.DialogActionsBar,null,e.createElement(b.Button,{onClick:W},n.toLanguageString(t.resetTimezoneNo,t.messages[t.resetTimezoneNo])),e.createElement(b.Button,{themeColor:"primary",onClick:Te},n.toLanguageString(t.resetTimezoneYes,t.messages[t.resetTimezoneYes])))))});U.displayName="KendoReactSchedulerFormEditor";const V=e.forwardRef((a,d)=>e.createElement(l.FormElement,{ref:d,id:a.id,style:a.style,tabIndex:a.tabIndex,className:a.className,horizontal:a.horizontal,children:a.children}));V.displayName="SchedulerFormEditorDefaultElement";const X=a=>{const{value:d,onChange:c,valid:T,visited:C,touched:n,modified:S,name:r,validationMessage:x,...u}=a,z=e.useCallback(y=>{c&&c({value:y.value})},[c]);return e.createElement(w.Switch,{...u,checked:d||!1,onChange:z})};X.displayName="SwitchFieldAdapter";const p=a=>e.createElement(k.Label,{...a,style:{marginBottom:0,...a.style}});p.displayName="DefaultLabel";const i={as:V,titleEditor:w.Input,startEditor:G.ZonedSplitDateTime,endEditor:G.ZonedSplitDateTime,startTimezoneEditor:Y.TimezoneDropDownList,endTimezoneEditor:Y.TimezoneDropDownList,startLabel:p,endLabel:p,allDayEditor:X,allDayLabel:p,recurrenceEditor:Ce.RecurrenceEditor,descriptionEditor:w.TextArea,resourceEditor:ye.ResourceEditor};exports.SchedulerFormEditor=U;exports.schedulerFormEditorDefaultProps=i;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ie=require("react"),we=require("@progress/kendo-date-math"),Ae=require("@progress/kendo-recurrence"),L=require("@progress/kendo-react-labels"),V=require("@progress/kendo-react-intl"),l=require("@progress/kendo-react-form"),A=require("@progress/kendo-react-inputs"),R=require("@progress/kendo-react-buttons"),k=require("@progress/kendo-react-common"),S=require("@progress/kendo-svg-icons"),t=require("../messages/index.js"),X=require("./TimezoneDropDownList.js"),qe=require("../recurrence/RecurrenceEditor.js"),xe=require("./ResourceEditor.js"),$=require("./ZonedSplitDateTime.js"),ee=require("@progress/kendo-react-dialogs"),Me=require("./SchedulerRecurrenceDialog.js"),Be=require("./RemoveRecurrenceConfirmDialog.js"),_e=require("../hooks/useRecurrenceSummary.js"),te=require("../context/SchedulerContext.js");function Oe(a){const m=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const i in a)if(i!=="default"){const g=Object.getOwnPropertyDescriptor(a,i);Object.defineProperty(m,i,g.get?g:{enumerable:!0,get:()=>a[i]})}}return m.default=a,Object.freeze(m)}const e=Oe(Ie),re=e.forwardRef((a,m)=>{const i=e.useRef(null),g=e.useRef(null),T=we.timezoneNames(),n=V.useLocalization(),h=V.useInternationalization(),r=te.useSchedulerFieldsContext(),{resources:x,timezone:E}=te.useSchedulerPropsContext();e.useImperativeHandle(g,()=>{var o;return{element:(o=i.current)!=null&&o.element?i.current.element:i.current,props:a}}),e.useImperativeHandle(m,()=>g.current);const{as:D=c.as,...y}=a,{onChange:s,valueGetter:d}=a,{titleEditor:oe=c.titleEditor,startEditor:M=c.startEditor,endEditor:B=c.endEditor,startTimezoneEditor:le=c.startTimezoneEditor,endTimezoneEditor:ie=c.endTimezoneEditor,startLabel:ce=c.startLabel,endLabel:_=c.endLabel,allDayEditor:se=c.allDayEditor,allDayLabel:de=c.allDayLabel,recurrenceEditor:me,descriptionEditor:ue=c.descriptionEditor,resourceEditor:ge=c.resourceEditor}=a,F=e.useMemo(()=>d(r.start)||new Date,[d,r.start]),O=d(r.start)||null,b=d(r.isAllDay)||!1,f=d(r.startTimezone)||E||"",u=d(r.recurrenceRule),P=d(r.recurrenceId),Ee=!(P!=null),Z=e.useMemo(()=>n.toLanguageString(t.editorEventAllDay,t.messages[t.editorEventAllDay]),[n]),[v,j]=e.useState(!!d(r.startTimezone)),[fe,N]=e.useState(!1),[ve,z]=e.useState(!1),[Se,I]=e.useState(!1),w=a.recurrenceSummaryTemplate,Te=e.useMemo(()=>n.toLanguageString(t.editorMakeRecurring,t.messages[t.editorMakeRecurring]),[n]),he=e.useMemo(()=>n.toLanguageString(t.editorEditRecurrence,t.messages[t.editorEditRecurrence]),[n]),be=u?he:Te,C=e.useMemo(()=>u?_e.getRecurrenceSummary(u,F,h,n):null,[u,F,h,n]),W=e.useId(),H=e.useMemo(()=>u?Ae.parseRule({recurrenceRule:u}):null,[u]),Y=e.useRef(f);e.useEffect(()=>{v&&f&&f!==Y.current&&s(r.endTimezone,{value:f}),Y.current=f},[f,v,s,r.endTimezone]);const G=e.useCallback(o=>{o.preventDefault(),v?N(!0):j(!0)},[v]),Re=e.useCallback(()=>{s(r.startTimezone,{value:null}),s(r.endTimezone,{value:null}),j(!1),N(!1)},[s,r.startTimezone,r.endTimezone]),K=e.useCallback(()=>{N(!1)},[]),ke=e.useCallback(()=>{z(!0)},[]),Le=e.useCallback(o=>{s(r.recurrenceRule,{value:o}),z(!1)},[s,r.recurrenceRule]),De=e.useCallback(()=>{z(!1)},[]),ze=e.useCallback(()=>{I(!0)},[]),Ce=e.useCallback(()=>{s(r.recurrenceRule,{value:null}),s(r.recurrenceExceptions,{value:null}),I(!1),z(!1)},[s,r.recurrenceRule,r.recurrenceExceptions]),pe=e.useCallback(()=>{I(!1)},[]),Q=e.useCallback((o,Fe)=>{const J=d(r.start),U=d(r.end);if(Fe(o),o.value&&J&&U){const Ne=U.getTime()-J.getTime();s(r.end,{value:new Date(o.value.getTime()+Ne)})}},[d,s,r.start,r.end]),ye=e.useMemo(()=>k.classNames("k-scheduler-edit-form",a.className),[a.className]);return e.createElement(e.Fragment,null,e.createElement(D,{ref:D===c.as?i:void 0,horizontal:!0,...y,className:ye},e.createElement(e.Fragment,null,e.createElement(l.FieldWrapper,null,e.createElement(L.Label,{className:"k-form-label"},e.createElement(k.SvgIcon,{icon:S.rightDoubleQuotesIcon,size:"xlarge"})),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(l.Field,{id:"k-scheduler-editor-title",name:r.title,field:r.title,component:oe,placeholder:n.toLanguageString(t.editorEventTitle,t.messages[t.editorEventTitle]),"aria-label":n.toLanguageString(t.editorEventTitle,t.messages[t.editorEventTitle])}))),e.createElement(l.FieldWrapper,null,e.createElement(L.Label,{className:"k-form-label"},e.createElement(k.SvgIcon,{icon:S.clockIcon,size:"xlarge"})),e.createElement("div",{className:"k-form-field-wrap"},e.createElement("div",{className:"k-scheduler-datetime-section"},e.createElement("div",{className:"k-scheduler-edit-form-row"},e.createElement(l.Field,{id:"k-is-allday-switch",name:r.isAllDay,component:se,onLabel:"",offLabel:"",ariaLabel:Z}),e.createElement(l.Field,{name:r.isAllDay,field:r.isAllDay,editorId:"k-is-allday-switch",component:de},Z)),e.createElement("div",{className:"k-scheduler-datetime-grid"},b?e.createElement("div",{className:"k-scheduler-edit-form-row"},e.createElement(l.Field,{name:r.start,component:q,baseEditor:M,onStartChange:Q,isAllDay:b,fieldError:a.errors[r.start],ariaLabel:n.toLanguageString(t.editorEventStart,t.messages[t.editorEventStart]),timezone:E}),e.createElement(l.Field,{name:r.end,component:_,editorId:"k-scheduler-editor-end",className:"k-scheduler-datetime-label"},n.toLanguageString(t.editorDateConnectorTo,t.messages[t.editorDateConnectorTo])),e.createElement(l.Field,{name:r.end,component:B,isAllDay:b,dateId:"k-scheduler-editor-end",min:O,fieldError:a.errors[r.end],ariaLabel:n.toLanguageString(t.editorEventEnd,t.messages[t.editorEventEnd]),timezone:E})):e.createElement(e.Fragment,null,e.createElement("div",{className:"k-scheduler-edit-form-row"},e.createElement(l.Field,{name:r.start,component:q,baseEditor:M,onStartChange:Q,isAllDay:b,timeId:"k-scheduler-editor-start-time",connectorElement:e.createElement(l.Field,{name:r.start,component:ce,editorId:"k-scheduler-editor-start-time",className:"k-scheduler-datetime-label"},n.toLanguageString(t.editorDateConnectorFrom,t.messages[t.editorDateConnectorFrom])),fieldError:a.errors[r.start],ariaLabel:n.toLanguageString(t.editorEventStart,t.messages[t.editorEventStart]),timeAriaLabel:n.toLanguageString(t.editorStartTimeAriaLabel,t.messages[t.editorStartTimeAriaLabel]),timezone:E})),!v&&e.createElement(R.Button,{className:"k-col-span-2",fillMode:"flat",themeColor:"primary",title:n.toLanguageString(t.editorSetTimezoneTitle,t.messages[t.editorSetTimezoneTitle]),onClick:G,svgIcon:S.globeIcon},n.toLanguageString(t.editorTimezoneButton,t.messages[t.editorTimezoneButton])),v&&e.createElement(e.Fragment,null,e.createElement(l.Field,{name:r.startTimezone,component:le,data:T,value:f,ariaLabel:n.toLanguageString(t.editorEventStartTimeZone,t.messages[t.editorEventStartTimeZone])}),e.createElement(R.Button,{title:n.toLanguageString(t.editorResetTimezoneTitle,t.messages[t.editorResetTimezoneTitle]),"aria-label":n.toLanguageString(t.editorResetTimezoneAriaLabel,t.messages[t.editorResetTimezoneAriaLabel]),onClick:G,svgIcon:S.globeIcon,fillMode:"flat",themeColor:"primary"})),e.createElement("div",{className:"k-scheduler-edit-form-row"},e.createElement(l.Field,{name:r.end,component:B,isAllDay:b,min:O,timeId:"k-scheduler-editor-end-time",connectorElement:e.createElement(l.Field,{name:r.end,component:_,editorId:"k-scheduler-editor-end-time",className:"k-scheduler-datetime-label"},n.toLanguageString(t.editorDateConnectorTo,t.messages[t.editorDateConnectorTo])),fieldError:a.errors[r.end],ariaLabel:n.toLanguageString(t.editorEventEnd,t.messages[t.editorEventEnd]),timeAriaLabel:n.toLanguageString(t.editorEndTimeAriaLabel,t.messages[t.editorEndTimeAriaLabel]),timezone:E})),v&&e.createElement(l.Field,{name:r.endTimezone,component:ie,data:T,value:d(r.endTimezone)||E||"",ariaLabel:n.toLanguageString(t.editorEventEndTimeZone,t.messages[t.editorEventEndTimeZone])}))),Ee&&e.createElement("div",{className:"k-scheduler-edit-form-row"},e.createElement(R.Button,{className:"k-scheduler-recurrence-button",type:"button",fillMode:"flat",themeColor:"primary",svgIcon:S.arrowRotateCwIcon,onClick:ke,"aria-describedby":u?W:void 0},be),u&&C&&e.createElement("div",{id:W,className:"k-scheduler-recurrence-summary k-form-hint",title:C},w&&H?e.createElement(w,{recurrenceRule:u,text:C,parsedRule:H}):C))))),e.createElement(l.FieldWrapper,null,e.createElement(L.Label,{className:"k-form-label"},e.createElement(k.SvgIcon,{icon:S.commentIcon,size:"xlarge"})),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(l.Field,{component:ue,name:r.description,id:"k-event-description",resizable:"vertical",placeholder:n.toLanguageString(t.editorEventDescription,t.messages[t.editorEventDescription]),"aria-label":n.toLanguageString(t.editorEventDescription,t.messages[t.editorEventDescription])}))),(x||[]).map(o=>e.createElement(l.FieldWrapper,{key:o.field},o.svgIcon&&e.createElement(L.Label,{className:"k-form-label"},e.createElement(k.SvgIcon,{icon:o.svgIcon,size:"xlarge"})),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(l.Field,{name:o.field,component:ge,resource:o,multiple:o.multiple,data:o.data,textField:o.textField,valueField:o.valueField,colorField:o.colorField,ariaLabel:o.name||o.field})))))),ve&&e.createElement(Me.SchedulerRecurrenceDialog,{value:u,start:F,timezone:E||"",onSave:Le,onCancel:De,onRemoveRecurrence:ze,recurrenceSummaryTemplate:w,recurrenceEditor:me}),Se&&e.createElement(Be.RemoveRecurrenceConfirmDialog,{onConfirm:Ce,onCancel:pe}),fe&&e.createElement(ee.Dialog,{title:n.toLanguageString(t.resetTimezoneDialogTitle,t.messages[t.resetTimezoneDialogTitle]),onClose:K},n.toLanguageString(t.resetTimezoneConfirmation,t.messages[t.resetTimezoneConfirmation]),e.createElement(ee.DialogActionsBar,null,e.createElement(R.Button,{onClick:K},n.toLanguageString(t.resetTimezoneNo,t.messages[t.resetTimezoneNo])),e.createElement(R.Button,{themeColor:"primary",onClick:Re},n.toLanguageString(t.resetTimezoneYes,t.messages[t.resetTimezoneYes])))))});re.displayName="KendoReactSchedulerFormEditor";const q=a=>{const{baseEditor:m,onStartChange:i,onChange:g,...T}=a,n=e.useCallback(h=>i(h,g),[i,g]);return e.createElement(m,{...T,onChange:n})};q.displayName="SchedulerDurationPreservingEditor";const ne=e.forwardRef((a,m)=>e.createElement(l.FormElement,{ref:m,id:a.id,style:a.style,tabIndex:a.tabIndex,className:a.className,horizontal:a.horizontal,children:a.children}));ne.displayName="SchedulerFormEditorDefaultElement";const ae=a=>{const{value:m,onChange:i,valid:g,visited:T,touched:n,modified:h,name:r,validationMessage:x,...E}=a,D=e.useCallback(y=>{i&&i({value:y.value})},[i]);return e.createElement(A.Switch,{...E,checked:m||!1,onChange:D})};ae.displayName="SwitchFieldAdapter";const p=a=>e.createElement(L.Label,{...a,style:{marginBottom:0,...a.style}});p.displayName="DefaultLabel";const c={as:ne,titleEditor:A.Input,startEditor:$.ZonedSplitDateTime,endEditor:$.ZonedSplitDateTime,startTimezoneEditor:X.TimezoneDropDownList,endTimezoneEditor:X.TimezoneDropDownList,startLabel:p,endLabel:p,allDayEditor:ae,allDayLabel:p,recurrenceEditor:qe.RecurrenceEditor,descriptionEditor:A.TextArea,resourceEditor:xe.ResourceEditor};exports.SchedulerFormEditor=re;exports.schedulerFormEditorDefaultProps=c;