@progress/kendo-react-scheduler 9.0.0-develop.1 → 9.0.0-develop.11
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/README.md +28 -28
- package/Scheduler.mjs +42 -65
- package/components/BaseView.mjs +1 -10
- package/components/CurrentTimeMarket.mjs +31 -46
- package/components/DateHeaderCell.mjs +2 -8
- package/components/SchedulerForm.js +1 -1
- package/components/SchedulerForm.mjs +46 -24
- package/components/SchedulerOccurrenceDialog.mjs +5 -7
- package/components/SchedulerRemoveDialog.mjs +42 -31
- package/components/ShowMoreItemsButton.mjs +30 -32
- package/components/TimeHeaderCell.mjs +2 -8
- package/components/footer/SchedulerFooter.js +1 -1
- package/components/footer/SchedulerFooter.mjs +20 -21
- package/components/footer/bussiness-hours/BussinessHours.mjs +15 -16
- package/components/header/SchedulerHeader.mjs +18 -19
- package/components/header/navigation/NavigationDatePicker.mjs +12 -43
- package/components/header/navigation/SchedulerNavigation.mjs +15 -16
- package/components/header/view-selector/SchedulerViewSelector.mjs +15 -16
- package/components/header/view-selector/ViewSelectorItem.mjs +3 -6
- package/components/header/view-selector/ViewSelectorList.mjs +4 -7
- package/context/SchedulerContext.mjs +10 -2
- package/context/SchedulerEditItemContext.mjs +20 -4
- package/context/SchedulerEditSlotContext.mjs +4 -6
- package/context/SchedulerEditTaskContext.mjs +3 -1
- package/dist/cdn/js/kendo-react-scheduler.js +1 -1
- package/editors/FilterableComboBox.mjs +4 -10
- package/editors/SchedulerFormEditor.mjs +218 -297
- package/editors/ZonedDateTime.mjs +14 -27
- package/hooks/use-items-focus.mjs +2 -12
- package/hooks/use-items-selection.mjs +2 -12
- package/hooks/use-slots-focus.mjs +9 -1
- package/hooks/useCellSync.js +1 -1
- package/hooks/useCellSync.mjs +8 -9
- package/hooks/useRowSync.js +1 -1
- package/hooks/useRowSync.mjs +7 -5
- package/hooks/useSchedulerItem.mjs +8 -10
- package/hooks/useSchedulerSlot.mjs +8 -10
- package/hooks/useSlotExpand.mjs +14 -21
- package/index.d.mts +83 -41
- package/index.d.ts +83 -41
- package/items/SchedulerEditItem.mjs +576 -471
- package/items/SchedulerItem.mjs +294 -304
- package/items/SchedulerItemContent.mjs +6 -10
- package/items/SchedulerProportionalViewItem.mjs +100 -96
- package/items/SchedulerViewItem.mjs +97 -93
- package/items/hooks/use-show-occurrence-dialog.mjs +5 -1
- package/package-metadata.mjs +1 -1
- package/package.json +11 -11
- package/recurrence/RecurrenceEditor.js +1 -1
- package/recurrence/RecurrenceEditor.mjs +57 -76
- package/recurrence/RecurrenceFrequencyEditor.mjs +10 -18
- package/recurrence/RecurrenceRepeatOnWeekEditor.js +1 -1
- package/recurrence/RecurrenceRepeatOnWeekEditor.mjs +7 -4
- package/recurrence/common.js +1 -1
- package/recurrence/common.mjs +38 -30
- package/services/itemsService.mjs +8 -9
- package/services/occurrenceService.mjs +1 -3
- package/slots/SchedulerEditSlot.mjs +111 -133
- package/slots/SchedulerSlot.mjs +148 -154
- package/slots/SchedulerViewSlot.mjs +7 -5
- package/tasks/SchedulerEditTask.mjs +108 -129
- package/tasks/SchedulerTask.mjs +39 -47
- package/tasks/SchedulerViewTask.mjs +8 -6
- package/utils/index.js +1 -1
- package/utils/index.mjs +99 -96
- package/views/agenda/AgendaView.mjs +50 -66
- package/views/common/HorizontalResourceIterator.mjs +33 -3
- package/views/common/VerticalResourceIterator.mjs +8 -1
- package/views/common/utils.js +1 -1
- package/views/common/utils.mjs +35 -34
- package/views/day/DayViewRowContent.mjs +3 -6
- package/views/day/MultiDayView.js +1 -1
- package/views/day/MultiDayView.mjs +156 -187
- package/views/month/MonthView.mjs +18 -28
- package/views/time/MultiDayTimelineView.js +1 -1
- package/views/time/MultiDayTimelineView.mjs +41 -90
- package/views/time/TimelineViewAllEventsRowContent.mjs +8 -1
- package/views/week/WeekView.mjs +1 -8
- package/views/week/WorkWeekView.mjs +1 -8
package/README.md
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
<img src="https://www.telerik.com/kendo-react-ui/components/npm-banner.svg" alt="KendoReact NPM Banner">
|
|
3
3
|
</a>
|
|
4
4
|
|
|
5
|
-
|
|
6
5
|
# KendoReact Scheduler Component for React
|
|
7
6
|
|
|
8
7
|
> **Important**
|
|
9
|
-
>
|
|
10
|
-
>
|
|
11
|
-
>
|
|
12
|
-
>
|
|
8
|
+
>
|
|
9
|
+
> - This package is а part of [KendoReact](https://www.telerik.com/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-scheduler)—a commercial UI library.
|
|
10
|
+
> - You will need to install a license key when adding the package to your project. For more information, please refer to the [KendoReact My License page](https://www.telerik.com/kendo-react-ui/components/my-license/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-scheduler).
|
|
11
|
+
> - To receive a license key, you need to either [purchase a license](https://www.telerik.com/kendo-react-ui/pricing?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-scheduler) or register for a [free trial](https://www.telerik.com/try/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-scheduler). Doing so indicates that you [accept the KendoReact License Agreement](https://www.telerik.com/purchase/license-agreement/progress-kendoreact?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-scheduler).
|
|
12
|
+
> - The 30-day free trial gives you access to all the KendoReact components and their full functionality. Additionally, for the period of your license, you get access to our legendary technical support provided directly by the KendoReact dev team!
|
|
13
13
|
>
|
|
14
14
|
> [Start using KendoReact](https://www.telerik.com/try/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-scheduler) and speed up your development process!
|
|
15
15
|
|
|
@@ -21,39 +21,39 @@ The KendoReact Scheduler component is built on React from the ground up by devel
|
|
|
21
21
|
|
|
22
22
|
Among the many features which the KendoReact Scheduler delivers are:
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
24
|
+
- [Multiple views](https://www.telerik.com/kendo-react-ui/components/scheduler/views/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-scheduler)—You can display the Scheduler events in any of the available Timeline, Day, Week, Month, or Agenda views.
|
|
25
|
+
- [Editing](https://www.telerik.com/kendo-react-ui/components/scheduler/editing/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-scheduler)—You can create, update, and delete events displayed by the Scheduler allowing for a fast and easy rescheduling.
|
|
26
|
+
- [Grouping](https://www.telerik.com/kendo-react-ui/components/scheduler/grouping/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-scheduler)—The Scheduler enables grouping by different resources like meeting rooms, teams, and more, which provides a nice arrangement of the events within the same group.
|
|
27
|
+
- [Resources](https://www.telerik.com/kendo-react-ui/components/scheduler/resources/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-scheduler)—Define different custom resources such as available conference rooms or guest lists for the Scheduler to work with.
|
|
28
|
+
- [Recurring events](https://www.telerik.com/kendo-react-ui/components/scheduler/recurring/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-scheduler)—You can schedule a recurring event that will occur on a specific day, for example, each Monday during the next year.
|
|
29
|
+
- [Controlled and uncontrolled mode for the date selection](https://www.telerik.com/kendo-react-ui/components/scheduler/date-selection/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-scheduler)—This capability allows you to completely override the date selection from outside the Scheduler.
|
|
30
|
+
- [Timezones](https://www.telerik.com/kendo-react-ui/components/scheduler/timezones/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-scheduler)—You can display the events in the Scheduler in different timezones when building multinational applications.
|
|
31
|
+
- [Globalization](https://www.telerik.com/kendo-react-ui/components/scheduler/timezones/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-scheduler)—The globalization process combines the translation of component messages with adapting them to specific cultures
|
|
32
|
+
- [Theme support](https://www.telerik.com/kendo-react-ui/components/styling/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-scheduler)—The KendoReact Scheduler, as well as all 100+ components in the KendoReact suite, are styled in three polished themes (Bootstrap, Material, and Default) and can be further customized to match your specific design guidelines.
|
|
33
33
|
|
|
34
34
|
## Support Options
|
|
35
35
|
|
|
36
36
|
For any issues you might encounter while working with the KendoReact Scheduler, use any of the available support channels:
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
- Industry-leading technical support—KendoReact paid license holders and users with an active (free) trial license can take advantage of our outstanding customer support. To submit a ticket, use [the dedicated KendoReact support system](https://www.telerik.com/account/support-tickets?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-scheduler).
|
|
39
|
+
- Product forums—The [KendoReact forums](https://www.telerik.com/forums/kendo-ui-react?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-scheduler) are part of the free support you can get from the community and from the KendoReact team.
|
|
40
|
+
- Feedback portal—The [KendoReact feedback portal](https://feedback.telerik.com/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-scheduler) is where you can request and vote for new features to be added.
|
|
41
41
|
|
|
42
42
|
## Resources
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
44
|
+
- [Getting Started with KendoReact](https://www.telerik.com/kendo-react-ui/components/getting-started/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-scheduler)
|
|
45
|
+
- [Getting Started with the KendoReact Scheduler](https://www.telerik.com/kendo-react-ui/components/scheduler/get-started/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-scheduler)
|
|
46
|
+
- [API Reference of the KendoReact Scheduler](https://www.telerik.com/kendo-react-ui/components/scheduler/api/SchedulerProps/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-scheduler)
|
|
47
|
+
- [KendoReact Roadmap](https://www.telerik.com/support/whats-new/kendo-react-ui/roadmap?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-scheduler)
|
|
48
|
+
- [Blogs](https://www.telerik.com/blogs/tag/kendoreact?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-scheduler)
|
|
49
|
+
- [Demos, documentation, and component reference](https://www.telerik.com/kendo-react-ui/components/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-scheduler)
|
|
50
|
+
- [KendoReact pricing and licensing](https://www.telerik.com/kendo-react-ui/pricing?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-scheduler)
|
|
51
|
+
- [Changelog](https://www.telerik.com/kendo-react-ui/components/changelogs/ui-for-react/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-scheduler)
|
|
52
52
|
|
|
53
53
|
High-level component overview pages
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
- [React Scheduler Component](https://www.telerik.com/kendo-react-ui/scheduler)
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
_Copyright © 2024 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved._
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
_Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries._
|
package/Scheduler.mjs
CHANGED
|
@@ -42,21 +42,19 @@ k.set(it, ut);
|
|
|
42
42
|
const ce = a.forwardRef((r, ie) => {
|
|
43
43
|
var J, Q, X;
|
|
44
44
|
We(ne);
|
|
45
|
-
const ue = Pe(ne), {
|
|
46
|
-
timezone: de,
|
|
47
|
-
onDataChange: V
|
|
48
|
-
} = r, f = a.useRef(null), b = a.useRef(null);
|
|
45
|
+
const ue = Pe(ne), { timezone: de, onDataChange: V } = r, f = a.useRef(null), b = a.useRef(null);
|
|
49
46
|
a.useImperativeHandle(b, () => ({ props: r, element: f.current })), a.useImperativeHandle(ie, () => b.current);
|
|
50
|
-
const I = He(f), A = Be(), C = Ge(), { fields: t } = a.useMemo(() => Le(r.modelFields), [r.modelFields]), [
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
47
|
+
const I = He(f), A = Be(), C = Ge(), { fields: t } = a.useMemo(() => Le(r.modelFields), [r.modelFields]), [p, g] = O(
|
|
48
|
+
r.defaultDate || h.defaultDate,
|
|
49
|
+
r.date,
|
|
50
|
+
r.onDateChange
|
|
51
|
+
), x = a.Children.toArray(r.children || []).map(
|
|
52
|
+
(e) => a.isValidElement(e) ? a.cloneElement(e, { ...k.get(e.type), ...e.props }) : e
|
|
53
|
+
), me = a.cloneElement(/* @__PURE__ */ a.createElement(W, null), k.get(W)), [P, H] = O(
|
|
54
|
+
r.defaultView || x[0] && x[0].props.name || "day",
|
|
55
|
+
r.view,
|
|
56
|
+
r.onViewChange
|
|
57
|
+
), [S, z] = O(!0), c = x.find((e) => e.props.name === P) || x[0] || me, w = ((J = r.data) != null ? J : h.data) || h.data, fe = Oe(r.group, r.resources), ge = r.group && r.group.orientation ? r.group.orientation : "horizontal", he = c.props.selectedDateFormat || dt, pe = c.props.selectedShortDateFormat || mt, _ = c.props.slotDuration, we = c.props.dateRange !== void 0 ? typeof c.props.dateRange == "function" ? c.props.dateRange.call(void 0, {
|
|
60
58
|
intl: A,
|
|
61
59
|
date: p,
|
|
62
60
|
timezone: de,
|
|
@@ -64,7 +62,11 @@ const ce = a.forwardRef((r, ie) => {
|
|
|
64
62
|
workWeekStart: c.props.workWeekStart || A.firstDay(),
|
|
65
63
|
workWeekEnd: c.props.workWeekEnd || (A.firstDay() + c.props.numberOfDays) % 6
|
|
66
64
|
}) : c.props.dateRange : { start: h.defaultDate, end: h.defaultDate }, v = a.useCallback(
|
|
67
|
-
({
|
|
65
|
+
({
|
|
66
|
+
created: e = [],
|
|
67
|
+
updated: i = [],
|
|
68
|
+
deleted: m = []
|
|
69
|
+
}) => {
|
|
68
70
|
if (V) {
|
|
69
71
|
const o = {
|
|
70
72
|
created: e,
|
|
@@ -88,11 +90,19 @@ const ce = a.forwardRef((r, ie) => {
|
|
|
88
90
|
if (Array.isArray(e.dataItem))
|
|
89
91
|
e.dataItem.map((o) => {
|
|
90
92
|
const l = D(y(e.dataItem, t, w)), u = D(o);
|
|
91
|
-
d(u, t.originalStart, s(l, t.originalStart)), d(u, t.recurrenceId, s(l, t.recurrenceId)), d(
|
|
93
|
+
d(u, t.originalStart, s(l, t.originalStart)), d(u, t.recurrenceId, s(l, t.recurrenceId)), d(
|
|
94
|
+
u,
|
|
95
|
+
t.recurrenceExceptions,
|
|
96
|
+
s(l, t.recurrenceExceptions)
|
|
97
|
+
), m.push(u);
|
|
92
98
|
});
|
|
93
99
|
else {
|
|
94
100
|
const o = D(y(e.dataItem, t, w)), l = D(e.dataItem);
|
|
95
|
-
d(l, t.originalStart, s(o, t.originalStart)), d(l, t.recurrenceId, s(o, t.recurrenceId)), d(
|
|
101
|
+
d(l, t.originalStart, s(o, t.originalStart)), d(l, t.recurrenceId, s(o, t.recurrenceId)), d(
|
|
102
|
+
l,
|
|
103
|
+
t.recurrenceExceptions,
|
|
104
|
+
s(o, t.recurrenceExceptions)
|
|
105
|
+
), m.push(l);
|
|
96
106
|
}
|
|
97
107
|
else if (Array.isArray(e.dataItem))
|
|
98
108
|
e.dataItem.map((o) => {
|
|
@@ -151,10 +161,7 @@ const ce = a.forwardRef((r, ie) => {
|
|
|
151
161
|
target: b.current
|
|
152
162
|
});
|
|
153
163
|
},
|
|
154
|
-
[
|
|
155
|
-
H,
|
|
156
|
-
b
|
|
157
|
-
]
|
|
164
|
+
[H, b]
|
|
158
165
|
), be = a.useCallback(
|
|
159
166
|
(e, i) => {
|
|
160
167
|
g(e, {
|
|
@@ -162,10 +169,7 @@ const ce = a.forwardRef((r, ie) => {
|
|
|
162
169
|
target: b.current
|
|
163
170
|
});
|
|
164
171
|
},
|
|
165
|
-
[
|
|
166
|
-
g,
|
|
167
|
-
b
|
|
168
|
-
]
|
|
172
|
+
[g, b]
|
|
169
173
|
), ke = a.useCallback(
|
|
170
174
|
(e) => {
|
|
171
175
|
e.value && g(e.value, {
|
|
@@ -174,10 +178,7 @@ const ce = a.forwardRef((r, ie) => {
|
|
|
174
178
|
nativeEvent: e.nativeEvent
|
|
175
179
|
});
|
|
176
180
|
},
|
|
177
|
-
[
|
|
178
|
-
g,
|
|
179
|
-
b
|
|
180
|
-
]
|
|
181
|
+
[g, b]
|
|
181
182
|
), Ie = a.useCallback(
|
|
182
183
|
(e) => {
|
|
183
184
|
var l, u;
|
|
@@ -201,22 +202,13 @@ const ce = a.forwardRef((r, ie) => {
|
|
|
201
202
|
g(i, e);
|
|
202
203
|
},
|
|
203
204
|
[g]
|
|
204
|
-
), ye = a.useCallback(
|
|
205
|
-
()
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
f.current && (f.current.style.boxShadow = "0 0.5px 0.5px 0.5px rgba(0, 0, 0, .12)");
|
|
212
|
-
},
|
|
213
|
-
[f]
|
|
214
|
-
), Se = a.useCallback(
|
|
215
|
-
() => {
|
|
216
|
-
f.current && (f.current.style.boxShadow = "");
|
|
217
|
-
},
|
|
218
|
-
[f]
|
|
219
|
-
), Ce = a.useMemo(
|
|
205
|
+
), ye = a.useCallback(() => {
|
|
206
|
+
z(!S);
|
|
207
|
+
}, [z, S]), xe = a.useCallback(() => {
|
|
208
|
+
f.current && (f.current.style.boxShadow = "0 0.5px 0.5px 0.5px rgba(0, 0, 0, .12)");
|
|
209
|
+
}, [f]), Se = a.useCallback(() => {
|
|
210
|
+
f.current && (f.current.style.boxShadow = "");
|
|
211
|
+
}, [f]), Ce = a.useMemo(
|
|
220
212
|
() => {
|
|
221
213
|
var e;
|
|
222
214
|
return { ...r.style, height: (e = r.height) != null ? e : h.height };
|
|
@@ -294,13 +286,7 @@ const ce = a.forwardRef((r, ie) => {
|
|
|
294
286
|
"aria-label": q,
|
|
295
287
|
onClick: Ie
|
|
296
288
|
}
|
|
297
|
-
))), /* @__PURE__ */ a.createElement(
|
|
298
|
-
Xe,
|
|
299
|
-
{
|
|
300
|
-
value: p,
|
|
301
|
-
onChange: ke
|
|
302
|
-
}
|
|
303
|
-
), /* @__PURE__ */ a.createElement(Qe, null), /* @__PURE__ */ a.createElement(Ye, null)),
|
|
289
|
+
))), /* @__PURE__ */ a.createElement(Xe, { value: p, onChange: ke }), /* @__PURE__ */ a.createElement(Qe, null), /* @__PURE__ */ a.createElement(Ye, null)),
|
|
304
290
|
c && /* @__PURE__ */ a.createElement(
|
|
305
291
|
c.type,
|
|
306
292
|
{
|
|
@@ -321,19 +307,10 @@ const ce = a.forwardRef((r, ie) => {
|
|
|
321
307
|
...c.props
|
|
322
308
|
}
|
|
323
309
|
),
|
|
324
|
-
/* @__PURE__ */ a.createElement(Ve, null, _ && _ < 24 * 60 && /* @__PURE__ */ a.createElement(Ze, null, /* @__PURE__ */ a.createElement(
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
onClick: ye,
|
|
329
|
-
icon: "clock",
|
|
330
|
-
svgIcon: et
|
|
331
|
-
},
|
|
332
|
-
C.toLanguageString(
|
|
333
|
-
S ? re : ae,
|
|
334
|
-
T[S ? re : ae]
|
|
335
|
-
)
|
|
336
|
-
))),
|
|
310
|
+
/* @__PURE__ */ a.createElement(Ve, null, _ && _ < 24 * 60 && /* @__PURE__ */ a.createElement(Ze, null, /* @__PURE__ */ a.createElement(R, { tabIndex: -1, onClick: ye, icon: "clock", svgIcon: et }, C.toLanguageString(
|
|
311
|
+
S ? re : ae,
|
|
312
|
+
T[S ? re : ae]
|
|
313
|
+
)))),
|
|
337
314
|
ue && /* @__PURE__ */ a.createElement(_e, null)
|
|
338
315
|
)
|
|
339
316
|
);
|
package/components/BaseView.mjs
CHANGED
|
@@ -43,16 +43,7 @@ const g = e.forwardRef((t, n) => {
|
|
|
43
43
|
focusedItems: [p, h],
|
|
44
44
|
focusedSlots: [f, I]
|
|
45
45
|
},
|
|
46
|
-
/* @__PURE__ */ e.createElement(
|
|
47
|
-
"div",
|
|
48
|
-
{
|
|
49
|
-
ref: s,
|
|
50
|
-
style: t.style,
|
|
51
|
-
className: N,
|
|
52
|
-
role: "presentation"
|
|
53
|
-
},
|
|
54
|
-
t.children
|
|
55
|
-
)
|
|
46
|
+
/* @__PURE__ */ e.createElement("div", { ref: s, style: t.style, className: N, role: "presentation" }, t.children)
|
|
56
47
|
);
|
|
57
48
|
});
|
|
58
49
|
g.displayName = "KendoReactSchedulerBaseView";
|
|
@@ -32,58 +32,43 @@ const X = (e) => {
|
|
|
32
32
|
}), r;
|
|
33
33
|
}, Y = (e, r) => {
|
|
34
34
|
const c = M(e);
|
|
35
|
-
return c.setHours(
|
|
36
|
-
r.getHours(),
|
|
37
|
-
r.getMinutes(),
|
|
38
|
-
r.getSeconds(),
|
|
39
|
-
r.getMilliseconds()
|
|
40
|
-
), c;
|
|
35
|
+
return c.setHours(r.getHours(), r.getMinutes(), r.getSeconds(), r.getMilliseconds()), c;
|
|
41
36
|
}, K = (e) => {
|
|
42
|
-
const [r, c] = n.useState(!1), i = H(), y = N(), h = n.useRef(void 0), a = n.useRef(null), o = n.useRef(null), g = e.updateInterval || V.updateInterval, [, R] = n.useState(!1), u = C(o, y.rtl === !0 ? "rtl" : void 0), [v] = O(), m = n.useCallback(
|
|
43
|
-
()
|
|
44
|
-
|
|
37
|
+
const [r, c] = n.useState(!1), i = H(), y = N(), h = n.useRef(void 0), a = n.useRef(null), o = n.useRef(null), g = e.updateInterval || V.updateInterval, [, R] = n.useState(!1), u = C(o, y.rtl === !0 ? "rtl" : void 0), [v] = O(), m = n.useCallback(() => {
|
|
38
|
+
if (!v)
|
|
39
|
+
return;
|
|
40
|
+
const s = v.filter(
|
|
41
|
+
(t) => t.current && (e.groupIndex === void 0 || e.groupIndex === null || t.current.props.group.index === e.groupIndex) && (e.vertical ? P(/* @__PURE__ */ new Date(), /* @__PURE__ */ new Date(), t.current.props.start, t.current.props.end, !0) : $(/* @__PURE__ */ new Date(), t.current.props.start, t.current.props.end)) && !t.current.props.isAllDay
|
|
42
|
+
);
|
|
43
|
+
if (s && s.length && a.current && o.current) {
|
|
44
|
+
const t = A(s);
|
|
45
|
+
if (!t.current)
|
|
45
46
|
return;
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
() => {
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
);
|
|
63
|
-
n.useEffect(
|
|
64
|
-
() => {
|
|
65
|
-
if (!i.current || !window)
|
|
66
|
-
return;
|
|
67
|
-
clearInterval(h.current), h.current = window.setInterval(w, g);
|
|
68
|
-
const s = window.ResizeObserver, t = s && new s(w);
|
|
69
|
-
return t && t.observe(i.current), () => {
|
|
70
|
-
clearInterval(h.current), t && t.disconnect();
|
|
71
|
-
};
|
|
72
|
-
},
|
|
73
|
-
[m, w, i, g]
|
|
74
|
-
), n.useEffect(m);
|
|
47
|
+
const S = e.vertical ? F(s) : X(s), l = d(t.current.element), I = d(a.current), k = (e.vertical ? l.width : l.height) / (t.current.props.end.getTime() - t.current.props.start.getTime()), D = (Date.now() - Y(/* @__PURE__ */ new Date(), t.current.props.start).getTime()) * k, E = u === "rtl", b = e.vertical ? l.top : l.top + D - I.height / 2, f = E ? "right" : "left", p = e.vertical ? l[f] + D - I.width / 2 : l[f];
|
|
48
|
+
e.vertical ? a.current.style[f] = `${p}px` : a.current.style.top = `${b}px`, o.current.style[f] = `${p}px`, o.current.style.top = `${b}px`, o.current.style[e.vertical ? "height" : "width"] = `${S - 1}px`, c(!0);
|
|
49
|
+
} else
|
|
50
|
+
c(!1);
|
|
51
|
+
}, [v, e.groupIndex, e.vertical, u]), w = n.useCallback(() => {
|
|
52
|
+
m(), R((s) => !s);
|
|
53
|
+
}, [m]);
|
|
54
|
+
n.useEffect(() => {
|
|
55
|
+
if (!i.current || !window)
|
|
56
|
+
return;
|
|
57
|
+
clearInterval(h.current), h.current = window.setInterval(w, g);
|
|
58
|
+
const s = window.ResizeObserver, t = s && new s(w);
|
|
59
|
+
return t && t.observe(i.current), () => {
|
|
60
|
+
clearInterval(h.current), t && t.disconnect();
|
|
61
|
+
};
|
|
62
|
+
}, [m, w, i, g]), n.useEffect(m);
|
|
75
63
|
const x = /* @__PURE__ */ n.createElement(
|
|
76
64
|
"div",
|
|
77
65
|
{
|
|
78
66
|
ref: a,
|
|
79
|
-
className: z(
|
|
80
|
-
"k-current-time",
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
"k-current-time-arrow-down": e.vertical
|
|
85
|
-
}
|
|
86
|
-
),
|
|
67
|
+
className: z("k-current-time", {
|
|
68
|
+
"k-current-time-arrow-right": !e.vertical && u !== "rtl",
|
|
69
|
+
"k-current-time-arrow-left": !e.vertical && u === "rtl",
|
|
70
|
+
"k-current-time-arrow-down": e.vertical
|
|
71
|
+
}),
|
|
87
72
|
style: {
|
|
88
73
|
transform: e.vertical ? u === "rtl" ? "translateX(50%)" : "translateX(-50%)" : "translateY(-50%)",
|
|
89
74
|
visibility: r ? void 0 : "hidden"
|
|
@@ -10,10 +10,7 @@ import * as e from "react";
|
|
|
10
10
|
import { useInternationalization as d } from "@progress/kendo-react-intl";
|
|
11
11
|
import { classNames as u } from "@progress/kendo-react-common";
|
|
12
12
|
const f = e.forwardRef((t, s) => {
|
|
13
|
-
const {
|
|
14
|
-
as: n = l.as,
|
|
15
|
-
...m
|
|
16
|
-
} = t, a = e.useRef(null), r = e.useRef(null), c = d(), o = e.useMemo(
|
|
13
|
+
const { as: n = l.as, ...m } = t, a = e.useRef(null), r = e.useRef(null), c = d(), o = e.useMemo(
|
|
17
14
|
() => u("k-scheduler-cell k-heading-cell", t.className),
|
|
18
15
|
[t.className]
|
|
19
16
|
);
|
|
@@ -27,10 +24,7 @@ const f = e.forwardRef((t, s) => {
|
|
|
27
24
|
...m,
|
|
28
25
|
className: o
|
|
29
26
|
},
|
|
30
|
-
/* @__PURE__ */ e.createElement("span", { className: "k-link k-nav-day" }, c.formatDate(
|
|
31
|
-
t.date,
|
|
32
|
-
t.format ? t.format : l.format
|
|
33
|
-
))
|
|
27
|
+
/* @__PURE__ */ e.createElement("span", { className: "k-link k-nav-day" }, c.formatDate(t.date, t.format ? t.format : l.format))
|
|
34
28
|
);
|
|
35
29
|
}), l = {
|
|
36
30
|
as: e.forwardRef(({ as: t, format: s, start: n, end: m, ...a }, r) => /* @__PURE__ */ e.createElement("div", { ...a, ref: r })),
|
|
@@ -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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("react"),z=require("react-dom"),A=require("@progress/kendo-react-common"),R=require("@progress/kendo-react-buttons"),N=require("@progress/kendo-react-form"),D=require("@progress/kendo-react-dialogs"),H=require("@progress/kendo-react-intl"),K=require("../editors/SchedulerFormEditor.js"),a=require("../messages/index.js"),E=require("@progress/kendo-svg-icons"),U=require("../context/SchedulerContext.js");function F(r){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("react"),z=require("react-dom"),A=require("@progress/kendo-react-common"),R=require("@progress/kendo-react-buttons"),N=require("@progress/kendo-react-form"),D=require("@progress/kendo-react-dialogs"),H=require("@progress/kendo-react-intl"),K=require("../editors/SchedulerFormEditor.js"),a=require("../messages/index.js"),E=require("@progress/kendo-svg-icons"),U=require("../context/SchedulerContext.js");function F(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=F(x),W=F(z),y=e.forwardRef((r,c)=>{const{onCancel:s,onClose:l,onSubmit:u,editor:I,dialog:O=b.dialog,validator:C=b.validator,...T}=r,d=e.useRef(null);e.useImperativeHandle(d,()=>({props:r})),e.useImperativeHandle(c,()=>d.current);const i=H.useLocalization(),n=U.useSchedulerFieldsContext(),f=e.useMemo(()=>i.toLanguageString(a.editorValidationRequired,a.messages[a.editorValidationRequired]),[i]),k=e.useMemo(()=>i.toLanguageString(a.editorValidationEnd,a.messages[a.editorValidationEnd]),[i]),p=e.useMemo(()=>i.toLanguageString(a.editorSave,a.messages[a.editorSave]),[i]),L=e.useMemo(()=>i.toLanguageString(a.editorCancel,a.messages[a.editorCancel]),[i]),V=e.useMemo(()=>i.toLanguageString(a.editorTitle,a.messages[a.editorTitle]),[i]),M=e.useMemo(()=>i.toLanguageString(a.editorValidationStart,a.messages[a.editorValidationStart]),[i]),B=e.useCallback(t=>{s&&s.call(void 0,{value:null,syntheticEvent:t,target:d.current})},[s]),j=e.useCallback(({syntheticEvent:t})=>{l&&l.call(void 0,{value:null,syntheticEvent:t,target:d.current})},[l]),_=e.useCallback((t,o)=>{u&&u.call(void 0,{value:t,syntheticEvent:o,target:d.current})},[u]),h=e.useCallback((t,o)=>t&&o(n.end)&&t.getTime()>o(n.end).getTime()?M:void 0,[n,M]),q=e.useCallback((t,o)=>t&&o(n.start)&&t.getTime()<o(n.start).getTime()?k:void 0,[n,k]),g=e.useCallback(t=>t?void 0:f,[f]),P=e.useCallback((t,o)=>{const m={};m[n.start]=[g(o(n.start)),h(o(n.start),o)].filter(Boolean).reduce((S,v)=>S||v,""),m[n.end]=[g(o(n.start)),q(o(n.start),o)].filter(Boolean).reduce((S,v)=>S||v,"");const w=C(t,o);return{...m,...w}},[q,n.end,n.start,g,h,C]);return A.canUseDOM?W.createPortal(e.createElement(N.Form,{initialValues:r.dataItem,onSubmit:_,validator:P,render:t=>e.createElement(O,{title:V,minWidth:400,onClose:j,className:"k-scheduler-edit-dialog"},e.createElement(K.SchedulerFormEditor,{...t,as:I}),e.createElement(D.DialogActionsBar,{layout:"start"},e.createElement(R.Button,{themeColor:"primary",disabled:!t.allowSubmit,onClick:t.onSubmit,icon:"save",svgIcon:E.saveIcon},p),e.createElement(R.Button,{onClick:B,icon:"cancel",svgIcon:E.cancelIcon},L))),...T}),document&&document.body):null}),b={dialog:D.Dialog,validator:()=>({})};y.displayName="KendoReactSchedulerForm";exports.SchedulerForm=y;exports.schedulerFormDefaultProps=b;
|
|
@@ -14,33 +14,63 @@ import { Form as W } from "@progress/kendo-react-form";
|
|
|
14
14
|
import { DialogActionsBar as j, Dialog as J } from "@progress/kendo-react-dialogs";
|
|
15
15
|
import { useLocalization as P } from "@progress/kendo-react-intl";
|
|
16
16
|
import { SchedulerFormEditor as Q } from "../editors/SchedulerFormEditor.mjs";
|
|
17
|
-
import { editorValidationRequired as k, messages as n, editorValidationEnd as E, editorSave as I, editorCancel as L, editorTitle as
|
|
17
|
+
import { editorValidationRequired as k, messages as n, editorValidationEnd as E, editorSave as I, editorCancel as L, editorTitle as D, editorValidationStart as F } from "../messages/index.mjs";
|
|
18
18
|
import { saveIcon as X, cancelIcon as Y } from "@progress/kendo-svg-icons";
|
|
19
19
|
import { useSchedulerFieldsContext as Z } from "../context/SchedulerContext.mjs";
|
|
20
|
-
const _ = e.forwardRef((r,
|
|
20
|
+
const _ = e.forwardRef((r, T) => {
|
|
21
21
|
const {
|
|
22
22
|
onCancel: s,
|
|
23
23
|
onClose: c,
|
|
24
24
|
onSubmit: d,
|
|
25
|
-
editor:
|
|
26
|
-
dialog:
|
|
27
|
-
validator: S =
|
|
25
|
+
editor: y,
|
|
26
|
+
dialog: B = R.dialog,
|
|
27
|
+
validator: S = R.validator,
|
|
28
28
|
...V
|
|
29
29
|
} = r, l = e.useRef(null);
|
|
30
|
-
e.useImperativeHandle(l, () => ({ props: r })), e.useImperativeHandle(
|
|
31
|
-
const i = P(), o = Z(), C = e.useMemo(
|
|
30
|
+
e.useImperativeHandle(l, () => ({ props: r })), e.useImperativeHandle(T, () => l.current);
|
|
31
|
+
const i = P(), o = Z(), C = e.useMemo(
|
|
32
|
+
() => i.toLanguageString(k, n[k]),
|
|
33
|
+
[i]
|
|
34
|
+
), f = e.useMemo(
|
|
35
|
+
() => i.toLanguageString(E, n[E]),
|
|
36
|
+
[i]
|
|
37
|
+
), q = e.useMemo(
|
|
38
|
+
() => i.toLanguageString(I, n[I]),
|
|
39
|
+
[i]
|
|
40
|
+
), A = e.useMemo(
|
|
41
|
+
() => i.toLanguageString(L, n[L]),
|
|
42
|
+
[i]
|
|
43
|
+
), w = e.useMemo(
|
|
44
|
+
() => i.toLanguageString(D, n[D]),
|
|
45
|
+
[i]
|
|
46
|
+
), b = e.useMemo(
|
|
47
|
+
() => i.toLanguageString(F, n[F]),
|
|
48
|
+
[i]
|
|
49
|
+
), x = e.useCallback(
|
|
32
50
|
(t) => {
|
|
33
|
-
s && s.call(void 0, {
|
|
51
|
+
s && s.call(void 0, {
|
|
52
|
+
value: null,
|
|
53
|
+
syntheticEvent: t,
|
|
54
|
+
target: l.current
|
|
55
|
+
});
|
|
34
56
|
},
|
|
35
57
|
[s]
|
|
36
58
|
), z = e.useCallback(
|
|
37
59
|
({ syntheticEvent: t }) => {
|
|
38
|
-
c && c.call(void 0, {
|
|
60
|
+
c && c.call(void 0, {
|
|
61
|
+
value: null,
|
|
62
|
+
syntheticEvent: t,
|
|
63
|
+
target: l.current
|
|
64
|
+
});
|
|
39
65
|
},
|
|
40
66
|
[c]
|
|
41
67
|
), H = e.useCallback(
|
|
42
68
|
(t, a) => {
|
|
43
|
-
d && d.call(void 0, {
|
|
69
|
+
d && d.call(void 0, {
|
|
70
|
+
value: t,
|
|
71
|
+
syntheticEvent: a,
|
|
72
|
+
target: l.current
|
|
73
|
+
});
|
|
44
74
|
},
|
|
45
75
|
[d]
|
|
46
76
|
), M = e.useCallback(
|
|
@@ -54,7 +84,7 @@ const _ = e.forwardRef((r, R) => {
|
|
|
54
84
|
[C]
|
|
55
85
|
), N = e.useCallback(
|
|
56
86
|
(t, a) => {
|
|
57
|
-
|
|
87
|
+
const u = {};
|
|
58
88
|
u[o.start] = [
|
|
59
89
|
m(a(o.start)),
|
|
60
90
|
M(a(o.start), a)
|
|
@@ -75,14 +105,14 @@ const _ = e.forwardRef((r, R) => {
|
|
|
75
105
|
onSubmit: H,
|
|
76
106
|
validator: N,
|
|
77
107
|
render: (t) => /* @__PURE__ */ e.createElement(
|
|
78
|
-
|
|
108
|
+
B,
|
|
79
109
|
{
|
|
80
110
|
title: w,
|
|
81
111
|
minWidth: 400,
|
|
82
112
|
onClose: z,
|
|
83
113
|
className: "k-scheduler-edit-dialog"
|
|
84
114
|
},
|
|
85
|
-
/* @__PURE__ */ e.createElement(Q, { ...t, as:
|
|
115
|
+
/* @__PURE__ */ e.createElement(Q, { ...t, as: y }),
|
|
86
116
|
/* @__PURE__ */ e.createElement(j, { layout: "start" }, /* @__PURE__ */ e.createElement(
|
|
87
117
|
p,
|
|
88
118
|
{
|
|
@@ -93,27 +123,19 @@ const _ = e.forwardRef((r, R) => {
|
|
|
93
123
|
svgIcon: X
|
|
94
124
|
},
|
|
95
125
|
q
|
|
96
|
-
), /* @__PURE__ */ e.createElement(
|
|
97
|
-
p,
|
|
98
|
-
{
|
|
99
|
-
onClick: x,
|
|
100
|
-
icon: "cancel",
|
|
101
|
-
svgIcon: Y
|
|
102
|
-
},
|
|
103
|
-
A
|
|
104
|
-
))
|
|
126
|
+
), /* @__PURE__ */ e.createElement(p, { onClick: x, icon: "cancel", svgIcon: Y }, A))
|
|
105
127
|
),
|
|
106
128
|
...V
|
|
107
129
|
}
|
|
108
130
|
),
|
|
109
131
|
document && document.body
|
|
110
132
|
) : null;
|
|
111
|
-
}),
|
|
133
|
+
}), R = {
|
|
112
134
|
dialog: J,
|
|
113
135
|
validator: () => ({})
|
|
114
136
|
};
|
|
115
137
|
_.displayName = "KendoReactSchedulerForm";
|
|
116
138
|
export {
|
|
117
139
|
_ as SchedulerForm,
|
|
118
|
-
|
|
140
|
+
R as schedulerFormDefaultProps
|
|
119
141
|
};
|
|
@@ -14,13 +14,11 @@ import { messages as H, editorOccurrence as I, editorSeries as L, editorRecurrin
|
|
|
14
14
|
import { canUseDOM as U } from "@progress/kendo-react-common";
|
|
15
15
|
import { Button as s } from "@progress/kendo-react-buttons";
|
|
16
16
|
const j = e.forwardRef((a, u) => {
|
|
17
|
-
const {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
} = a, c = e.useRef(null);
|
|
23
|
-
e.useImperativeHandle(c, () => ({ props: a })), e.useImperativeHandle(u, () => c.current);
|
|
17
|
+
const { isRemove: n, onClose: o, onSeriesClick: i, onOccurrenceClick: l } = a, c = e.useRef(null);
|
|
18
|
+
e.useImperativeHandle(c, () => ({ props: a })), e.useImperativeHandle(
|
|
19
|
+
u,
|
|
20
|
+
() => c.current
|
|
21
|
+
);
|
|
24
22
|
const g = B(), r = (t) => g.toLanguageString(t, H[t]), d = r(I), m = r(L), f = r(w), C = r(x), M = r(A), R = r(K), S = r(N), v = r(P), D = n ? S : C, O = n ? v : f, k = n ? M : d, p = n ? R : m, h = e.useCallback(
|
|
25
23
|
({ syntheticEvent: t }) => {
|
|
26
24
|
o && o.call(void 0, { syntheticEvent: t, value: null, target: c.current });
|