@progress/kendo-react-scheduler 5.4.0-dev.202205200719 → 5.4.0-dev.202206061009
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/dist/cdn/js/kendo-react-scheduler.js +2 -16
- package/dist/cdn/js/kendo-react-scheduler.js.LICENSE.txt +14 -0
- package/dist/es/Scheduler.d.ts +1 -1
- package/dist/es/Scheduler.js +18 -9
- package/dist/es/components/BaseView.d.ts +1 -1
- package/dist/es/components/CurrentTimeMarket.js +5 -5
- package/dist/es/components/DateHeaderCell.d.ts +1 -1
- package/dist/es/components/DateHeaderCell.js +4 -2
- package/dist/es/components/SchedulerForm.d.ts +1 -1
- package/dist/es/components/SchedulerForm.js +5 -3
- package/dist/es/components/SchedulerOccurrenceDialog.d.ts +1 -1
- package/dist/es/components/SchedulerRemoveDialog.d.ts +1 -1
- package/dist/es/components/SchedulerRemoveDialog.js +6 -1
- package/dist/es/components/TimeHeaderCell.d.ts +1 -1
- package/dist/es/components/TimeHeaderCell.js +4 -2
- package/dist/es/components/footer/SchedulerFooter.js +4 -2
- package/dist/es/components/footer/bussiness-hours/BussinessHours.js +4 -2
- package/dist/es/components/header/SchedulerHeader.js +4 -2
- package/dist/es/components/header/navigation/NavigationDatePicker.d.ts +2 -2
- package/dist/es/components/header/navigation/NavigationDatePicker.js +1 -1
- package/dist/es/components/header/navigation/SchedulerNavigation.js +4 -2
- package/dist/es/components/header/view-selector/SchedulerViewSelector.js +4 -2
- package/dist/es/components/header/view-selector/ViewSelectorList.d.ts +1 -1
- package/dist/es/components/header/view-selector/ViewSelectorList.js +1 -1
- package/dist/es/constants/index.d.ts +1 -1
- package/dist/es/context/SchedulerContext.d.ts +17 -17
- package/dist/es/context/SchedulerEditItemContext.d.ts +13 -61
- package/dist/es/context/SchedulerEditSlotContext.d.ts +3 -3
- package/dist/es/context/SchedulerEditTaskContext.d.ts +6 -6
- package/dist/es/context/SchedulerViewContext.d.ts +14 -14
- package/dist/es/editors/FilterableComboBox.js +4 -2
- package/dist/es/editors/SchedulerFormEditor.d.ts +1 -1
- package/dist/es/editors/SchedulerFormEditor.js +4 -2
- package/dist/es/editors/ZonedDateTime.js +4 -2
- package/dist/es/hooks/use-items-focus.d.ts +1 -1
- package/dist/es/hooks/use-items-selection.d.ts +1 -1
- package/dist/es/hooks/use-items-selection.js +11 -2
- package/dist/es/hooks/use-slots-focus.d.ts +6 -6
- package/dist/es/hooks/use-slots-selection.js +10 -1
- package/dist/es/hooks/useAsyncMouseEnterLeave.d.ts +2 -2
- package/dist/es/hooks/useCellSync.js +1 -1
- package/dist/es/hooks/useControlledState.d.ts +10 -12
- package/dist/es/hooks/useControlledState.js +1 -1
- package/dist/es/hooks/useEditable.d.ts +1 -1
- package/dist/es/hooks/usePropOrState.d.ts +1 -1
- package/dist/es/hooks/useRowSync.d.ts +1 -1
- package/dist/es/hooks/useSchedulerItem.d.ts +1 -1
- package/dist/es/hooks/useSchedulerSlot.d.ts +1 -1
- package/dist/es/hooks/useSlotExpand.js +1 -1
- package/dist/es/items/SchedulerEditItem.js +40 -40
- package/dist/es/items/SchedulerItem.js +1 -1
- package/dist/es/items/SchedulerViewItem.js +5 -3
- package/dist/es/items/hooks/use-drag-item.d.ts +6 -2
- package/dist/es/items/hooks/use-drag-item.js +10 -1
- package/dist/es/items/hooks/use-form-item.d.ts +5 -1
- package/dist/es/items/hooks/use-remove-item.d.ts +5 -1
- package/dist/es/items/hooks/use-resize-item.d.ts +6 -2
- package/dist/es/items/hooks/use-resize-item.js +11 -2
- package/dist/es/items/hooks/use-series.d.ts +2 -1
- package/dist/es/items/hooks/use-show-occurrence-dialog.d.ts +2 -1
- package/dist/es/items/hooks/use-show-remove-item-dialog.d.ts +2 -1
- package/dist/es/messages/index.d.ts +76 -76
- package/dist/es/models/DataItem.js +1 -0
- package/dist/es/models/DateRange.js +1 -0
- package/dist/es/models/EditableProp.js +1 -0
- package/dist/es/models/Fields.js +1 -0
- package/dist/es/models/Group.js +1 -0
- package/dist/es/models/Item.js +1 -0
- package/dist/es/models/NavigationAction.js +1 -0
- package/dist/es/models/Occurrence.js +1 -0
- package/dist/es/models/Omit.js +1 -0
- package/dist/es/models/Orientation.js +1 -0
- package/dist/es/models/Range.js +1 -0
- package/dist/es/models/Rect.js +1 -0
- package/dist/es/models/Resource.js +1 -0
- package/dist/es/models/SchedulerGroup.js +1 -0
- package/dist/es/models/SchedulerHandle.js +1 -0
- package/dist/es/models/SchedulerModelFields.js +1 -0
- package/dist/es/models/SchedulerResource.js +1 -0
- package/dist/es/models/SchedulerView.js +1 -0
- package/dist/es/models/Slot.js +1 -0
- package/dist/es/models/events.js +1 -0
- package/dist/es/models/index.js +17 -0
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/recurrence/RecurrenceFrequencyEditor.js +4 -2
- package/dist/es/recurrence/RecurrenceRepeatOnWeekEditor.js +15 -4
- package/dist/es/recurrence/common.d.ts +5 -5
- package/dist/es/recurrence/types/EndRule.js +1 -0
- package/dist/es/recurrence/types/Frequency.js +1 -0
- package/dist/es/recurrence/types/FrequencyEntity.js +1 -0
- package/dist/es/recurrence/types/MonthEntity.js +1 -0
- package/dist/es/recurrence/types/OffsetPosition.js +1 -0
- package/dist/es/recurrence/types/OffsetPositionEntity.js +1 -0
- package/dist/es/recurrence/types/RepeatOnRule.js +1 -0
- package/dist/es/recurrence/types/WeekDayEntity.js +1 -0
- package/dist/es/recurrence/types/WeekDayRule.js +1 -0
- package/dist/es/reducers/editReducer.js +6 -6
- package/dist/es/services/itemsService.js +1 -7
- package/dist/es/services/occurrenceService.d.ts +2 -2
- package/dist/es/services/occurrenceService.js +11 -2
- package/dist/es/slots/SchedulerEditSlot.js +4 -2
- package/dist/es/slots/SchedulerSlot.js +1 -1
- package/dist/es/slots/SchedulerViewSlot.js +4 -2
- package/dist/es/tasks/SchedulerEditTask.js +4 -2
- package/dist/es/tasks/SchedulerViewTask.js +4 -2
- package/dist/es/utils/index.d.ts +16 -16
- package/dist/es/utils/index.js +20 -10
- package/dist/es/views/agenda/AgendaView.js +2 -2
- package/dist/es/views/common/HorizontalResourceIterator.d.ts +2 -2
- package/dist/es/views/common/utils.d.ts +3 -3
- package/dist/es/views/common/utils.js +16 -7
- package/dist/es/views/day/DayViewGroupRowContent.d.ts +1 -1
- package/dist/es/views/day/MultiDayView.js +22 -13
- package/dist/es/views/month/MonthView.js +2 -2
- package/dist/es/views/time/MultiDayTimelineView.js +3 -3
- package/dist/es/views/week/WorkWeekView.js +4 -2
- package/dist/npm/Scheduler.d.ts +1 -1
- package/dist/npm/Scheduler.js +72 -62
- package/dist/npm/components/BaseView.d.ts +1 -1
- package/dist/npm/components/BaseView.js +10 -9
- package/dist/npm/components/CurrentTimeMarket.js +21 -19
- package/dist/npm/components/DateHeaderCell.d.ts +1 -1
- package/dist/npm/components/DateHeaderCell.js +7 -4
- package/dist/npm/components/SchedulerForm.d.ts +1 -1
- package/dist/npm/components/SchedulerForm.js +8 -5
- package/dist/npm/components/SchedulerOccurrenceDialog.d.ts +1 -1
- package/dist/npm/components/SchedulerOccurrenceDialog.js +2 -1
- package/dist/npm/components/SchedulerRemoveDialog.d.ts +1 -1
- package/dist/npm/components/SchedulerRemoveDialog.js +8 -2
- package/dist/npm/components/ShowMoreItemsButton.js +1 -0
- package/dist/npm/components/TimeHeaderCell.d.ts +1 -1
- package/dist/npm/components/TimeHeaderCell.js +7 -4
- package/dist/npm/components/footer/SchedulerFooter.js +6 -3
- package/dist/npm/components/footer/bussiness-hours/BussinessHours.js +6 -3
- package/dist/npm/components/header/SchedulerHeader.js +6 -3
- package/dist/npm/components/header/navigation/NavigationDatePicker.d.ts +2 -2
- package/dist/npm/components/header/navigation/NavigationDatePicker.js +9 -8
- package/dist/npm/components/header/navigation/SchedulerNavigation.js +6 -3
- package/dist/npm/components/header/view-selector/SchedulerViewSelector.js +6 -3
- package/dist/npm/components/header/view-selector/ViewSelectorItem.js +5 -3
- package/dist/npm/components/header/view-selector/ViewSelectorList.d.ts +1 -1
- package/dist/npm/components/header/view-selector/ViewSelectorList.js +6 -5
- package/dist/npm/constants/index.d.ts +1 -1
- package/dist/npm/constants/index.js +2 -1
- package/dist/npm/context/SchedulerContext.d.ts +17 -17
- package/dist/npm/context/SchedulerContext.js +25 -12
- package/dist/npm/context/SchedulerEditItemContext.d.ts +13 -61
- package/dist/npm/context/SchedulerEditItemContext.js +17 -8
- package/dist/npm/context/SchedulerEditSlotContext.d.ts +3 -3
- package/dist/npm/context/SchedulerEditSlotContext.js +7 -3
- package/dist/npm/context/SchedulerEditTaskContext.d.ts +6 -6
- package/dist/npm/context/SchedulerEditTaskContext.js +9 -4
- package/dist/npm/context/SchedulerResourceIteratorContext.js +3 -1
- package/dist/npm/context/SchedulerViewContext.d.ts +14 -14
- package/dist/npm/context/SchedulerViewContext.js +19 -9
- package/dist/npm/context/index.js +19 -8
- package/dist/npm/editors/FilterableComboBox.js +8 -4
- package/dist/npm/editors/ResourceEditor.js +4 -2
- package/dist/npm/editors/SchedulerFormEditor.d.ts +1 -1
- package/dist/npm/editors/SchedulerFormEditor.js +10 -7
- package/dist/npm/editors/ZonedDateTime.js +9 -5
- package/dist/npm/editors/common.js +7 -4
- package/dist/npm/hooks/index.js +24 -13
- package/dist/npm/hooks/use-items-focus.d.ts +1 -1
- package/dist/npm/hooks/use-items-focus.js +5 -3
- package/dist/npm/hooks/use-items-selection.d.ts +1 -1
- package/dist/npm/hooks/use-items-selection.js +16 -5
- package/dist/npm/hooks/use-slots-focus.d.ts +6 -6
- package/dist/npm/hooks/use-slots-focus.js +15 -9
- package/dist/npm/hooks/use-slots-selection.js +13 -2
- package/dist/npm/hooks/useAsyncMouseEnterLeave.d.ts +2 -2
- package/dist/npm/hooks/useAsyncMouseEnterLeave.js +3 -1
- package/dist/npm/hooks/useCellSync.js +6 -4
- package/dist/npm/hooks/useControlledState.d.ts +10 -12
- package/dist/npm/hooks/useControlledState.js +4 -2
- package/dist/npm/hooks/useEditable.d.ts +1 -1
- package/dist/npm/hooks/useEditable.js +3 -1
- package/dist/npm/hooks/usePropOrState.d.ts +1 -1
- package/dist/npm/hooks/usePropOrState.js +3 -1
- package/dist/npm/hooks/useRowSync.d.ts +1 -1
- package/dist/npm/hooks/useRowSync.js +5 -3
- package/dist/npm/hooks/useSchedulerItem.d.ts +1 -1
- package/dist/npm/hooks/useSchedulerItem.js +4 -2
- package/dist/npm/hooks/useSchedulerSlot.d.ts +1 -1
- package/dist/npm/hooks/useSchedulerSlot.js +4 -2
- package/dist/npm/hooks/useSlotExpand.js +8 -6
- package/dist/npm/hooks/useWorkHours.js +4 -2
- package/dist/npm/items/SchedulerEditItem.js +53 -52
- package/dist/npm/items/SchedulerItem.js +12 -11
- package/dist/npm/items/SchedulerItemContent.js +2 -1
- package/dist/npm/items/SchedulerViewItem.js +19 -16
- package/dist/npm/items/hooks/use-drag-item.d.ts +6 -2
- package/dist/npm/items/hooks/use-drag-item.js +39 -28
- package/dist/npm/items/hooks/use-form-item.d.ts +5 -1
- package/dist/npm/items/hooks/use-form-item.js +6 -4
- package/dist/npm/items/hooks/use-remove-item.d.ts +5 -1
- package/dist/npm/items/hooks/use-remove-item.js +3 -1
- package/dist/npm/items/hooks/use-resize-item.d.ts +6 -2
- package/dist/npm/items/hooks/use-resize-item.js +44 -33
- package/dist/npm/items/hooks/use-series.d.ts +2 -1
- package/dist/npm/items/hooks/use-series.js +4 -2
- package/dist/npm/items/hooks/use-show-occurrence-dialog.d.ts +2 -1
- package/dist/npm/items/hooks/use-show-occurrence-dialog.js +4 -2
- package/dist/npm/items/hooks/use-show-remove-item-dialog.d.ts +2 -1
- package/dist/npm/items/hooks/use-show-remove-item-dialog.js +4 -2
- package/dist/npm/main.js +76 -74
- package/dist/npm/messages/index.d.ts +76 -76
- package/dist/npm/messages/index.js +3 -1
- package/dist/npm/models/index.js +31 -0
- package/dist/npm/package-metadata.js +2 -1
- package/dist/npm/recurrence/RecurrenceEditor.js +26 -24
- package/dist/npm/recurrence/RecurrenceFrequencyEditor.js +7 -3
- package/dist/npm/recurrence/RecurrenceRepeatOnWeekEditor.js +19 -6
- package/dist/npm/recurrence/common.d.ts +5 -5
- package/dist/npm/recurrence/common.js +51 -32
- package/dist/npm/reducers/editReducer.js +9 -7
- package/dist/npm/reducers/index.js +15 -4
- package/dist/npm/services/index.js +18 -7
- package/dist/npm/services/itemsService.js +15 -16
- package/dist/npm/services/occurrenceService.d.ts +2 -2
- package/dist/npm/services/occurrenceService.js +39 -28
- package/dist/npm/services/rangeService.js +3 -1
- package/dist/npm/services/slotsService.js +3 -1
- package/dist/npm/slots/SchedulerEditSlot.js +20 -17
- package/dist/npm/slots/SchedulerSlot.js +5 -4
- package/dist/npm/slots/SchedulerViewSlot.js +6 -3
- package/dist/npm/tasks/SchedulerEditTask.js +12 -9
- package/dist/npm/tasks/SchedulerTask.js +4 -3
- package/dist/npm/tasks/SchedulerViewTask.js +5 -2
- package/dist/npm/utils/index.d.ts +16 -16
- package/dist/npm/utils/index.js +130 -80
- package/dist/npm/views/agenda/AgendaView.js +26 -24
- package/dist/npm/views/agenda/AgendaViewHeaderItem.js +4 -2
- package/dist/npm/views/common/HorizontalResourceIterator.d.ts +2 -2
- package/dist/npm/views/common/HorizontalResourceIterator.js +8 -5
- package/dist/npm/views/common/SchedulerDrag.js +12 -10
- package/dist/npm/views/common/SchedulerResize.js +12 -10
- package/dist/npm/views/common/VerticalResourceIterator.js +4 -2
- package/dist/npm/views/common/utils.d.ts +3 -3
- package/dist/npm/views/common/utils.js +37 -18
- package/dist/npm/views/day/DayView.js +3 -1
- package/dist/npm/views/day/DayViewAllDayRowContent.js +4 -2
- package/dist/npm/views/day/DayViewGroupRowContent.d.ts +1 -1
- package/dist/npm/views/day/DayViewGroupRowContent.js +3 -1
- package/dist/npm/views/day/DayViewRowContent.js +4 -2
- package/dist/npm/views/day/MultiDayView.js +56 -45
- package/dist/npm/views/month/MonthView.js +26 -24
- package/dist/npm/views/time/MultiDayTimelineView.js +32 -30
- package/dist/npm/views/time/TimelineView.js +3 -1
- package/dist/npm/views/time/TimelineViewAllEventsRowContent.js +4 -2
- package/dist/npm/views/time/TimelineViewRowContent.js +3 -1
- package/dist/npm/views/week/WeekView.js +8 -6
- package/dist/npm/views/week/WorkWeekView.js +12 -8
- package/dist/systemjs/kendo-react-scheduler.js +1 -1
- package/package.json +12 -12
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useCellSync = void 0;
|
|
3
4
|
var React = require("react");
|
|
4
5
|
var utils_1 = require("../views/common/utils");
|
|
5
6
|
var utils_2 = require("../views/common/utils");
|
|
6
7
|
/** @hidden */
|
|
7
|
-
|
|
8
|
+
var useCellSync = function (args, inputs) {
|
|
8
9
|
var element = args.element;
|
|
9
10
|
var syncWidth = function () {
|
|
10
11
|
if (!element || !element.current) {
|
|
@@ -17,8 +18,8 @@ exports.useCellSync = function (args, inputs) {
|
|
|
17
18
|
elements.forEach(function (el) {
|
|
18
19
|
var width = el.getBoundingClientRect().width;
|
|
19
20
|
var level = args.explicitDepth && args.attribute !== undefined ? el.getAttribute(args.attribute) : 0;
|
|
20
|
-
var padding = utils_1.getPadding(el, true);
|
|
21
|
-
var border = utils_2.getBorders(el, true);
|
|
21
|
+
var padding = (0, utils_1.getPadding)(el, true);
|
|
22
|
+
var border = (0, utils_2.getBorders)(el, true);
|
|
22
23
|
if (level === null) {
|
|
23
24
|
return;
|
|
24
25
|
}
|
|
@@ -37,8 +38,9 @@ exports.useCellSync = function (args, inputs) {
|
|
|
37
38
|
if (level === null) {
|
|
38
39
|
return;
|
|
39
40
|
}
|
|
40
|
-
el.style.minWidth = widest[level] - biggestPadding[level] - biggestBorder[level]
|
|
41
|
+
el.style.minWidth = "".concat(widest[level] - biggestPadding[level] - biggestBorder[level], "px");
|
|
41
42
|
});
|
|
42
43
|
};
|
|
43
44
|
React.useLayoutEffect(syncWidth, inputs);
|
|
44
45
|
};
|
|
46
|
+
exports.useCellSync = useCellSync;
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
/** @hidden */
|
|
3
|
-
export declare type ControlledStateHook<T> = [
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
3
|
+
export declare type ControlledStateHook<T> = [
|
|
4
|
+
T,
|
|
5
|
+
(value: T, event?: React.SyntheticEvent | {
|
|
6
|
+
target: any;
|
|
7
|
+
syntheticEvent: React.SyntheticEvent;
|
|
8
|
+
} | {
|
|
9
|
+
preventDefault: any;
|
|
10
|
+
}) => void
|
|
11
|
+
];
|
|
9
12
|
/** @hidden */
|
|
10
|
-
export declare const useControlledState: <T extends
|
|
11
|
-
target: any;
|
|
12
|
-
syntheticEvent: React.SyntheticEvent<Element, Event>;
|
|
13
|
-
} | {
|
|
14
|
-
preventDefault: any;
|
|
15
|
-
}) => void];
|
|
13
|
+
export declare const useControlledState: <T extends unknown>(defaultProp: T, prop?: T | undefined, callback?: any) => ControlledStateHook<T>;
|
|
@@ -11,15 +11,17 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.useControlledState = void 0;
|
|
14
15
|
var React = require("react");
|
|
15
16
|
/** @hidden */
|
|
16
|
-
|
|
17
|
+
var useControlledState = function (defaultProp, prop, callback) {
|
|
17
18
|
var _a = React.useState(prop || defaultProp), state = _a[0], setState = _a[1];
|
|
18
19
|
var handleSetEdit = React.useCallback(function (value, args) {
|
|
19
20
|
setState(value);
|
|
20
21
|
if (callback) {
|
|
21
|
-
callback.call(undefined, __assign({}, args, { value: value }));
|
|
22
|
+
callback.call(undefined, __assign(__assign({}, args), { value: value }));
|
|
22
23
|
}
|
|
23
24
|
}, [callback, setState]);
|
|
24
25
|
return [prop !== undefined ? prop : state, handleSetEdit];
|
|
25
26
|
};
|
|
27
|
+
exports.useControlledState = useControlledState;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useEditable = void 0;
|
|
3
4
|
var React = require("react");
|
|
4
5
|
var SchedulerContext_1 = require("../context/SchedulerContext");
|
|
5
6
|
/** @hidden */
|
|
6
|
-
|
|
7
|
+
var useEditable = function (editable) {
|
|
7
8
|
var context = React.useContext(SchedulerContext_1.SchedulerPropsContext);
|
|
8
9
|
var settings = editable !== undefined ? editable : (context.editable || false);
|
|
9
10
|
var edit = settings === true
|
|
@@ -27,3 +28,4 @@ exports.useEditable = function (editable) {
|
|
|
27
28
|
select: select
|
|
28
29
|
};
|
|
29
30
|
};
|
|
31
|
+
exports.useEditable = useEditable;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** @hidden */
|
|
2
|
-
export declare const usePropOrState: <S extends
|
|
2
|
+
export declare const usePropOrState: <S extends unknown>(prop?: any, defaultValue?: any) => [S, any];
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.usePropOrState = void 0;
|
|
3
4
|
var React = require("react");
|
|
4
5
|
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
5
6
|
/** @hidden */
|
|
6
|
-
|
|
7
|
+
var usePropOrState = function (prop, defaultValue) {
|
|
7
8
|
var _a = React.useState(defaultValue), state = _a[0], setState = _a[1];
|
|
8
9
|
return prop !== undefined
|
|
9
10
|
? [prop, kendo_react_common_1.noop]
|
|
10
11
|
: [state, setState];
|
|
11
12
|
};
|
|
13
|
+
exports.usePropOrState = usePropOrState;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useRowSync = void 0;
|
|
3
4
|
var React = require("react");
|
|
4
5
|
var utils_1 = require("../views/common/utils");
|
|
5
6
|
var constants_1 = require("../constants");
|
|
6
7
|
var stripSelectorSymbol = function (str) { return str.slice(1, str.length); };
|
|
7
8
|
/** @hidden */
|
|
8
|
-
|
|
9
|
+
var useRowSync = function (args, inputs) {
|
|
9
10
|
var element = args.element;
|
|
10
11
|
var syncHeight = function () {
|
|
11
12
|
if (!element || !element.current) {
|
|
@@ -36,10 +37,11 @@ exports.useRowSync = function (args, inputs) {
|
|
|
36
37
|
if (x === null || y === null) {
|
|
37
38
|
return;
|
|
38
39
|
}
|
|
39
|
-
var slotPadding = utils_1.getPadding(el);
|
|
40
|
+
var slotPadding = (0, utils_1.getPadding)(el);
|
|
40
41
|
var height = highest[x][y] - slotPadding;
|
|
41
|
-
utils_1.setRect(el, { height: height }, true);
|
|
42
|
+
(0, utils_1.setRect)(el, { height: height }, true);
|
|
42
43
|
});
|
|
43
44
|
};
|
|
44
45
|
React.useEffect(syncHeight, inputs);
|
|
45
46
|
};
|
|
47
|
+
exports.useRowSync = useRowSync;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { SchedulerItemProps, SchedulerItemHandle } from '../main';
|
|
3
3
|
/** @hidden */
|
|
4
|
-
export declare const useSchedulerItem: (props: SchedulerItemProps, ref?: React.Ref<SchedulerItemHandle>) => {
|
|
4
|
+
export declare const useSchedulerItem: (props: SchedulerItemProps, ref?: React.Ref<SchedulerItemHandle | null>) => {
|
|
5
5
|
item: React.RefObject<SchedulerItemHandle>;
|
|
6
6
|
element: React.RefObject<HTMLDivElement>;
|
|
7
7
|
};
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useSchedulerItem = void 0;
|
|
3
4
|
var React = require("react");
|
|
4
5
|
var context_1 = require("../context");
|
|
5
6
|
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
6
7
|
/** @hidden */
|
|
7
|
-
|
|
8
|
+
var useSchedulerItem = function (props, ref) {
|
|
8
9
|
var _ref = props._ref, itemRef = props.itemRef;
|
|
9
10
|
var item = React.useRef(null);
|
|
10
11
|
var element = React.useRef(null);
|
|
11
|
-
var _a = context_1.useSchedulerViewItemsContext(), dispatchItems = _a[1];
|
|
12
|
+
var _a = (0, context_1.useSchedulerViewItemsContext)(), dispatchItems = _a[1];
|
|
12
13
|
React.useImperativeHandle(item, function () { return ({ element: element.current, props: props }); });
|
|
13
14
|
React.useImperativeHandle(ref, function () { return item.current; });
|
|
14
15
|
React.useImperativeHandle(_ref, function () { return item.current; });
|
|
@@ -30,3 +31,4 @@ exports.useSchedulerItem = function (props, ref) {
|
|
|
30
31
|
element: element
|
|
31
32
|
};
|
|
32
33
|
};
|
|
34
|
+
exports.useSchedulerItem = useSchedulerItem;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { SchedulerSlotProps, SchedulerSlotHandle } from '../main';
|
|
3
3
|
/** @hidden */
|
|
4
|
-
export declare const useSchedulerSlot: (props: SchedulerSlotProps, ref: React.Ref<SchedulerSlotHandle>) => {
|
|
4
|
+
export declare const useSchedulerSlot: (props: SchedulerSlotProps, ref: React.Ref<SchedulerSlotHandle | null>) => {
|
|
5
5
|
slot: React.RefObject<SchedulerSlotHandle>;
|
|
6
6
|
element: React.RefObject<HTMLDivElement>;
|
|
7
7
|
};
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useSchedulerSlot = void 0;
|
|
3
4
|
var React = require("react");
|
|
4
5
|
var context_1 = require("../context");
|
|
5
6
|
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
6
7
|
/** @hidden */
|
|
7
|
-
|
|
8
|
+
var useSchedulerSlot = function (props, ref) {
|
|
8
9
|
var _ref = props._ref;
|
|
9
10
|
var slot = React.useRef(null);
|
|
10
11
|
var element = React.useRef(null);
|
|
11
|
-
var _a = context_1.useSchedulerViewSlotsContext(), dispatchSlots = _a[1];
|
|
12
|
+
var _a = (0, context_1.useSchedulerViewSlotsContext)(), dispatchSlots = _a[1];
|
|
12
13
|
React.useImperativeHandle(slot, function () { return ({ element: element.current, props: props }); });
|
|
13
14
|
React.useImperativeHandle(ref, function () { return slot.current; });
|
|
14
15
|
React.useImperativeHandle(_ref, function () { return slot.current; });
|
|
@@ -29,3 +30,4 @@ exports.useSchedulerSlot = function (props, ref) {
|
|
|
29
30
|
element: element
|
|
30
31
|
};
|
|
31
32
|
};
|
|
33
|
+
exports.useSchedulerSlot = useSchedulerSlot;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useSlotExpand = void 0;
|
|
3
4
|
var React = require("react");
|
|
4
5
|
var utils_1 = require("../views/common/utils");
|
|
5
6
|
var constants_1 = require("../constants");
|
|
6
7
|
var context_1 = require("../context");
|
|
7
8
|
/** @hidden */
|
|
8
|
-
|
|
9
|
+
var useSlotExpand = function (slot, config) {
|
|
9
10
|
var timeout = React.useRef();
|
|
10
11
|
var initialHeight = React.useRef(0);
|
|
11
|
-
var scheduler = context_1.useSchedulerElementContext();
|
|
12
|
+
var scheduler = (0, context_1.useSchedulerElementContext)();
|
|
12
13
|
var getInitialHeight = function () {
|
|
13
14
|
if (!slot.current) {
|
|
14
15
|
return;
|
|
@@ -28,7 +29,7 @@ exports.useSlotExpand = function (slot, config) {
|
|
|
28
29
|
if (!element) {
|
|
29
30
|
return;
|
|
30
31
|
}
|
|
31
|
-
var slotPadding = utils_1.getPadding(element);
|
|
32
|
+
var slotPadding = (0, utils_1.getPadding)(element);
|
|
32
33
|
var highest = 0;
|
|
33
34
|
var existing = props.items.filter(function (i) {
|
|
34
35
|
return i._ref.current;
|
|
@@ -37,7 +38,7 @@ exports.useSlotExpand = function (slot, config) {
|
|
|
37
38
|
if (!item._ref.current) {
|
|
38
39
|
return;
|
|
39
40
|
}
|
|
40
|
-
var height = utils_1.getRect(item._ref.current.element).height;
|
|
41
|
+
var height = (0, utils_1.getRect)(item._ref.current.element).height;
|
|
41
42
|
highest += height;
|
|
42
43
|
});
|
|
43
44
|
var minHeight = ((existing.length * constants_1.BORDER_WIDTH * 2)
|
|
@@ -47,11 +48,11 @@ exports.useSlotExpand = function (slot, config) {
|
|
|
47
48
|
+ (typeof config === 'object' && config.offsetBottom ? config.offsetBottom : 0));
|
|
48
49
|
if (existing.length) {
|
|
49
50
|
if (minHeight > (initialHeight.current - slotPadding)) {
|
|
50
|
-
utils_1.setRect(element, { height: minHeight }, true);
|
|
51
|
+
(0, utils_1.setRect)(element, { height: minHeight }, true);
|
|
51
52
|
}
|
|
52
53
|
}
|
|
53
54
|
else if (element) {
|
|
54
|
-
element.style.minHeight =
|
|
55
|
+
element.style.minHeight = '';
|
|
55
56
|
}
|
|
56
57
|
}, [config, slot]);
|
|
57
58
|
var handleResize = React.useCallback(function () {
|
|
@@ -92,3 +93,4 @@ exports.useSlotExpand = function (slot, config) {
|
|
|
92
93
|
};
|
|
93
94
|
}, [handleResize, scheduler, slot]);
|
|
94
95
|
};
|
|
96
|
+
exports.useSlotExpand = useSlotExpand;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useWorkHours = void 0;
|
|
3
4
|
var React = require("react");
|
|
4
5
|
var _1 = require(".");
|
|
5
6
|
/** @hidden */
|
|
6
|
-
|
|
7
|
-
var _a = _1.usePropOrState(showWorkHours, defaultShowWorkHours), show = _a[0], setShow = _a[1];
|
|
7
|
+
var useWorkHours = function (showWorkHours, defaultShowWorkHours) {
|
|
8
|
+
var _a = (0, _1.usePropOrState)(showWorkHours, defaultShowWorkHours), show = _a[0], setShow = _a[1];
|
|
8
9
|
var handleShowWorkHoursChange = React.useCallback(function () {
|
|
9
10
|
setShow(!show);
|
|
10
11
|
}, [show, setShow]);
|
|
11
12
|
return [show, handleShowWorkHoursChange];
|
|
12
13
|
};
|
|
14
|
+
exports.useWorkHours = useWorkHours;
|
|
@@ -11,6 +11,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.SchedulerEditItem = void 0;
|
|
14
15
|
var React = require("react");
|
|
15
16
|
var SchedulerOccurrenceDialog_1 = require("../components/SchedulerOccurrenceDialog");
|
|
16
17
|
var SchedulerForm_1 = require("../components/SchedulerForm");
|
|
@@ -51,18 +52,18 @@ exports.SchedulerEditItem = React.forwardRef(function (props, ref) {
|
|
|
51
52
|
var Form = propForm || defaultProps.form;
|
|
52
53
|
var OccurrenceDialog = propOccurrenceDialog || defaultProps.occurrenceDialog;
|
|
53
54
|
var RemoveDialog = propRemoveDialog || defaultProps.removeDialog;
|
|
54
|
-
var editable = hooks_1.useEditable(props.editable);
|
|
55
|
-
var _b = context_1.useSchedulerViewSelectedItemsContext(), selectedItems = _b[0], dispatchItemSelection = _b[1];
|
|
56
|
-
var _c = use_series_1.useSeries(null, propSeries, onSeriesChange), series = _c[0], dispatchSeries = _c[2];
|
|
57
|
-
var _d = use_form_item_1.useFormItem({ series: series, onDataAction: onDataAction }, [null, propFormItem, onFormItemChange]), formItem = _d[0], setFormItem = _d[1], dispatchFormItem = _d[2];
|
|
58
|
-
var _e = use_drag_item_1.useDragItem({ dataItem: props.dataItem, ignoreIsAllDay: props.ignoreIsAllDay, isAllDay: props.isAllDay, onDataAction: onDataAction }, [null, propDragItem, onDragItemChange]), dragItem = _e[0], setDragItem = _e[1], dispatchDragItem = _e[2];
|
|
59
|
-
var _f = use_resize_item_1.useResizeItem({ dataItem: props.dataItem, onDataAction: onDataAction }, [null, propResizeItem, onResizeItemChange]), resizeItem = _f[0], setResizeItem = _f[1], dispatchResizeItem = _f[2];
|
|
60
|
-
var _g = use_remove_item_1.useRemoveItem({ series: series, onDataAction: onDataAction }, [null, propRemoveItem, onRemoveItemChange]), removeItem = _g[0], setRemoveItem = _g[1], dispatchRemoveItem = _g[2];
|
|
61
|
-
var _h = use_show_remove_item_dialog_1.useShowRemoveDialog(false, propShowRemoveDialog, onShowRemoveDialogChange), showRemoveDialog = _h[0], setShowRemoveDialog = _h[1], dispatchShowRemoveDialog = _h[2];
|
|
62
|
-
var _j = use_show_occurrence_dialog_1.useShowOccurrenceDialog(false, propShowOccurrenceDialog, onShowOccurrenceDialogChange), showOccurrenceDialog = _j[0], setShowOccurrenceDialog = _j[1], dispatchShowOccurrenceDialog = _j[2];
|
|
63
|
-
var items = context_1.useSchedulerViewItemsContext()[0];
|
|
64
|
-
var _k = context_1.useSchedulerViewFocusedItemsContext(), dispatchViewItemsFocus = _k[1];
|
|
65
|
-
var _l = context_1.useSchedulerViewFocusedSlotsContext(), dispatchViewSlotsFocus = _l[1];
|
|
55
|
+
var editable = (0, hooks_1.useEditable)(props.editable);
|
|
56
|
+
var _b = (0, context_1.useSchedulerViewSelectedItemsContext)(), selectedItems = _b[0], dispatchItemSelection = _b[1];
|
|
57
|
+
var _c = (0, use_series_1.useSeries)(null, propSeries, onSeriesChange), series = _c[0], dispatchSeries = _c[2];
|
|
58
|
+
var _d = (0, use_form_item_1.useFormItem)({ series: series, onDataAction: onDataAction }, [null, propFormItem, onFormItemChange]), formItem = _d[0], setFormItem = _d[1], dispatchFormItem = _d[2];
|
|
59
|
+
var _e = (0, use_drag_item_1.useDragItem)({ dataItem: props.dataItem, ignoreIsAllDay: props.ignoreIsAllDay, isAllDay: props.isAllDay, onDataAction: onDataAction }, [null, propDragItem, onDragItemChange]), dragItem = _e[0], setDragItem = _e[1], dispatchDragItem = _e[2];
|
|
60
|
+
var _f = (0, use_resize_item_1.useResizeItem)({ dataItem: props.dataItem, onDataAction: onDataAction }, [null, propResizeItem, onResizeItemChange]), resizeItem = _f[0], setResizeItem = _f[1], dispatchResizeItem = _f[2];
|
|
61
|
+
var _g = (0, use_remove_item_1.useRemoveItem)({ series: series, onDataAction: onDataAction }, [null, propRemoveItem, onRemoveItemChange]), removeItem = _g[0], setRemoveItem = _g[1], dispatchRemoveItem = _g[2];
|
|
62
|
+
var _h = (0, use_show_remove_item_dialog_1.useShowRemoveDialog)(false, propShowRemoveDialog, onShowRemoveDialogChange), showRemoveDialog = _h[0], setShowRemoveDialog = _h[1], dispatchShowRemoveDialog = _h[2];
|
|
63
|
+
var _j = (0, use_show_occurrence_dialog_1.useShowOccurrenceDialog)(false, propShowOccurrenceDialog, onShowOccurrenceDialogChange), showOccurrenceDialog = _j[0], setShowOccurrenceDialog = _j[1], dispatchShowOccurrenceDialog = _j[2];
|
|
64
|
+
var items = (0, context_1.useSchedulerViewItemsContext)()[0];
|
|
65
|
+
var _k = (0, context_1.useSchedulerViewFocusedItemsContext)(), dispatchViewItemsFocus = _k[1];
|
|
66
|
+
var _l = (0, context_1.useSchedulerViewFocusedSlotsContext)(), dispatchViewSlotsFocus = _l[1];
|
|
66
67
|
var selected = Boolean(selectedItems && selectedItems.some(function (si) { return si.current === item.current; }));
|
|
67
68
|
var state = React.useMemo(function () { return ({
|
|
68
69
|
selected: selected,
|
|
@@ -146,8 +147,8 @@ exports.SchedulerEditItem = React.forwardRef(function (props, ref) {
|
|
|
146
147
|
var actions = onFocusAction(event, props, state);
|
|
147
148
|
if (actions) {
|
|
148
149
|
Array.isArray(actions)
|
|
149
|
-
? actions.filter(Boolean).map(function (action) { return action && actionsReducerMap[action.type](__assign({}, action, { item: item }), event); })
|
|
150
|
-
: actionsReducerMap[actions.type](__assign({}, actions, { item: item }));
|
|
150
|
+
? actions.filter(Boolean).map(function (action) { return action && actionsReducerMap[action.type](__assign(__assign({}, action), { item: item }), event); })
|
|
151
|
+
: actionsReducerMap[actions.type](__assign(__assign({}, actions), { item: item }));
|
|
151
152
|
}
|
|
152
153
|
}
|
|
153
154
|
if (onFocus) {
|
|
@@ -159,8 +160,8 @@ exports.SchedulerEditItem = React.forwardRef(function (props, ref) {
|
|
|
159
160
|
var actions = onMouseDownAction(event, props, state);
|
|
160
161
|
if (actions) {
|
|
161
162
|
Array.isArray(actions)
|
|
162
|
-
? actions.filter(Boolean).map(function (action) { return action && actionsReducerMap[action.type](__assign({}, action, { item: item }), event); })
|
|
163
|
-
: actionsReducerMap[actions.type](__assign({}, actions, { item: item }));
|
|
163
|
+
? actions.filter(Boolean).map(function (action) { return action && actionsReducerMap[action.type](__assign(__assign({}, action), { item: item }), event); })
|
|
164
|
+
: actionsReducerMap[actions.type](__assign(__assign({}, actions), { item: item }));
|
|
164
165
|
}
|
|
165
166
|
}
|
|
166
167
|
if (onMouseDown) {
|
|
@@ -172,8 +173,8 @@ exports.SchedulerEditItem = React.forwardRef(function (props, ref) {
|
|
|
172
173
|
var actions = onMouseUpAction(event, props, state);
|
|
173
174
|
if (actions) {
|
|
174
175
|
Array.isArray(actions)
|
|
175
|
-
? actions.filter(Boolean).map(function (action) { return action && actionsReducerMap[action.type](__assign({}, action, { item: item }), event); })
|
|
176
|
-
: actionsReducerMap[actions.type](__assign({}, actions, { item: item }));
|
|
176
|
+
? actions.filter(Boolean).map(function (action) { return action && actionsReducerMap[action.type](__assign(__assign({}, action), { item: item }), event); })
|
|
177
|
+
: actionsReducerMap[actions.type](__assign(__assign({}, actions), { item: item }));
|
|
177
178
|
}
|
|
178
179
|
}
|
|
179
180
|
if (onMouseUp) {
|
|
@@ -185,8 +186,8 @@ exports.SchedulerEditItem = React.forwardRef(function (props, ref) {
|
|
|
185
186
|
var actions = onClickAction(event, props, state);
|
|
186
187
|
if (actions) {
|
|
187
188
|
Array.isArray(actions)
|
|
188
|
-
? actions.filter(Boolean).map(function (action) { return action && actionsReducerMap[action.type](__assign({}, action, { item: item }), event); })
|
|
189
|
-
: actionsReducerMap[actions.type](__assign({}, actions, { item: item }));
|
|
189
|
+
? actions.filter(Boolean).map(function (action) { return action && actionsReducerMap[action.type](__assign(__assign({}, action), { item: item }), event); })
|
|
190
|
+
: actionsReducerMap[actions.type](__assign(__assign({}, actions), { item: item }));
|
|
190
191
|
}
|
|
191
192
|
}
|
|
192
193
|
if (onClick) {
|
|
@@ -198,8 +199,8 @@ exports.SchedulerEditItem = React.forwardRef(function (props, ref) {
|
|
|
198
199
|
var actions = onDoubleClickAction(event, props, state);
|
|
199
200
|
if (actions) {
|
|
200
201
|
Array.isArray(actions)
|
|
201
|
-
? actions.filter(Boolean).map(function (action) { return action && actionsReducerMap[action.type](__assign({}, action, { item: item }), event); })
|
|
202
|
-
: actionsReducerMap[actions.type](__assign({}, actions, { item: item }));
|
|
202
|
+
? actions.filter(Boolean).map(function (action) { return action && actionsReducerMap[action.type](__assign(__assign({}, action), { item: item }), event); })
|
|
203
|
+
: actionsReducerMap[actions.type](__assign(__assign({}, actions), { item: item }));
|
|
203
204
|
}
|
|
204
205
|
}
|
|
205
206
|
if (onDoubleClick) {
|
|
@@ -211,8 +212,8 @@ exports.SchedulerEditItem = React.forwardRef(function (props, ref) {
|
|
|
211
212
|
var actions = onRemoveClickAction(event, props, state);
|
|
212
213
|
if (actions) {
|
|
213
214
|
Array.isArray(actions)
|
|
214
|
-
? actions.filter(Boolean).map(function (action) { return action && actionsReducerMap[action.type](__assign({}, action, { item: item }), event); })
|
|
215
|
-
: actionsReducerMap[actions.type](__assign({}, actions, { item: item }));
|
|
215
|
+
? actions.filter(Boolean).map(function (action) { return action && actionsReducerMap[action.type](__assign(__assign({}, action), { item: item }), event); })
|
|
216
|
+
: actionsReducerMap[actions.type](__assign(__assign({}, actions), { item: item }));
|
|
216
217
|
}
|
|
217
218
|
}
|
|
218
219
|
if (onRemoveClick) {
|
|
@@ -224,8 +225,8 @@ exports.SchedulerEditItem = React.forwardRef(function (props, ref) {
|
|
|
224
225
|
var actions = onPressAction(event, props, state);
|
|
225
226
|
if (actions) {
|
|
226
227
|
Array.isArray(actions)
|
|
227
|
-
? actions.filter(Boolean).map(function (action) { return action && actionsReducerMap[action.type](__assign({}, action, { item: item }), event); })
|
|
228
|
-
: actionsReducerMap[actions.type](__assign({}, actions, { item: item }), event);
|
|
228
|
+
? actions.filter(Boolean).map(function (action) { return action && actionsReducerMap[action.type](__assign(__assign({}, action), { item: item }), event); })
|
|
229
|
+
: actionsReducerMap[actions.type](__assign(__assign({}, actions), { item: item }), event);
|
|
229
230
|
}
|
|
230
231
|
}
|
|
231
232
|
if (onPress) {
|
|
@@ -237,8 +238,8 @@ exports.SchedulerEditItem = React.forwardRef(function (props, ref) {
|
|
|
237
238
|
var actions = onDragAction(event, props, state);
|
|
238
239
|
if (actions) {
|
|
239
240
|
Array.isArray(actions)
|
|
240
|
-
? actions.filter(Boolean).map(function (action) { return action && actionsReducerMap[action.type](__assign({}, action, { item: item }), event.dragEvent.originalEvent); })
|
|
241
|
-
: actionsReducerMap[actions.type](__assign({}, actions, { item: item }), event.dragEvent.originalEvent);
|
|
241
|
+
? actions.filter(Boolean).map(function (action) { return action && actionsReducerMap[action.type](__assign(__assign({}, action), { item: item }), event.dragEvent.originalEvent); })
|
|
242
|
+
: actionsReducerMap[actions.type](__assign(__assign({}, actions), { item: item }), event.dragEvent.originalEvent);
|
|
242
243
|
}
|
|
243
244
|
}
|
|
244
245
|
if (onDrag) {
|
|
@@ -250,8 +251,8 @@ exports.SchedulerEditItem = React.forwardRef(function (props, ref) {
|
|
|
250
251
|
var actions = onReleaseAction(event, props, state);
|
|
251
252
|
if (actions) {
|
|
252
253
|
Array.isArray(actions)
|
|
253
|
-
? actions.filter(Boolean).map(function (action) { return action && actionsReducerMap[action.type](__assign({}, action, { item: item }), event.dragEvent.originalEvent); })
|
|
254
|
-
: actionsReducerMap[actions.type](__assign({}, actions, { item: item }), event.dragEvent.originalEvent);
|
|
254
|
+
? actions.filter(Boolean).map(function (action) { return action && actionsReducerMap[action.type](__assign(__assign({}, action), { item: item }), event.dragEvent.originalEvent); })
|
|
255
|
+
: actionsReducerMap[actions.type](__assign(__assign({}, actions), { item: item }), event.dragEvent.originalEvent);
|
|
255
256
|
}
|
|
256
257
|
}
|
|
257
258
|
if (onRelease) {
|
|
@@ -263,8 +264,8 @@ exports.SchedulerEditItem = React.forwardRef(function (props, ref) {
|
|
|
263
264
|
var actions = onResizePressAction(event, props, state);
|
|
264
265
|
if (actions) {
|
|
265
266
|
Array.isArray(actions)
|
|
266
|
-
? actions.filter(Boolean).map(function (action) { return action && actionsReducerMap[action.type](__assign({}, action, { item: item }), event.dragEvent.originalEvent); })
|
|
267
|
-
: actionsReducerMap[actions.type](__assign({}, actions, { item: item }), event.dragEvent.originalEvent);
|
|
267
|
+
? actions.filter(Boolean).map(function (action) { return action && actionsReducerMap[action.type](__assign(__assign({}, action), { item: item }), event.dragEvent.originalEvent); })
|
|
268
|
+
: actionsReducerMap[actions.type](__assign(__assign({}, actions), { item: item }), event.dragEvent.originalEvent);
|
|
268
269
|
}
|
|
269
270
|
}
|
|
270
271
|
if (onResizePress) {
|
|
@@ -276,8 +277,8 @@ exports.SchedulerEditItem = React.forwardRef(function (props, ref) {
|
|
|
276
277
|
var actions = onResizeStartDragAction(event, props, state);
|
|
277
278
|
if (actions) {
|
|
278
279
|
Array.isArray(actions)
|
|
279
|
-
? actions.filter(Boolean).map(function (action) { return action && actionsReducerMap[action.type](__assign({}, action, { item: item }), event.dragEvent.originalEvent); })
|
|
280
|
-
: actionsReducerMap[actions.type](__assign({}, actions, { item: item }), event.dragEvent.originalEvent);
|
|
280
|
+
? actions.filter(Boolean).map(function (action) { return action && actionsReducerMap[action.type](__assign(__assign({}, action), { item: item }), event.dragEvent.originalEvent); })
|
|
281
|
+
: actionsReducerMap[actions.type](__assign(__assign({}, actions), { item: item }), event.dragEvent.originalEvent);
|
|
281
282
|
}
|
|
282
283
|
}
|
|
283
284
|
if (onResizeStartDrag) {
|
|
@@ -289,8 +290,8 @@ exports.SchedulerEditItem = React.forwardRef(function (props, ref) {
|
|
|
289
290
|
var actions = onResizeEndDragAction(event, props, state);
|
|
290
291
|
if (actions) {
|
|
291
292
|
Array.isArray(actions)
|
|
292
|
-
? actions.filter(Boolean).map(function (action) { return action && actionsReducerMap[action.type](__assign({}, action, { item: item }), event.dragEvent.originalEvent); })
|
|
293
|
-
: actionsReducerMap[actions.type](__assign({}, actions, { item: item }), event.dragEvent.originalEvent);
|
|
293
|
+
? actions.filter(Boolean).map(function (action) { return action && actionsReducerMap[action.type](__assign(__assign({}, action), { item: item }), event.dragEvent.originalEvent); })
|
|
294
|
+
: actionsReducerMap[actions.type](__assign(__assign({}, actions), { item: item }), event.dragEvent.originalEvent);
|
|
294
295
|
}
|
|
295
296
|
}
|
|
296
297
|
if (onResizeEndDrag) {
|
|
@@ -302,8 +303,8 @@ exports.SchedulerEditItem = React.forwardRef(function (props, ref) {
|
|
|
302
303
|
var actions = onResizeReleaseAction(event, props, state);
|
|
303
304
|
if (actions) {
|
|
304
305
|
Array.isArray(actions)
|
|
305
|
-
? actions.filter(Boolean).map(function (action) { return action && actionsReducerMap[action.type](__assign({}, action, { item: item }), event.dragEvent.originalEvent); })
|
|
306
|
-
: actionsReducerMap[actions.type](__assign({}, actions, { item: item }), event.dragEvent.originalEvent);
|
|
306
|
+
? actions.filter(Boolean).map(function (action) { return action && actionsReducerMap[action.type](__assign(__assign({}, action), { item: item }), event.dragEvent.originalEvent); })
|
|
307
|
+
: actionsReducerMap[actions.type](__assign(__assign({}, actions), { item: item }), event.dragEvent.originalEvent);
|
|
307
308
|
}
|
|
308
309
|
}
|
|
309
310
|
if (onResizeRelease) {
|
|
@@ -315,8 +316,8 @@ exports.SchedulerEditItem = React.forwardRef(function (props, ref) {
|
|
|
315
316
|
var actions = onFormSubmitAction(event, props, state);
|
|
316
317
|
if (actions) {
|
|
317
318
|
Array.isArray(actions)
|
|
318
|
-
? actions.filter(Boolean).map(function (action) { return action && actionsReducerMap[action.type](__assign({}, action, { item: item }), event); })
|
|
319
|
-
: actionsReducerMap[actions.type](__assign({}, actions, { item: item }), event);
|
|
319
|
+
? actions.filter(Boolean).map(function (action) { return action && actionsReducerMap[action.type](__assign(__assign({}, action), { item: item }), event); })
|
|
320
|
+
: actionsReducerMap[actions.type](__assign(__assign({}, actions), { item: item }), event);
|
|
320
321
|
}
|
|
321
322
|
}
|
|
322
323
|
if (onFormSubmit) {
|
|
@@ -328,8 +329,8 @@ exports.SchedulerEditItem = React.forwardRef(function (props, ref) {
|
|
|
328
329
|
var actions = onCancelAction(event, props, state);
|
|
329
330
|
if (actions) {
|
|
330
331
|
Array.isArray(actions)
|
|
331
|
-
? actions.filter(Boolean).map(function (action) { return action && actionsReducerMap[action.type](__assign({}, action, { item: item }), event); })
|
|
332
|
-
: actionsReducerMap[actions.type](__assign({}, actions, { item: item }), event);
|
|
332
|
+
? actions.filter(Boolean).map(function (action) { return action && actionsReducerMap[action.type](__assign(__assign({}, action), { item: item }), event); })
|
|
333
|
+
: actionsReducerMap[actions.type](__assign(__assign({}, actions), { item: item }), event);
|
|
333
334
|
}
|
|
334
335
|
}
|
|
335
336
|
if (onCancel) {
|
|
@@ -341,8 +342,8 @@ exports.SchedulerEditItem = React.forwardRef(function (props, ref) {
|
|
|
341
342
|
var actions = onOccurrenceClickAction(event, props, state);
|
|
342
343
|
if (actions) {
|
|
343
344
|
Array.isArray(actions)
|
|
344
|
-
? actions.filter(Boolean).map(function (action) { return action && actionsReducerMap[action.type](__assign({}, action, { item: item }), event); })
|
|
345
|
-
: actionsReducerMap[actions.type](__assign({}, actions, { item: item }), event);
|
|
345
|
+
? actions.filter(Boolean).map(function (action) { return action && actionsReducerMap[action.type](__assign(__assign({}, action), { item: item }), event); })
|
|
346
|
+
: actionsReducerMap[actions.type](__assign(__assign({}, actions), { item: item }), event);
|
|
346
347
|
}
|
|
347
348
|
}
|
|
348
349
|
if (onOccurrenceClick) {
|
|
@@ -354,8 +355,8 @@ exports.SchedulerEditItem = React.forwardRef(function (props, ref) {
|
|
|
354
355
|
var actions = onSeriesClickAction(event, props, state);
|
|
355
356
|
if (actions) {
|
|
356
357
|
Array.isArray(actions)
|
|
357
|
-
? actions.filter(Boolean).map(function (action) { return action && actionsReducerMap[action.type](__assign({}, action, { item: item }), event); })
|
|
358
|
-
: actionsReducerMap[actions.type](__assign({}, actions, { item: item }), event);
|
|
358
|
+
? actions.filter(Boolean).map(function (action) { return action && actionsReducerMap[action.type](__assign(__assign({}, action), { item: item }), event); })
|
|
359
|
+
: actionsReducerMap[actions.type](__assign(__assign({}, actions), { item: item }), event);
|
|
359
360
|
}
|
|
360
361
|
}
|
|
361
362
|
if (onSeriesClick) {
|
|
@@ -367,8 +368,8 @@ exports.SchedulerEditItem = React.forwardRef(function (props, ref) {
|
|
|
367
368
|
var actions = onKeyDownAction(event, props, state);
|
|
368
369
|
if (actions) {
|
|
369
370
|
Array.isArray(actions)
|
|
370
|
-
? actions.filter(Boolean).map(function (action) { return action && actionsReducerMap[action.type](__assign({}, action, { item: item }), event.syntheticEvent); })
|
|
371
|
-
: actionsReducerMap[actions.type](__assign({}, actions, { item: item }), event.syntheticEvent);
|
|
371
|
+
? actions.filter(Boolean).map(function (action) { return action && actionsReducerMap[action.type](__assign(__assign({}, action), { item: item }), event.syntheticEvent); })
|
|
372
|
+
: actionsReducerMap[actions.type](__assign(__assign({}, actions), { item: item }), event.syntheticEvent);
|
|
372
373
|
}
|
|
373
374
|
}
|
|
374
375
|
if (onKeyDown) {
|
|
@@ -380,8 +381,8 @@ exports.SchedulerEditItem = React.forwardRef(function (props, ref) {
|
|
|
380
381
|
var actions = onKeyUpAction(event, props, state);
|
|
381
382
|
if (actions) {
|
|
382
383
|
Array.isArray(actions)
|
|
383
|
-
? actions.filter(Boolean).map(function (action) { return action && actionsReducerMap[action.type](__assign({}, action, { item: item }), event.syntheticEvent); })
|
|
384
|
-
: actionsReducerMap[actions.type](__assign({}, actions, { item: item }), event.syntheticEvent);
|
|
384
|
+
? actions.filter(Boolean).map(function (action) { return action && actionsReducerMap[action.type](__assign(__assign({}, action), { item: item }), event.syntheticEvent); })
|
|
385
|
+
: actionsReducerMap[actions.type](__assign(__assign({}, actions), { item: item }), event.syntheticEvent);
|
|
385
386
|
}
|
|
386
387
|
}
|
|
387
388
|
if (onKeyUp) {
|
|
@@ -393,8 +394,8 @@ exports.SchedulerEditItem = React.forwardRef(function (props, ref) {
|
|
|
393
394
|
var actions = onRemoveConfirmAction(event, props, state);
|
|
394
395
|
if (actions) {
|
|
395
396
|
Array.isArray(actions)
|
|
396
|
-
? actions.filter(Boolean).map(function (action) { return action && actionsReducerMap[action.type](__assign({}, action, { item: item }), event.syntheticEvent); })
|
|
397
|
-
: actionsReducerMap[actions.type](__assign({}, actions, { item: item }), event.syntheticEvent);
|
|
397
|
+
? actions.filter(Boolean).map(function (action) { return action && actionsReducerMap[action.type](__assign(__assign({}, action), { item: item }), event.syntheticEvent); })
|
|
398
|
+
: actionsReducerMap[actions.type](__assign(__assign({}, actions), { item: item }), event.syntheticEvent);
|
|
398
399
|
}
|
|
399
400
|
}
|
|
400
401
|
if (onRemoveConfirm) {
|