@progress/kendo-react-scheduler 7.2.4-develop.2 → 7.2.4-develop.4

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 (301) hide show
  1. package/Scheduler.js +8 -0
  2. package/Scheduler.mjs +389 -0
  3. package/components/BaseView.js +8 -0
  4. package/components/BaseView.mjs +61 -0
  5. package/components/CurrentTimeMarket.js +8 -0
  6. package/components/CurrentTimeMarket.mjs +110 -0
  7. package/components/DateHeaderCell.js +8 -0
  8. package/components/DateHeaderCell.mjs +43 -0
  9. package/components/SchedulerForm.js +8 -0
  10. package/components/SchedulerForm.mjs +119 -0
  11. package/components/SchedulerOccurrenceDialog.js +8 -0
  12. package/components/SchedulerOccurrenceDialog.mjs +48 -0
  13. package/components/SchedulerRemoveDialog.js +8 -0
  14. package/components/SchedulerRemoveDialog.mjs +50 -0
  15. package/components/ShowMoreItemsButton.js +8 -0
  16. package/components/ShowMoreItemsButton.mjs +49 -0
  17. package/components/TimeHeaderCell.js +8 -0
  18. package/components/TimeHeaderCell.mjs +43 -0
  19. package/components/footer/SchedulerFooter.js +8 -0
  20. package/components/footer/SchedulerFooter.mjs +35 -0
  21. package/components/footer/bussiness-hours/BussinessHours.js +8 -0
  22. package/components/footer/bussiness-hours/BussinessHours.mjs +31 -0
  23. package/components/header/SchedulerHeader.js +8 -0
  24. package/components/header/SchedulerHeader.mjs +35 -0
  25. package/components/header/navigation/NavigationDatePicker.js +8 -0
  26. package/components/header/navigation/NavigationDatePicker.mjs +113 -0
  27. package/components/header/navigation/SchedulerNavigation.js +8 -0
  28. package/components/header/navigation/SchedulerNavigation.mjs +32 -0
  29. package/components/header/view-selector/SchedulerViewSelector.js +8 -0
  30. package/components/header/view-selector/SchedulerViewSelector.mjs +32 -0
  31. package/components/header/view-selector/ViewSelectorItem.js +8 -0
  32. package/components/header/view-selector/ViewSelectorItem.mjs +39 -0
  33. package/components/header/view-selector/ViewSelectorList.js +8 -0
  34. package/components/header/view-selector/ViewSelectorList.mjs +65 -0
  35. package/constants/index.js +8 -0
  36. package/constants/index.mjs +28 -0
  37. package/context/SchedulerContext.js +8 -0
  38. package/context/SchedulerContext.mjs +78 -0
  39. package/context/SchedulerEditItemContext.js +8 -0
  40. package/context/SchedulerEditItemContext.mjs +51 -0
  41. package/context/SchedulerEditSlotContext.js +8 -0
  42. package/context/SchedulerEditSlotContext.mjs +25 -0
  43. package/context/SchedulerEditTaskContext.js +8 -0
  44. package/context/SchedulerEditTaskContext.mjs +16 -0
  45. package/context/SchedulerResourceIteratorContext.js +8 -0
  46. package/context/SchedulerResourceIteratorContext.mjs +16 -0
  47. package/context/SchedulerViewContext.js +8 -0
  48. package/context/SchedulerViewContext.mjs +60 -0
  49. package/dist/cdn/js/kendo-react-scheduler.js +8 -5
  50. package/editors/FilterableComboBox.js +8 -0
  51. package/editors/FilterableComboBox.mjs +37 -0
  52. package/editors/ResourceEditor.js +8 -0
  53. package/editors/ResourceEditor.mjs +71 -0
  54. package/editors/SchedulerFormEditor.js +8 -0
  55. package/editors/SchedulerFormEditor.mjs +368 -0
  56. package/editors/ZonedDateTime.js +8 -0
  57. package/editors/ZonedDateTime.mjs +44 -0
  58. package/hooks/use-items-focus.js +8 -0
  59. package/hooks/use-items-focus.mjs +42 -0
  60. package/hooks/use-items-selection.js +8 -0
  61. package/hooks/use-items-selection.mjs +67 -0
  62. package/hooks/use-slots-focus.js +8 -0
  63. package/hooks/use-slots-focus.mjs +49 -0
  64. package/hooks/use-slots-selection.js +8 -0
  65. package/hooks/use-slots-selection.mjs +37 -0
  66. package/hooks/useCellSync.js +8 -0
  67. package/hooks/useCellSync.mjs +29 -0
  68. package/hooks/useControlledState.js +8 -0
  69. package/hooks/useControlledState.mjs +21 -0
  70. package/hooks/useEditable.js +8 -0
  71. package/hooks/useEditable.mjs +24 -0
  72. package/hooks/useRowSync.js +8 -0
  73. package/hooks/useRowSync.mjs +32 -0
  74. package/hooks/useSchedulerItem.js +8 -0
  75. package/hooks/useSchedulerItem.mjs +31 -0
  76. package/hooks/useSchedulerSlot.js +8 -0
  77. package/hooks/useSchedulerSlot.mjs +31 -0
  78. package/hooks/useSlotExpand.js +8 -0
  79. package/hooks/useSlotExpand.mjs +67 -0
  80. package/index.d.mts +4220 -5
  81. package/index.d.ts +4220 -45
  82. package/index.js +8 -5
  83. package/index.mjs +145 -5878
  84. package/items/SchedulerEditItem.js +8 -0
  85. package/items/SchedulerEditItem.mjs +610 -0
  86. package/items/SchedulerItem.js +8 -0
  87. package/items/SchedulerItem.mjs +328 -0
  88. package/items/SchedulerItemContent.js +8 -0
  89. package/items/SchedulerItemContent.mjs +23 -0
  90. package/items/SchedulerProportionalViewItem.js +8 -0
  91. package/items/SchedulerProportionalViewItem.mjs +120 -0
  92. package/items/SchedulerViewItem.js +8 -0
  93. package/items/SchedulerViewItem.mjs +128 -0
  94. package/items/hooks/use-drag-item.js +8 -0
  95. package/items/hooks/use-drag-item.mjs +118 -0
  96. package/items/hooks/use-form-item.js +8 -0
  97. package/items/hooks/use-form-item.mjs +46 -0
  98. package/items/hooks/use-remove-item.js +8 -0
  99. package/items/hooks/use-remove-item.mjs +40 -0
  100. package/items/hooks/use-resize-item.js +8 -0
  101. package/items/hooks/use-resize-item.mjs +145 -0
  102. package/items/hooks/use-series.js +8 -0
  103. package/items/hooks/use-series.mjs +32 -0
  104. package/items/hooks/use-show-occurrence-dialog.js +8 -0
  105. package/items/hooks/use-show-occurrence-dialog.mjs +36 -0
  106. package/items/hooks/use-show-remove-item-dialog.js +8 -0
  107. package/items/hooks/use-show-remove-item-dialog.mjs +36 -0
  108. package/messages/index.js +8 -0
  109. package/messages/index.mjs +167 -0
  110. package/package-metadata.js +8 -0
  111. package/package-metadata.mjs +19 -0
  112. package/package.json +10 -10
  113. package/recurrence/RecurrenceEditor.js +8 -0
  114. package/recurrence/RecurrenceEditor.mjs +438 -0
  115. package/recurrence/RecurrenceFrequencyEditor.js +8 -0
  116. package/recurrence/RecurrenceFrequencyEditor.mjs +41 -0
  117. package/recurrence/RecurrenceRepeatOnWeekEditor.js +8 -0
  118. package/recurrence/RecurrenceRepeatOnWeekEditor.mjs +35 -0
  119. package/recurrence/common.js +8 -0
  120. package/recurrence/common.mjs +127 -0
  121. package/services/itemsService.js +8 -0
  122. package/services/itemsService.mjs +56 -0
  123. package/services/occurrenceService.js +8 -0
  124. package/services/occurrenceService.mjs +49 -0
  125. package/services/rangeService.js +8 -0
  126. package/services/rangeService.mjs +26 -0
  127. package/services/slotsService.js +8 -0
  128. package/services/slotsService.mjs +39 -0
  129. package/slots/SchedulerEditSlot.js +8 -0
  130. package/slots/SchedulerEditSlot.mjs +191 -0
  131. package/slots/SchedulerSlot.js +8 -0
  132. package/slots/SchedulerSlot.mjs +175 -0
  133. package/slots/SchedulerViewSlot.js +8 -0
  134. package/slots/SchedulerViewSlot.mjs +24 -0
  135. package/tasks/SchedulerEditTask.js +8 -0
  136. package/tasks/SchedulerEditTask.mjs +157 -0
  137. package/tasks/SchedulerTask.js +8 -0
  138. package/tasks/SchedulerTask.mjs +67 -0
  139. package/tasks/SchedulerViewTask.js +8 -0
  140. package/tasks/SchedulerViewTask.mjs +23 -0
  141. package/utils/index.js +8 -0
  142. package/utils/index.mjs +171 -0
  143. package/views/agenda/AgendaView.js +8 -0
  144. package/views/agenda/AgendaView.mjs +147 -0
  145. package/views/common/HorizontalResourceIterator.js +8 -0
  146. package/views/common/HorizontalResourceIterator.mjs +38 -0
  147. package/views/common/SchedulerDrag.js +8 -0
  148. package/views/common/SchedulerDrag.mjs +44 -0
  149. package/views/common/SchedulerResize.js +8 -0
  150. package/views/common/SchedulerResize.mjs +48 -0
  151. package/views/common/VerticalResourceIterator.js +8 -0
  152. package/views/common/VerticalResourceIterator.mjs +78 -0
  153. package/views/common/utils.js +8 -0
  154. package/views/common/utils.mjs +75 -0
  155. package/views/day/DayView.js +8 -0
  156. package/views/day/DayView.mjs +27 -0
  157. package/views/day/DayViewAllDayRowContent.js +8 -0
  158. package/views/day/DayViewAllDayRowContent.mjs +18 -0
  159. package/views/day/DayViewGroupRowContent.js +8 -0
  160. package/views/day/DayViewGroupRowContent.mjs +13 -0
  161. package/views/day/DayViewRowContent.js +8 -0
  162. package/views/day/DayViewRowContent.mjs +32 -0
  163. package/views/day/MultiDayView.js +8 -0
  164. package/views/day/MultiDayView.mjs +376 -0
  165. package/views/month/MonthView.js +8 -0
  166. package/views/month/MonthView.mjs +155 -0
  167. package/views/time/MultiDayTimelineView.js +8 -0
  168. package/views/time/MultiDayTimelineView.mjs +264 -0
  169. package/views/time/TimelineView.js +8 -0
  170. package/views/time/TimelineView.mjs +27 -0
  171. package/views/time/TimelineViewAllEventsRowContent.js +8 -0
  172. package/views/time/TimelineViewAllEventsRowContent.mjs +18 -0
  173. package/views/time/TimelineViewRowContent.js +8 -0
  174. package/views/time/TimelineViewRowContent.mjs +13 -0
  175. package/views/week/WeekView.js +8 -0
  176. package/views/week/WeekView.mjs +44 -0
  177. package/views/week/WorkWeekView.js +8 -0
  178. package/views/week/WorkWeekView.mjs +55 -0
  179. package/Scheduler.d.ts +0 -373
  180. package/components/BaseView.d.ts +0 -22
  181. package/components/CurrentTimeMarket.d.ts +0 -14
  182. package/components/DateHeaderCell.d.ts +0 -50
  183. package/components/SchedulerForm.d.ts +0 -75
  184. package/components/SchedulerOccurrenceDialog.d.ts +0 -46
  185. package/components/SchedulerRemoveDialog.d.ts +0 -42
  186. package/components/ShowMoreItemsButton.d.ts +0 -30
  187. package/components/TimeHeaderCell.d.ts +0 -50
  188. package/components/footer/SchedulerFooter.d.ts +0 -25
  189. package/components/footer/bussiness-hours/BussinessHours.d.ts +0 -17
  190. package/components/header/SchedulerHeader.d.ts +0 -22
  191. package/components/header/navigation/NavigationDatePicker.d.ts +0 -9
  192. package/components/header/navigation/SchedulerNavigation.d.ts +0 -28
  193. package/components/header/view-selector/SchedulerViewSelector.d.ts +0 -28
  194. package/components/header/view-selector/ViewSelectorItem.d.ts +0 -12
  195. package/components/header/view-selector/ViewSelectorList.d.ts +0 -7
  196. package/constants/index.d.ts +0 -58
  197. package/context/SchedulerContext.d.ts +0 -231
  198. package/context/SchedulerEditItemContext.d.ts +0 -172
  199. package/context/SchedulerEditSlotContext.d.ts +0 -51
  200. package/context/SchedulerEditTaskContext.d.ts +0 -33
  201. package/context/SchedulerResourceIteratorContext.d.ts +0 -20
  202. package/context/SchedulerViewContext.d.ts +0 -76
  203. package/context/index.d.ts +0 -9
  204. package/editors/FilterableComboBox.d.ts +0 -8
  205. package/editors/ResourceEditor.d.ts +0 -18
  206. package/editors/SchedulerFormEditor.d.ts +0 -498
  207. package/editors/ZonedDateTime.d.ts +0 -22
  208. package/hooks/index.d.ts +0 -14
  209. package/hooks/use-items-focus.d.ts +0 -27
  210. package/hooks/use-items-selection.d.ts +0 -35
  211. package/hooks/use-slots-focus.d.ts +0 -38
  212. package/hooks/use-slots-selection.d.ts +0 -28
  213. package/hooks/useAsyncMouseEnterLeave.d.ts +0 -15
  214. package/hooks/useCellSync.d.ts +0 -14
  215. package/hooks/useControlledState.d.ts +0 -17
  216. package/hooks/useEditable.d.ts +0 -7
  217. package/hooks/usePropOrState.d.ts +0 -6
  218. package/hooks/useRowSync.d.ts +0 -15
  219. package/hooks/useSchedulerItem.d.ts +0 -11
  220. package/hooks/useSchedulerSlot.d.ts +0 -11
  221. package/hooks/useSlotExpand.d.ts +0 -9
  222. package/hooks/useWorkHours.d.ts +0 -6
  223. package/items/SchedulerEditItem.d.ts +0 -417
  224. package/items/SchedulerItem.d.ts +0 -203
  225. package/items/SchedulerItemContent.d.ts +0 -15
  226. package/items/SchedulerProportionalViewItem.d.ts +0 -16
  227. package/items/SchedulerViewItem.d.ts +0 -37
  228. package/items/hooks/use-drag-item.d.ts +0 -46
  229. package/items/hooks/use-form-item.d.ts +0 -26
  230. package/items/hooks/use-remove-item.d.ts +0 -34
  231. package/items/hooks/use-resize-item.d.ts +0 -49
  232. package/items/hooks/use-series.d.ts +0 -27
  233. package/items/hooks/use-show-occurrence-dialog.d.ts +0 -31
  234. package/items/hooks/use-show-remove-item-dialog.d.ts +0 -31
  235. package/messages/index.d.ts +0 -240
  236. package/models/DataItem.d.ts +0 -12
  237. package/models/DateRange.d.ts +0 -22
  238. package/models/EditableProp.d.ts +0 -33
  239. package/models/Fields.d.ts +0 -21
  240. package/models/Group.d.ts +0 -12
  241. package/models/Item.d.ts +0 -68
  242. package/models/Occurrence.d.ts +0 -56
  243. package/models/Omit.d.ts +0 -8
  244. package/models/Orientation.d.ts +0 -6
  245. package/models/Range.d.ts +0 -14
  246. package/models/Rect.d.ts +0 -19
  247. package/models/Resource.d.ts +0 -12
  248. package/models/SchedulerGroup.d.ts +0 -17
  249. package/models/SchedulerHandle.d.ts +0 -12
  250. package/models/SchedulerModelFields.d.ts +0 -66
  251. package/models/SchedulerResource.d.ts +0 -37
  252. package/models/SchedulerView.d.ts +0 -80
  253. package/models/Slot.d.ts +0 -54
  254. package/models/events.d.ts +0 -87
  255. package/models/index.d.ts +0 -21
  256. package/package-metadata.d.ts +0 -9
  257. package/recurrence/RecurrenceEditor.d.ts +0 -16
  258. package/recurrence/RecurrenceFrequencyEditor.d.ts +0 -14
  259. package/recurrence/RecurrenceRepeatOnWeekEditor.d.ts +0 -17
  260. package/recurrence/common.d.ts +0 -61
  261. package/recurrence/types/EndRule.d.ts +0 -8
  262. package/recurrence/types/Frequency.d.ts +0 -8
  263. package/recurrence/types/FrequencyEntity.d.ts +0 -12
  264. package/recurrence/types/MonthEntity.d.ts +0 -11
  265. package/recurrence/types/OffsetPosition.d.ts +0 -8
  266. package/recurrence/types/OffsetPositionEntity.d.ts +0 -11
  267. package/recurrence/types/RepeatOnRule.d.ts +0 -8
  268. package/recurrence/types/WeekDayEntity.d.ts +0 -11
  269. package/recurrence/types/WeekDayRule.d.ts +0 -11
  270. package/reducers/editReducer.d.ts +0 -37
  271. package/reducers/index.d.ts +0 -5
  272. package/services/index.d.ts +0 -8
  273. package/services/itemsService.d.ts +0 -16
  274. package/services/occurrenceService.d.ts +0 -7
  275. package/services/rangeService.d.ts +0 -7
  276. package/services/slotsService.d.ts +0 -10
  277. package/slots/SchedulerEditSlot.d.ts +0 -56
  278. package/slots/SchedulerSlot.d.ts +0 -131
  279. package/slots/SchedulerViewSlot.d.ts +0 -50
  280. package/tasks/SchedulerEditTask.d.ts +0 -84
  281. package/tasks/SchedulerTask.d.ts +0 -61
  282. package/tasks/SchedulerViewTask.d.ts +0 -35
  283. package/utils/index.d.ts +0 -172
  284. package/views/agenda/AgendaView.d.ts +0 -96
  285. package/views/common/HorizontalResourceIterator.d.ts +0 -30
  286. package/views/common/SchedulerDrag.d.ts +0 -43
  287. package/views/common/SchedulerResize.d.ts +0 -45
  288. package/views/common/VerticalResourceIterator.d.ts +0 -25
  289. package/views/common/utils.d.ts +0 -38
  290. package/views/day/DayView.d.ts +0 -36
  291. package/views/day/DayViewAllDayRowContent.d.ts +0 -12
  292. package/views/day/DayViewGroupRowContent.d.ts +0 -12
  293. package/views/day/DayViewRowContent.d.ts +0 -17
  294. package/views/day/MultiDayView.d.ts +0 -175
  295. package/views/month/MonthView.d.ts +0 -98
  296. package/views/time/MultiDayTimelineView.d.ts +0 -179
  297. package/views/time/TimelineView.d.ts +0 -36
  298. package/views/time/TimelineViewAllEventsRowContent.d.ts +0 -11
  299. package/views/time/TimelineViewRowContent.d.ts +0 -11
  300. package/views/week/WeekView.d.ts +0 -106
  301. package/views/week/WorkWeekView.d.ts +0 -24
