@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
@@ -6,148 +6,181 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  import * as e from "react";
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) => {
9
+ import * as ae from "react-dom";
10
+ import { canUseDOM as oe } from "@progress/kendo-react-common";
11
+ import { Button as h } from "@progress/kendo-react-buttons";
12
+ import { Form as ne } from "@progress/kendo-react-form";
13
+ import { Dialog as ie, DialogActionsBar as le } from "@progress/kendo-react-dialogs";
14
+ import { useLocalization as re } from "@progress/kendo-react-intl";
15
+ import { SchedulerFormEditor as se } from "../editors/SchedulerFormEditor.mjs";
16
+ import { DiscardChangesDialog as ce } from "../editors/DiscardChangesDialog.mjs";
17
+ import { trashIcon as de } from "@progress/kendo-svg-icons";
18
+ import { editorValidationRequired as F, messages as i, editorValidationEnd as w, editorSave as B, editorCancel as T, editorDelete as V, editorValidationStart as q, editorNewEvent as A, editorEditEvent as x } from "../messages/index.mjs";
19
+ import { useSchedulerFieldsContext as ue } from "../context/SchedulerContext.mjs";
20
+ const me = e.forwardRef((l, H) => {
20
21
  const {
21
- onCancel: d,
22
- onClose: c,
23
- onSubmit: m,
22
+ onCancel: g,
23
+ onClose: f,
24
+ onSubmit: C,
24
25
  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]
34
- ), b = e.useMemo(
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(
26
+ editor: N,
27
+ dialog: O = z.dialog,
28
+ validator: D = z.validator,
29
+ ...K
30
+ } = l, r = e.useRef(null);
31
+ e.useImperativeHandle(r, () => ({ props: l })), e.useImperativeHandle(H, () => r.current);
32
+ const o = re(), n = ue(), k = !!(l.dataItem && l.dataItem[n.id]), I = e.useMemo(
33
+ () => o.toLanguageString(F, i[F]),
34
+ [o]
35
+ ), L = e.useMemo(
36
+ () => o.toLanguageString(w, i[w]),
37
+ [o]
38
+ ), P = e.useMemo(
39
+ () => o.toLanguageString(B, i[B]),
40
+ [o]
41
+ ), U = e.useMemo(
42
+ () => o.toLanguageString(T, i[T]),
43
+ [o]
44
+ ), j = e.useMemo(
45
+ () => o.toLanguageString(V, i[V]),
46
+ [o]
47
+ ), R = e.useMemo(
48
+ () => o.toLanguageString(q, i[q]),
49
+ [o]
50
+ ), J = e.useMemo(
51
+ () => o.toLanguageString(A, i[A]),
52
+ [o]
53
+ ), Q = e.useMemo(
54
+ () => o.toLanguageString(x, i[x]),
55
+ [o]
56
+ ), W = k ? Q : J, S = e.useRef(!1), [c, d] = e.useState(null), u = e.useCallback(
56
57
  (t) => {
57
- d && d({
58
+ g && g({
58
59
  value: null,
59
60
  syntheticEvent: t,
60
- target: l.current
61
+ target: r.current
61
62
  });
62
63
  },
63
- [d]
64
- ), J = e.useCallback(
65
- ({ syntheticEvent: t }) => {
66
- c && c({
64
+ [g]
65
+ ), m = e.useCallback(
66
+ (t) => {
67
+ f && f({
67
68
  value: null,
68
69
  syntheticEvent: t,
69
- target: l.current
70
+ target: r.current
70
71
  });
71
72
  },
72
- [c]
73
- ), P = e.useCallback(
74
- (t, n) => {
75
- m && m({
73
+ [f]
74
+ ), X = e.useCallback(
75
+ (t) => {
76
+ if (S.current) {
77
+ d({ type: "cancel", syntheticEvent: t });
78
+ return;
79
+ }
80
+ u(t);
81
+ },
82
+ [u]
83
+ ), Y = e.useCallback(
84
+ ({ syntheticEvent: t }) => {
85
+ if (S.current) {
86
+ d({ type: "close", syntheticEvent: t });
87
+ return;
88
+ }
89
+ m(t);
90
+ },
91
+ [m]
92
+ ), Z = e.useCallback(() => {
93
+ if (c) {
94
+ const { type: t, syntheticEvent: a } = c;
95
+ d(null), t === "cancel" ? u(a) : m(a);
96
+ }
97
+ }, [c, u, m]), _ = e.useCallback(() => {
98
+ d(null);
99
+ }, []), $ = e.useCallback(
100
+ (t, a) => {
101
+ C && C({
76
102
  value: t,
77
- syntheticEvent: n,
78
- target: l.current
103
+ syntheticEvent: a,
104
+ target: r.current
79
105
  });
80
106
  },
81
- [m]
82
- ), Q = e.useCallback(
107
+ [C]
108
+ ), G = e.useCallback(
83
109
  (t) => {
84
110
  s && s({
85
- value: r.dataItem,
111
+ value: l.dataItem,
86
112
  syntheticEvent: t,
87
- target: l.current
113
+ target: r.current
88
114
  });
89
115
  },
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,
96
- [o, b]
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 };
116
+ [s, l.dataItem]
117
+ ), p = e.useCallback(
118
+ (t, a) => t && a(n.end) && t.getTime() > a(n.end).getTime() ? R : void 0,
119
+ [n, R]
120
+ ), y = e.useCallback(
121
+ (t, a) => t && a(n.start) && t.getTime() < a(n.start).getTime() ? L : void 0,
122
+ [n, L]
123
+ ), M = e.useCallback(
124
+ (t) => t ? void 0 : I,
125
+ [I]
126
+ ), ee = e.useCallback(
127
+ (t, a) => {
128
+ const b = {};
129
+ b[n.start] = [
130
+ M(a(n.start)),
131
+ p(a(n.start), a)
132
+ ].filter(Boolean).reduce((E, v) => E || v, ""), b[n.end] = [
133
+ M(a(n.start)),
134
+ y(a(n.start), a)
135
+ ].filter(Boolean).reduce((E, v) => E || v, "");
136
+ const te = D(t, a);
137
+ return { ...b, ...te };
112
138
  },
113
- [D, o.end, o.start, u, k, M]
139
+ [y, n.end, n.start, M, p, D]
114
140
  );
115
- return Z ? Y.createPortal(
141
+ return oe ? ae.createPortal(
116
142
  /* @__PURE__ */ e.createElement(
117
- _,
143
+ ne,
118
144
  {
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,
145
+ ignoreModified: !0,
146
+ initialValues: l.dataItem,
147
+ onSubmit: $,
148
+ validator: ee,
149
+ render: (t) => (S.current = t.modified, /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(O, { title: W, width: 650, onClose: Y }, /* @__PURE__ */ e.createElement(se, { ...t, as: N }), /* @__PURE__ */ e.createElement(le, { layout: "end" }, k && s && /* @__PURE__ */ e.createElement(
150
+ h,
124
151
  {
125
152
  fillMode: "flat",
126
153
  themeColor: "primary",
127
- svgIcon: ae,
128
- onClick: Q
154
+ svgIcon: de,
155
+ onClick: G
129
156
  },
130
- N
131
- ), /* @__PURE__ */ e.createElement(f, { onClick: j }, H), /* @__PURE__ */ e.createElement(
132
- f,
157
+ j
158
+ ), /* @__PURE__ */ e.createElement(h, { onClick: X }, U), /* @__PURE__ */ e.createElement(
159
+ h,
133
160
  {
134
161
  themeColor: "primary",
135
162
  disabled: !t.allowSubmit,
136
163
  onClick: t.onSubmit
137
164
  },
138
- z
165
+ P
166
+ ))), c && /* @__PURE__ */ e.createElement(
167
+ ce,
168
+ {
169
+ onDiscard: Z,
170
+ onCancel: _
171
+ }
139
172
  ))),
140
- ...x
173
+ ...K
141
174
  }
142
175
  ),
143
176
  document && document.body
144
177
  ) : null;
145
- }), p = {
146
- dialog: $,
178
+ }), z = {
179
+ dialog: ie,
147
180
  validator: () => ({})
148
181
  };
149
- ne.displayName = "KendoReactSchedulerForm";
182
+ me.displayName = "KendoReactSchedulerForm";
150
183
  export {
151
- ne as SchedulerForm,
152
- p as schedulerFormDefaultProps
184
+ me as SchedulerForm,
185
+ z as schedulerFormDefaultProps
153
186
  };
@@ -0,0 +1,63 @@
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 { FormProps } from '@progress/kendo-react-form';
9
+ import { DataItem } from '../models/index.js';
10
+ import * as React from 'react';
11
+ /**
12
+ * Represents the event argument of the [SchedulerQuickCreateForm](https://www.telerik.com/kendo-react-ui/components/scheduler/api/schedulerquickcreateform) callbacks.
13
+ */
14
+ export interface SchedulerQuickCreateFormStateChangeEvent<T> {
15
+ /**
16
+ * The value associated with the event.
17
+ */
18
+ value: T;
19
+ /**
20
+ * The React synthetic event object.
21
+ */
22
+ syntheticEvent: React.SyntheticEvent | undefined;
23
+ }
24
+ /**
25
+ * Represents the props of the KendoReact [SchedulerQuickCreateForm](https://www.telerik.com/kendo-react-ui/components/scheduler/api/schedulerquickcreateform) component.
26
+ */
27
+ export interface SchedulerQuickCreateFormProps {
28
+ /**
29
+ * Specifies the draft `dataItem` created for the slot and visualized inside the quick-create popover.
30
+ */
31
+ dataItem: DataItem;
32
+ /**
33
+ * Controls the visibility of the quick-create popover.
34
+ */
35
+ show: boolean;
36
+ /**
37
+ * The anchor element the popover is positioned against.
38
+ */
39
+ anchor: HTMLElement | null;
40
+ /**
41
+ * A validation function applied to the quick-create form values. Behaves like the `validator` of the [SchedulerForm](https://www.telerik.com/kendo-react-ui/components/scheduler/api/schedulerform).
42
+ */
43
+ validator?: FormProps['validator'];
44
+ /**
45
+ * Fires when the quick-create form is submitted through the `Save` button or the `Enter` key.
46
+ */
47
+ onSubmit: (event: SchedulerQuickCreateFormStateChangeEvent<DataItem>) => void;
48
+ /**
49
+ * Fires when the `More options` button is clicked to open the full editor.
50
+ */
51
+ onMoreOptions?: (event: SchedulerQuickCreateFormStateChangeEvent<DataItem>) => void;
52
+ /**
53
+ * Fires when the quick-create form is cancelled.
54
+ */
55
+ onCancel?: (event: SchedulerQuickCreateFormStateChangeEvent<null>) => void;
56
+ }
57
+ /**
58
+ * Represents the default `quickCreateForm` component rendered by the [SchedulerEditSlot](https://www.telerik.com/kendo-react-ui/components/scheduler/api/schedulereditslot) inside the quick-create popover.
59
+ *
60
+ * Unlike the heavier [SchedulerForm](https://www.telerik.com/kendo-react-ui/components/scheduler/api/schedulerform), it is a lightweight popover with a single editable `title` field that supports a `validator`.
61
+ */
62
+ export declare const SchedulerQuickCreateForm: React.FC<SchedulerQuickCreateFormProps>;
63
+ export declare const schedulerQuickCreateFormDefaultProps: {};
@@ -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 Y=require("react"),L=require("@progress/kendo-react-tooltip"),w=require("@progress/kendo-react-common"),b=require("@progress/kendo-react-buttons"),ee=require("@progress/kendo-react-inputs"),d=require("@progress/kendo-react-form"),P=require("@progress/kendo-react-labels"),x=require("@progress/kendo-react-intl"),R=require("@progress/kendo-date-math"),z=require("@progress/kendo-svg-icons"),E=require("../utils/index.js"),te=require("../hooks/useQuickCreatePlacement.js"),oe=require("../hooks/useCloseOnAnchorScrollOut.js"),t=require("../messages/index.js"),I=require("../context/SchedulerContext.js");function ne(i){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const c in i)if(c!=="default"){const r=Object.getOwnPropertyDescriptor(i,c);Object.defineProperty(a,c,r.get?r:{enumerable:!0,get:()=>i[c]})}}return a.default=i,Object.freeze(a)}const e=ne(Y),N={skeleton:"MMMMd"},A="t",ae=360,Q=6,re=i=>{const{value:a,onChange:c,onKeyDown:r,valid:h,placeholder:p,ariaLabel:m}=i;return e.createElement(ee.TextBox,{"aria-label":m,placeholder:p,autoComplete:"off",value:a!=null?a:"",onChange:c,onKeyDown:r,valid:h})},B=i=>{const{show:a,anchor:c,dataItem:r,validator:h,onSubmit:p,onMoreOptions:m,onCancel:n}=i,g=x.useInternationalization(),u=x.useLocalization(),s=I.useSchedulerFieldsContext(),{timezone:S}=I.useSchedulerPropsContext(),k=te.useQuickCreatePlacement(),y=e.useRef(null),_=e.useCallback(()=>{n==null||n({value:null,syntheticEvent:void 0})},[n]);oe.useCloseOnAnchorScrollOut(a,c,_),e.useEffect(()=>{if(!a)return;const o=l=>{var M,T;const f=l.target,F=(T=(M=y.current)==null?void 0:M.element)==null?void 0:T.closest(".k-popover");(F?F.contains(f):!1)||n==null||n({value:null,syntheticEvent:void 0})};return document.addEventListener("mousedown",o),()=>{document.removeEventListener("mousedown",o)}},[a,c,n]);const v=E.getField(r,s.start),C=E.getField(r,s.end),$=!!E.getField(r,s.isAllDay),j=u.toLanguageString(t.allDay,t.messages[t.allDay]);let D="";if(v&&C){const o=R.ZonedDate.fromLocalDate(v,S),l=R.ZonedDate.fromLocalDate(C,S);D=$?`${g.formatDate(o,N)}, ${j}`:`${g.formatDate(o,N)}, ${g.formatDate(o,A)} - ${g.formatDate(l,A)}`}const O=u.toLanguageString(t.editorNewEvent,t.messages[t.editorNewEvent]),K=u.toLanguageString(t.editorEventTitle,t.messages[t.editorEventTitle]),V=u.toLanguageString(t.quickCreateSave,t.messages[t.quickCreateSave]),W=u.toLanguageString(t.quickCreateMoreOptions,t.messages[t.quickCreateMoreOptions]),G=u.toLanguageString(t.quickCreateCancel,t.messages[t.quickCreateCancel]),Z=e.useCallback((o,l)=>{p({value:o,syntheticEvent:l})},[p]),H=e.useCallback(o=>l=>{if(!m)return;const f={...r};E.setField(f,s.title,o.valueGetter(s.title)),m({value:f,syntheticEvent:l})},[m,r,s.title]),J=e.useCallback(o=>{n&&n({value:null,syntheticEvent:o})},[n]),U=e.useCallback(()=>{n==null||n({value:null,syntheticEvent:void 0})},[n]),q=k.position==="top"||k.position==="bottom",X={vertical:q?Q:0,horizontal:q?0:Q};return e.createElement(d.Form,{key:v?v.getTime():void 0,initialValues:r,validator:h,ignoreModified:!0,onSubmit:Z,render:o=>e.createElement(L.Popover,{anchor:c,show:a,position:k.position,collision:k.collision,callout:!1,title:O,style:{width:ae},onKeyDown:U,animate:{openDuration:1,closeDuration:1},margin:X},e.createElement(d.FormElement,{ref:y,horizontal:!0,className:"k-scheduler-edit-form"},e.createElement(d.FieldWrapper,null,e.createElement(P.Label,{className:"k-form-label"},e.createElement(w.SvgIcon,{icon:z.rightDoubleQuotesIcon,size:"xlarge"})),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(d.Field,{name:s.title,component:re,ariaLabel:K,placeholder:O,onKeyDown:l=>{l.key==="Enter"&&(l.preventDefault(),o.onSubmit(l))}}))),e.createElement(d.FieldWrapper,null,e.createElement(P.Label,{className:"k-form-label"},e.createElement(w.SvgIcon,{icon:z.clockIcon,size:"xlarge"})),e.createElement("div",{className:"k-form-field-wrap"},e.createElement("div",{className:"k-scheduler-edit-form-row k-color-subtle"},D)))),e.createElement(L.PopoverActionsBar,null,e.createElement(b.Button,{type:"button",fillMode:"flat",themeColor:"primary",onClick:H(o)},W),e.createElement("span",{className:"k-spacer"}),e.createElement(b.Button,{type:"button",onClick:J},G),e.createElement(b.Button,{type:"button",themeColor:"primary",disabled:!o.allowSubmit,onClick:o.onSubmit},V)))})};B.displayName="KendoReactSchedulerQuickCreateForm";const le={};exports.SchedulerQuickCreateForm=B;exports.schedulerQuickCreateFormDefaultProps=le;
@@ -0,0 +1,148 @@
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 ee, PopoverActionsBar as te } from "@progress/kendo-react-tooltip";
10
+ import { SvgIcon as F } from "@progress/kendo-react-common";
11
+ import { Button as g } from "@progress/kendo-react-buttons";
12
+ import { TextBox as oe } from "@progress/kendo-react-inputs";
13
+ import { Form as ne, FormElement as ae, FieldWrapper as O, Field as le } from "@progress/kendo-react-form";
14
+ import { Label as x } from "@progress/kendo-react-labels";
15
+ import { useInternationalization as re, useLocalization as ie } from "@progress/kendo-react-intl";
16
+ import { ZonedDate as P } from "@progress/kendo-date-math";
17
+ import { rightDoubleQuotesIcon as ce, clockIcon as se } from "@progress/kendo-svg-icons";
18
+ import { getField as k, setField as me } from "../utils/index.mjs";
19
+ import { useQuickCreatePlacement as ue } from "../hooks/useQuickCreatePlacement.mjs";
20
+ import { useCloseOnAnchorScrollOut as de } from "../hooks/useCloseOnAnchorScrollOut.mjs";
21
+ import { allDay as z, messages as c, editorNewEvent as A, editorEventTitle as N, quickCreateSave as I, quickCreateMoreOptions as Q, quickCreateCancel as K } from "../messages/index.mjs";
22
+ import { useSchedulerFieldsContext as pe, useSchedulerPropsContext as fe } from "../context/SchedulerContext.mjs";
23
+ const R = { skeleton: "MMMMd" }, $ = "t", Ee = 360, B = 6, ve = (v) => {
24
+ const { value: a, onChange: s, onKeyDown: l, valid: h, placeholder: u, ariaLabel: m } = v;
25
+ return /* @__PURE__ */ e.createElement(
26
+ oe,
27
+ {
28
+ "aria-label": m,
29
+ placeholder: u,
30
+ autoComplete: "off",
31
+ value: a != null ? a : "",
32
+ onChange: s,
33
+ onKeyDown: l,
34
+ valid: h
35
+ }
36
+ );
37
+ }, he = (v) => {
38
+ const { show: a, anchor: s, dataItem: l, validator: h, onSubmit: u, onMoreOptions: m, onCancel: o } = v, d = re(), i = ie(), r = pe(), { timezone: b } = fe(), p = ue(), y = e.useRef(null), V = e.useCallback(() => {
39
+ o == null || o({ value: null, syntheticEvent: void 0 });
40
+ }, [o]);
41
+ de(a, s, V), e.useEffect(() => {
42
+ if (!a)
43
+ return;
44
+ const t = (n) => {
45
+ var M, T;
46
+ const E = n.target, w = (T = (M = y.current) == null ? void 0 : M.element) == null ? void 0 : T.closest(".k-popover");
47
+ (w ? w.contains(E) : !1) || o == null || o({ value: null, syntheticEvent: void 0 });
48
+ };
49
+ return document.addEventListener("mousedown", t), () => {
50
+ document.removeEventListener("mousedown", t);
51
+ };
52
+ }, [a, s, o]);
53
+ const f = k(l, r.start), D = k(l, r.end), _ = !!k(l, r.isAllDay), q = i.toLanguageString(z, c[z]);
54
+ let S = "";
55
+ if (f && D) {
56
+ const t = P.fromLocalDate(f, b), n = P.fromLocalDate(D, b);
57
+ S = _ ? `${d.formatDate(t, R)}, ${q}` : `${d.formatDate(t, R)}, ${d.formatDate(
58
+ t,
59
+ $
60
+ )} - ${d.formatDate(n, $)}`;
61
+ }
62
+ const C = i.toLanguageString(A, c[A]), G = i.toLanguageString(N, c[N]), W = i.toLanguageString(I, c[I]), H = i.toLanguageString(Q, c[Q]), Z = i.toLanguageString(K, c[K]), j = e.useCallback(
63
+ (t, n) => {
64
+ u({ value: t, syntheticEvent: n });
65
+ },
66
+ [u]
67
+ ), J = e.useCallback(
68
+ (t) => (n) => {
69
+ if (!m)
70
+ return;
71
+ const E = { ...l };
72
+ me(E, r.title, t.valueGetter(r.title)), m({ value: E, syntheticEvent: n });
73
+ },
74
+ [m, l, r.title]
75
+ ), U = e.useCallback(
76
+ (t) => {
77
+ o && o({ value: null, syntheticEvent: t });
78
+ },
79
+ [o]
80
+ ), X = e.useCallback(() => {
81
+ o == null || o({ value: null, syntheticEvent: void 0 });
82
+ }, [o]), L = p.position === "top" || p.position === "bottom", Y = {
83
+ vertical: L ? B : 0,
84
+ horizontal: L ? 0 : B
85
+ };
86
+ return /* @__PURE__ */ e.createElement(
87
+ ne,
88
+ {
89
+ key: f ? f.getTime() : void 0,
90
+ initialValues: l,
91
+ validator: h,
92
+ ignoreModified: !0,
93
+ onSubmit: j,
94
+ render: (t) => /* @__PURE__ */ e.createElement(
95
+ ee,
96
+ {
97
+ anchor: s,
98
+ show: a,
99
+ position: p.position,
100
+ collision: p.collision,
101
+ callout: !1,
102
+ title: C,
103
+ style: { width: Ee },
104
+ onKeyDown: X,
105
+ animate: { openDuration: 1, closeDuration: 1 },
106
+ margin: Y
107
+ },
108
+ /* @__PURE__ */ e.createElement(ae, { ref: y, horizontal: !0, className: "k-scheduler-edit-form" }, /* @__PURE__ */ e.createElement(O, null, /* @__PURE__ */ e.createElement(x, { className: "k-form-label" }, /* @__PURE__ */ e.createElement(F, { icon: ce, size: "xlarge" })), /* @__PURE__ */ e.createElement("div", { className: "k-form-field-wrap" }, /* @__PURE__ */ e.createElement(
109
+ le,
110
+ {
111
+ name: r.title,
112
+ component: ve,
113
+ ariaLabel: G,
114
+ placeholder: C,
115
+ onKeyDown: (n) => {
116
+ n.key === "Enter" && (n.preventDefault(), t.onSubmit(n));
117
+ }
118
+ }
119
+ ))), /* @__PURE__ */ e.createElement(O, null, /* @__PURE__ */ e.createElement(x, { className: "k-form-label" }, /* @__PURE__ */ e.createElement(F, { icon: se, size: "xlarge" })), /* @__PURE__ */ e.createElement("div", { className: "k-form-field-wrap" }, /* @__PURE__ */ e.createElement("div", { className: "k-scheduler-edit-form-row k-color-subtle" }, S)))),
120
+ /* @__PURE__ */ e.createElement(te, null, /* @__PURE__ */ e.createElement(
121
+ g,
122
+ {
123
+ type: "button",
124
+ fillMode: "flat",
125
+ themeColor: "primary",
126
+ onClick: J(t)
127
+ },
128
+ H
129
+ ), /* @__PURE__ */ e.createElement("span", { className: "k-spacer" }), /* @__PURE__ */ e.createElement(g, { type: "button", onClick: U }, Z), /* @__PURE__ */ e.createElement(
130
+ g,
131
+ {
132
+ type: "button",
133
+ themeColor: "primary",
134
+ disabled: !t.allowSubmit,
135
+ onClick: t.onSubmit
136
+ },
137
+ W
138
+ ))
139
+ )
140
+ }
141
+ );
142
+ };
143
+ he.displayName = "KendoReactSchedulerQuickCreateForm";
144
+ const ze = {};
145
+ export {
146
+ he as SchedulerQuickCreateForm,
147
+ ze as schedulerQuickCreateFormDefaultProps
148
+ };
@@ -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 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;
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 r=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(r,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const n=C(f),s=n.forwardRef((e,r)=>{const t=n.useRef(null),o=n.useRef(null),i=k.useLocalization();n.useImperativeHandle(t,()=>({element:o.current&&o.current.element,...e})),n.useImperativeHandle(r,()=>t.current);const d=n.useCallback(a=>{a.stopPropagation(),!(!e.onClick||!t.current)&&e.onClick.call(void 0,{target:t.current,syntheticEvent:a})},[t,e.slot,e.onClick]),m=n.useCallback(a=>{a.stopPropagation()},[]),b=n.useCallback(a=>{a.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;
@@ -18,7 +18,7 @@ const b = e.forwardRef(
18
18
  })), e.useImperativeHandle(i, () => n.current);
19
19
  const u = e.useCallback(
20
20
  (o) => {
21
- !t.onClick || !n.current || t.onClick.call(void 0, {
21
+ o.stopPropagation(), !(!t.onClick || !n.current) && t.onClick.call(void 0, {
22
22
  target: n.current,
23
23
  syntheticEvent: o
24
24
  });