@@ -0,0 +1,67 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 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 client";
9
+ import * as l from "react";
10
+ import { findNextItem as m } from "../utils/index.mjs";
11
+ var _ = /* @__PURE__ */ ((E) => (E.select = "ITEMS_SELECT_SELECT", E.selectNext = "ITEMS_SELECT_SELECT_NEXT", E.selectPrev = "ITEMS_SELECT_SELECT_PREV", E.reset = "ITEMS_SELECT_RESET", E.add = "ITEMS_SELECT_ADD", E.remove = "ITEMS_SELECT_REMOVE", E))(_ || {});
12
+ const f = (E) => {
13
+ const [s, r] = l.useState([]), T = l.useCallback(
14
+ (e, S) => {
15
+ switch (e.type) {
16
+ case "ITEMS_SELECT_SELECT":
17
+ if (!e.item)
18
+ return;
19
+ r([e.item]);
20
+ break;
21
+ case "ITEMS_SELECT_SELECT_NEXT": {
22
+ if (!e.item || !e.item.current || !E)
23
+ return;
24
+ const t = m(
25
+ e.item,
26
+ E,
27
+ e.ignoreIsAllDay,
28
+ !1
29
+ );
30
+ t && (S.preventDefault(), r([t]));
31
+ break;
32
+ }
33
+ case "ITEMS_SELECT_SELECT_PREV": {
34
+ if (!e.item || !e.item.current || !E)
35
+ return;
36
+ const t = m(
37
+ e.item,
38
+ E,
39
+ e.ignoreIsAllDay,
40
+ !0
41
+ );
42
+ t && (S.preventDefault(), r([t]));
43
+ break;
44
+ }
45
+ case "ITEMS_SELECT_RESET":
46
+ r([]);
47
+ break;
48
+ case "ITEMS_SELECT_ADD":
49
+ if (!e.item)
50
+ return;
51
+ s.some((t) => t === e.item) || r([...s, e.item]);
52
+ break;
53
+ case "ITEMS_SELECT_REMOVE":
54
+ if (!e.item)
55
+ return;
56
+ r([...s.filter((t) => t !== e.item)]);
57
+ break;
58
+ }
59
+ },
60
+ [E, s]
61
+ );
62
+ return [s, T];
63
+ };
64
+ export {
65
+ _ as ITEMS_SELECT_ACTION,
66
+ f as useItemsSelection
67
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var c=(r=>(r.up="SLOT_FOCUS_UP",r.down="SLOT_FOCUS_DOWN",r.left="SLOT_FOCUS_LEFT",r.right="SLOT_FOCUS_RIGHT",r))(c||{});const f=r=>[[],(e,t)=>{switch(e.type){case"SLOT_FOCUS_UP":{if(!e.slot.current||!r)return;const n=o(e.slot,r);n&&n.current&&n.current.element&&(t.preventDefault(),n.current.element.focus());break}case"SLOT_FOCUS_DOWN":{if(!e.slot||!r)return;const n=s(e.slot,r);n&&n.current&&n.current.element&&(t.preventDefault(),n.current.element.focus());break}case"SLOT_FOCUS_LEFT":{if(!e.slot||!r)return;const n=l(e.slot,r);n&&n.current&&n.current.element&&(t.preventDefault(),n.current.element.focus());break}case"SLOT_FOCUS_RIGHT":{if(!e.slot||!r)return;const n=p(e.slot,r);n&&n.current&&n.current.element&&(t.preventDefault(),n.current.element.focus());break}}}],o=(r,u)=>u.find(e=>e.current!==null&&r.current!==null&&e.current.props.row===r.current.props.row-1&&e.current.props.col===r.current.props.col),l=(r,u)=>u.find(e=>e.current!==null&&r.current!==null&&e.current.props.row===r.current.props.row&&e.current.props.col===r.current.props.col-1),p=(r,u)=>u.find(e=>e.current!==null&&r.current!==null&&e.current.props.row===r.current.props.row&&e.current.props.col===r.current.props.col+1),s=(r,u)=>u.find(e=>e.current!==null&&r.current!==null&&e.current.props.row===r.current.props.row+1&&e.current.props.col===r.current.props.col);exports.SLOTS_FOCUS_ACTION=c;exports.findDownSlot=s;exports.findLeftSlot=l;exports.findRightSlot=p;exports.findUpSlot=o;exports.useSlotsFocus=f;
@@ -0,0 +1,49 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 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 client";
9
+ var t = /* @__PURE__ */ ((r) => (r.up = "SLOT_FOCUS_UP", r.down = "SLOT_FOCUS_DOWN", r.left = "SLOT_FOCUS_LEFT", r.right = "SLOT_FOCUS_RIGHT", r))(t || {});
10
+ const f = (r) => [[], (e, c) => {
11
+ switch (e.type) {
12
+ case "SLOT_FOCUS_UP": {
13
+ if (!e.slot.current || !r)
14
+ return;
15
+ const n = o(e.slot, r);
16
+ n && n.current && n.current.element && (c.preventDefault(), n.current.element.focus());
17
+ break;
18
+ }
19
+ case "SLOT_FOCUS_DOWN": {
20
+ if (!e.slot || !r)
21
+ return;
22
+ const n = s(e.slot, r);
23
+ n && n.current && n.current.element && (c.preventDefault(), n.current.element.focus());
24
+ break;
25
+ }
26
+ case "SLOT_FOCUS_LEFT": {
27
+ if (!e.slot || !r)
28
+ return;
29
+ const n = l(e.slot, r);
30
+ n && n.current && n.current.element && (c.preventDefault(), n.current.element.focus());
31
+ break;
32
+ }
33
+ case "SLOT_FOCUS_RIGHT": {
34
+ if (!e.slot || !r)
35
+ return;
36
+ const n = p(e.slot, r);
37
+ n && n.current && n.current.element && (c.preventDefault(), n.current.element.focus());
38
+ break;
39
+ }
40
+ }
41
+ }], o = (r, u) => u.find((e) => e.current !== null && r.current !== null && e.current.props.row === r.current.props.row - 1 && e.current.props.col === r.current.props.col), l = (r, u) => u.find((e) => e.current !== null && r.current !== null && e.current.props.row === r.current.props.row && e.current.props.col === r.current.props.col - 1), p = (r, u) => u.find((e) => e.current !== null && r.current !== null && e.current.props.row === r.current.props.row && e.current.props.col === r.current.props.col + 1), s = (r, u) => u.find((e) => e.current !== null && r.current !== null && e.current.props.row === r.current.props.row + 1 && e.current.props.col === r.current.props.col);
42
+ export {
43
+ t as SLOTS_FOCUS_ACTION,
44
+ s as findDownSlot,
45
+ l as findLeftSlot,
46
+ p as findRightSlot,
47
+ o as findUpSlot,
48
+ f as useSlotsFocus
49
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react");function u(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const l=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,l.get?l:{enumerable:!0,get:()=>e[s]})}}return t.default=e,Object.freeze(t)}const S=u(n);var o=(e=>(e.select="SLOTS_SELECT_SELECT",e.reset="SLOTS_SELECT_RESET",e.add="SLOTS_SELECT_ADD",e))(o||{});const a=e=>{const[t,s]=S.useState([]),l=S.useCallback(r=>{switch(r.type){case"SLOTS_SELECT_SELECT":if(!r.slot)return;s([r.slot]);break;case"SLOTS_SELECT_RESET":s([]);break;case"SLOTS_SELECT_ADD":if(!r.slot)return;t.some(c=>c===r.slot)||s([...t,r.slot]);break}},[t]);return[t,l]};exports.SLOTS_SELECT_ACTION=o;exports.useSlotsSelection=a;
@@ -0,0 +1,37 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 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 client";
9
+ import * as l from "react";
10
+ var o = /* @__PURE__ */ ((s) => (s.select = "SLOTS_SELECT_SELECT", s.reset = "SLOTS_SELECT_RESET", s.add = "SLOTS_SELECT_ADD", s))(o || {});
11
+ const c = (s) => {
12
+ const [t, S] = l.useState([]), r = l.useCallback(
13
+ (e) => {
14
+ switch (e.type) {
15
+ case "SLOTS_SELECT_SELECT":
16
+ if (!e.slot)
17
+ return;
18
+ S([e.slot]);
19
+ break;
20
+ case "SLOTS_SELECT_RESET":
21
+ S([]);
22
+ break;
23
+ case "SLOTS_SELECT_ADD":
24
+ if (!e.slot)
25
+ return;
26
+ t.some((E) => E === e.slot) || S([...t, e.slot]);
27
+ break;
28
+ }
29
+ },
30
+ [t]
31
+ );
32
+ return [t, r];
33
+ };
34
+ export {
35
+ o as SLOTS_SELECT_ACTION,
36
+ c as useSlotsSelection
37
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("../views/common/utils.js"),h=require("@progress/kendo-react-common"),p=(e,b)=>{const{element:u}=e,g=()=>{if(!u||!u.current)return;let r=[],o=[],c=[];const l=u.current.querySelectorAll(e.selector);l.forEach(i=>{const n=i.getBoundingClientRect().width,t=e.explicitDepth&&e.attribute!==void 0?i.getAttribute(e.attribute):0,s=f.getPadding(i,!0),d=f.getBorders(i,!0);t!==null&&((!c[t]||d>c[t])&&(c[t]=d),(!o[t]||s>o[t])&&(o[t]=s),(!r[t]||n>r[t])&&(r[t]=n))}),l.forEach(i=>{const n=e.explicitDepth?i.getAttribute(e.attribute):0;n!==null&&(i.style.minWidth=`${r[n]-o[n]-c[n]}px`)})};h.useIsomorphicLayoutEffect(g,b)};exports.useCellSync=p;
@@ -0,0 +1,29 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 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 client";
9
+ import { getPadding as h, getBorders as p } from "../views/common/utils.mjs";
10
+ import { useIsomorphicLayoutEffect as b } from "@progress/kendo-react-common";
11
+ const x = (e, f) => {
12
+ const { element: l } = e;
13
+ b(() => {
14
+ if (!l || !l.current)
15
+ return;
16
+ let r = [], o = [], c = [];
17
+ const u = l.current.querySelectorAll(e.selector);
18
+ u.forEach((i) => {
19
+ const n = i.getBoundingClientRect().width, t = e.explicitDepth && e.attribute !== void 0 ? i.getAttribute(e.attribute) : 0, d = h(i, !0), s = p(i, !0);
20
+ t !== null && ((!c[t] || s > c[t]) && (c[t] = s), (!o[t] || d > o[t]) && (o[t] = d), (!r[t] || n > r[t]) && (r[t] = n));
21
+ }), u.forEach((i) => {
22
+ const n = e.explicitDepth ? i.getAttribute(e.attribute) : 0;
23
+ n !== null && (i.style.minWidth = `${r[n] - o[n] - c[n]}px`);
24
+ });
25
+ }, f);
26
+ };
27
+ export {
28
+ x as useCellSync
29
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react");function l(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const o=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,o.get?o:{enumerable:!0,get:()=>t[e]})}}return n.default=t,Object.freeze(n)}const s=l(i),d=(t,n,e)=>{const[o,r]=s.useState(n||t),a=s.useCallback((c,u)=>{r(c),e&&e.call(void 0,{...u,value:c})},[e,r]);return[n!==void 0?n:o,a]};exports.useControlledState=d;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 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 client";
9
+ import * as n from "react";
10
+ const u = (i, t, e) => {
11
+ const [a, s] = n.useState(t || i), d = n.useCallback(
12
+ (o, r) => {
13
+ s(o), e && e.call(void 0, { ...r, value: o });
14
+ },
15
+ [e, s]
16
+ );
17
+ return [t !== void 0 ? t : a, d];
18
+ };
19
+ export {
20
+ u as useControlledState
21
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react"),d=require("../context/SchedulerContext.js");function l(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const o=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,o.get?o:{enumerable:!0,get:()=>t[e]})}}return r.default=t,Object.freeze(r)}const f=l(i),v=t=>{const r=f.useContext(d.SchedulerPropsContext),e=t!==void 0?t:r.editable||!1,o=e===!0||e!==void 0&&e!==!1&&e.edit===!0,s=e===!0||e!==void 0&&e!==!1&&e.resize===!0,n=e===!0||e!==void 0&&e!==!1&&e.remove===!0,c=e===!0||e!==void 0&&e!==!1&&e.drag===!0,u=e===!0||e!==void 0&&e!==!1&&e.add===!0,a=e===!0||e!==void 0&&e!==!1&&e.select===!0;return{add:u,edit:o,drag:c,remove:n,resize:s,select:a}};exports.useEditable=v;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 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 client";
9
+ import * as n from "react";
10
+ import { SchedulerPropsContext as a } from "../context/SchedulerContext.mjs";
11
+ const f = (t) => {
12
+ const o = n.useContext(a), e = t !== void 0 ? t : o.editable || !1, r = e === !0 || e !== void 0 && e !== !1 && e.edit === !0, s = e === !0 || e !== void 0 && e !== !1 && e.resize === !0, d = e === !0 || e !== void 0 && e !== !1 && e.remove === !0, u = e === !0 || e !== void 0 && e !== !1 && e.drag === !0, i = e === !0 || e !== void 0 && e !== !1 && e.add === !0, c = e === !0 || e !== void 0 && e !== !1 && e.select === !0;
13
+ return {
14
+ add: i,
15
+ edit: r,
16
+ drag: u,
17
+ remove: d,
18
+ resize: s,
19
+ select: c
20
+ };
21
+ };
22
+ export {
23
+ f as useEditable
24
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react"),s=require("../views/common/utils.js"),y=require("../constants/index.js");function b(t){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const u=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(i,r,u.get?u:{enumerable:!0,get:()=>t[r]})}}return i.default=t,Object.freeze(i)}const g=b(f),h=t=>t.slice(1,t.length),d=(t,i)=>{const{element:r}=t,u=()=>{if(!r||!t.syncHeight)return;let c=[[]];Array.from(r.querySelectorAll(t.selector)).filter(e=>!e.classList.contains(h(t.applyTo))).forEach(e=>{const l=e.clientHeight,n=e.getAttribute(t.horizontalAttribute),o=e.getAttribute(t.verticalAttribute);n===null||o===null||(c[n]||(c[n]=[]),(!c[n][o]||l>c[n][o])&&(c[n][o]=l-y.BORDER_WIDTH))}),Array.from(r.querySelectorAll(t.applyTo)).forEach(e=>{const l=e.getAttribute(t.horizontalAttribute),n=e.getAttribute(t.verticalAttribute);if(l===null||n===null)return;const o=s.getPadding(e),a=c[l][n]-o;s.setRect(e,{height:a},!0)})};g.useEffect(u,i)};exports.useRowSync=d;
@@ -0,0 +1,32 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 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 client";
9
+ import * as f from "react";
10
+ import { getPadding as h, setRect as m } from "../views/common/utils.mjs";
11
+ import { BORDER_WIDTH as y } from "../constants/index.mjs";
12
+ const A = (t) => t.slice(1, t.length), R = (t, l) => {
13
+ const { element: c } = t, s = () => {
14
+ if (!c || !t.syncHeight)
15
+ return;
16
+ let i = [[]];
17
+ Array.from(c.querySelectorAll(t.selector)).filter((e) => !e.classList.contains(A(t.applyTo))).forEach((e) => {
18
+ const r = e.clientHeight, o = e.getAttribute(t.horizontalAttribute), n = e.getAttribute(t.verticalAttribute);
19
+ o === null || n === null || (i[o] || (i[o] = []), (!i[o][n] || r > i[o][n]) && (i[o][n] = r - y));
20
+ }), Array.from(c.querySelectorAll(t.applyTo)).forEach((e) => {
21
+ const r = e.getAttribute(t.horizontalAttribute), o = e.getAttribute(t.verticalAttribute);
22
+ if (r === null || o === null)
23
+ return;
24
+ const n = h(e), u = i[r][o] - n;
25
+ m(e, { height: u }, !0);
26
+ });
27
+ };
28
+ f.useEffect(s, l);
29
+ };
30
+ export {
31
+ R as useRowSync
32
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),o=require("@progress/kendo-react-common"),i=require("../context/SchedulerViewContext.js");function m(e){const u=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const c=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(u,r,c.get?c:{enumerable:!0,get:()=>e[r]})}}return u.default=e,Object.freeze(u)}const n=m(l),d=(e,u)=>{const{_ref:r,itemRef:c}=e,t=n.useRef(null),s=n.useRef(null),[,a]=i.useSchedulerViewItemsContext();return n.useImperativeHandle(t,()=>({element:s.current,props:e})),n.useImperativeHandle(u,()=>t.current),n.useImperativeHandle(r,()=>t.current),n.useImperativeHandle(c,()=>t.current),o.useIsomorphicLayoutEffect(()=>(a({type:o.COLLECTION_ACTION.add,item:t}),()=>{a({type:o.COLLECTION_ACTION.remove,item:t})})),{item:t,element:s}};exports.useSchedulerItem=d;
@@ -0,0 +1,31 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 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 client";
9
+ import * as t from "react";
10
+ import { useIsomorphicLayoutEffect as a, COLLECTION_ACTION as m } from "@progress/kendo-react-common";
11
+ import { useSchedulerViewItemsContext as i } from "../context/SchedulerViewContext.mjs";
12
+ const I = (r, s) => {
13
+ const { _ref: c, itemRef: o } = r, e = t.useRef(null), n = t.useRef(null), [, u] = i();
14
+ return t.useImperativeHandle(e, () => ({ element: n.current, props: r })), t.useImperativeHandle(s, () => e.current), t.useImperativeHandle(c, () => e.current), t.useImperativeHandle(o, () => e.current), a(
15
+ () => (u({
16
+ type: m.add,
17
+ item: e
18
+ }), () => {
19
+ u({
20
+ type: m.remove,
21
+ item: e
22
+ });
23
+ })
24
+ ), {
25
+ item: e,
26
+ element: n
27
+ };
28
+ };
29
+ export {
30
+ I as useSchedulerItem
31
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react"),l=require("@progress/kendo-react-common"),a=require("../context/SchedulerViewContext.js");function i(t){const u=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const e=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(u,n,e.get?e:{enumerable:!0,get:()=>t[n]})}}return u.default=t,Object.freeze(u)}const r=i(s),d=(t,u)=>{const{_ref:n}=t,e=r.useRef(null),c=r.useRef(null),[,o]=a.useSchedulerViewSlotsContext();return r.useImperativeHandle(e,()=>({element:c.current,props:t})),r.useImperativeHandle(u,()=>e.current),r.useImperativeHandle(n,()=>e.current),r.useEffect(()=>(o({type:l.COLLECTION_ACTION.add,item:e}),()=>{o({type:l.COLLECTION_ACTION.remove,item:e})})),{slot:e,element:c}};exports.useSchedulerSlot=d;
@@ -0,0 +1,31 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 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 client";
9
+ import * as t from "react";
10
+ import { COLLECTION_ACTION as u } from "@progress/kendo-react-common";
11
+ import { useSchedulerViewSlotsContext as c } from "../context/SchedulerViewContext.mjs";
12
+ const a = (r, o) => {
13
+ const { _ref: l } = r, e = t.useRef(null), n = t.useRef(null), [, s] = c();
14
+ return t.useImperativeHandle(e, () => ({ element: n.current, props: r })), t.useImperativeHandle(o, () => e.current), t.useImperativeHandle(l, () => e.current), t.useEffect(
15
+ () => (s({
16
+ type: u.add,
17
+ item: e
18
+ }), () => {
19
+ s({
20
+ type: u.remove,
21
+ item: e
22
+ });
23
+ })
24
+ ), {
25
+ slot: e,
26
+ element: n
27
+ };
28
+ };
29
+ export {
30
+ a as useSchedulerSlot
31
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("react"),p=require("../views/common/utils.js"),_=require("../constants/index.js"),x=require("@progress/kendo-react-common"),y=require("../context/SchedulerContext.js");function E(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const c in e)if(c!=="default"){const i=Object.getOwnPropertyDescriptor(e,c);Object.defineProperty(t,c,i.get?i:{enumerable:!0,get:()=>e[c]})}}return t.default=e,Object.freeze(t)}const o=E(R),O=(e,t)=>{const c=o.useRef(),i=o.useRef(0),d=y.useSchedulerElementContext(),g=()=>{if(!e.current)return;const n=e.current.element;n&&(i.current=n.clientHeight)},l=o.useCallback(()=>{if(!t||!e.current)return;const n=e.current.element,h=e.current.props;if(!n)return;const f=p.getPadding(n);let r=0;const s=h.items.filter(a=>a._ref.current);s.forEach(a=>{if(!a._ref.current)return;const{height:b}=p.getRect(a._ref.current.element);r+=b});const u=s.length*_.BORDER_WIDTH*2+r-(f||0)+(typeof t=="object"&&t.offsetTop?t.offsetTop:0)+(typeof t=="object"&&t.offsetBottom?t.offsetBottom:0);s.length?u>i.current-f&&p.setRect(n,{height:u},!0):n&&(n.style.minHeight="")},[t,e]),m=o.useCallback(()=>{c.current!==void 0&&window.cancelAnimationFrame(c.current),c.current=window.requestAnimationFrame(()=>{l()})},[l]);x.useIsomorphicLayoutEffect(g,[]),o.useEffect(l,[e,e.current&&e.current.props,t]),o.useEffect(()=>{if(!e.current)return;const f=e.current.props.items.filter(r=>r._ref.current).map(r=>{if(!r._ref.current||!r._ref.current.element||!d.current)return;const s=window.ResizeObserver,u=s&&new s(m);return u&&u.observe(r._ref.current.element),()=>{u&&u.disconnect()}});return()=>{f.forEach(r=>r&&r())}},[m,d,e])};exports.useSlotExpand=O;
@@ -0,0 +1,67 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 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 client";
9
+ import * as s from "react";
10
+ import { getPadding as R, getRect as b, setRect as E } from "../views/common/utils.mjs";
11
+ import { BORDER_WIDTH as _ } from "../constants/index.mjs";
12
+ import { useIsomorphicLayoutEffect as w } from "@progress/kendo-react-common";
13
+ import { useSchedulerElementContext as x } from "../context/SchedulerContext.mjs";
14
+ const z = (e, t) => {
15
+ const f = s.useRef(), p = s.useRef(0), a = x(), d = () => {
16
+ if (!e.current)
17
+ return;
18
+ const n = e.current.element;
19
+ n && (p.current = n.clientHeight);
20
+ }, m = s.useCallback(() => {
21
+ if (!t || !e.current)
22
+ return;
23
+ const n = e.current.element, h = e.current.props;
24
+ if (!n)
25
+ return;
26
+ const u = R(n);
27
+ let r = 0;
28
+ const i = h.items.filter((o) => o._ref.current);
29
+ i.forEach((o) => {
30
+ if (!o._ref.current)
31
+ return;
32
+ const { height: g } = b(o._ref.current.element);
33
+ r += g;
34
+ });
35
+ const c = i.length * _ * 2 + r - (u || 0) + (typeof t == "object" && t.offsetTop ? t.offsetTop : 0) + (typeof t == "object" && t.offsetBottom ? t.offsetBottom : 0);
36
+ i.length ? c > p.current - u && E(
37
+ n,
38
+ { height: c },
39
+ !0
40
+ ) : n && (n.style.minHeight = "");
41
+ }, [t, e]), l = s.useCallback(() => {
42
+ f.current !== void 0 && window.cancelAnimationFrame(f.current), f.current = window.requestAnimationFrame(() => {
43
+ m();
44
+ });
45
+ }, [m]);
46
+ w(d, []), s.useEffect(m, [e, e.current && e.current.props, t]), s.useEffect(
47
+ () => {
48
+ if (!e.current)
49
+ return;
50
+ const u = e.current.props.items.filter((r) => r._ref.current).map((r) => {
51
+ if (!r._ref.current || !r._ref.current.element || !a.current)
52
+ return;
53
+ const i = window.ResizeObserver, c = i && new i(l);
54
+ return c && c.observe(r._ref.current.element), () => {
55
+ c && c.disconnect();
56
+ };
57
+ });
58
+ return () => {
59
+ u.forEach((r) => r && r());
60
+ };
61
+ },
62
+ [l, a, e]
63
+ );
64
+ };
65
+ export {
66
+ z as useSlotExpand
67
+ };