@progress/kendo-react-scheduler 5.4.0-dev.202205250548 → 5.4.0-dev.202205271059
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.js +12 -7
- package/dist/es/components/DateHeaderCell.js +4 -2
- package/dist/es/components/SchedulerForm.js +5 -3
- 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.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/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.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 +7 -2
- package/dist/es/hooks/use-slots-focus.d.ts +6 -6
- package/dist/es/hooks/use-slots-selection.js +6 -1
- package/dist/es/hooks/useAsyncMouseEnterLeave.d.ts +2 -2
- 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/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/SchedulerViewItem.js +4 -2
- package/dist/es/items/hooks/use-drag-item.d.ts +6 -2
- package/dist/es/items/hooks/use-drag-item.js +6 -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 +7 -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 +11 -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 +7 -2
- package/dist/es/slots/SchedulerEditSlot.js +4 -2
- 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 +14 -14
- package/dist/es/utils/index.js +13 -8
- package/dist/es/views/common/utils.d.ts +2 -2
- package/dist/es/views/common/utils.js +7 -2
- package/dist/es/views/day/MultiDayView.js +8 -3
- package/dist/es/views/week/WorkWeekView.js +4 -2
- package/dist/npm/Scheduler.js +13 -7
- package/dist/npm/components/BaseView.js +1 -0
- package/dist/npm/components/CurrentTimeMarket.js +3 -1
- package/dist/npm/components/DateHeaderCell.js +5 -2
- package/dist/npm/components/SchedulerForm.js +6 -3
- package/dist/npm/components/SchedulerOccurrenceDialog.js +1 -0
- package/dist/npm/components/SchedulerRemoveDialog.js +1 -0
- package/dist/npm/components/ShowMoreItemsButton.js +1 -0
- package/dist/npm/components/TimeHeaderCell.js +5 -2
- package/dist/npm/components/footer/SchedulerFooter.js +5 -2
- package/dist/npm/components/footer/bussiness-hours/BussinessHours.js +5 -2
- package/dist/npm/components/header/SchedulerHeader.js +5 -2
- package/dist/npm/components/header/navigation/NavigationDatePicker.js +2 -1
- package/dist/npm/components/header/navigation/SchedulerNavigation.js +5 -2
- package/dist/npm/components/header/view-selector/SchedulerViewSelector.js +5 -2
- package/dist/npm/components/header/view-selector/ViewSelectorItem.js +3 -1
- package/dist/npm/components/header/view-selector/ViewSelectorList.d.ts +1 -1
- package/dist/npm/components/header/view-selector/ViewSelectorList.js +2 -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 +15 -8
- package/dist/npm/editors/FilterableComboBox.js +7 -3
- package/dist/npm/editors/ResourceEditor.js +3 -1
- package/dist/npm/editors/SchedulerFormEditor.js +5 -2
- package/dist/npm/editors/ZonedDateTime.js +7 -3
- package/dist/npm/editors/common.js +5 -2
- package/dist/npm/hooks/index.js +20 -13
- package/dist/npm/hooks/use-items-focus.d.ts +1 -1
- package/dist/npm/hooks/use-items-focus.js +3 -1
- package/dist/npm/hooks/use-items-selection.d.ts +1 -1
- package/dist/npm/hooks/use-items-selection.js +10 -3
- package/dist/npm/hooks/use-slots-focus.d.ts +6 -6
- package/dist/npm/hooks/use-slots-focus.js +11 -5
- package/dist/npm/hooks/use-slots-selection.js +9 -2
- package/dist/npm/hooks/useAsyncMouseEnterLeave.d.ts +2 -2
- package/dist/npm/hooks/useAsyncMouseEnterLeave.js +3 -1
- package/dist/npm/hooks/useCellSync.js +3 -1
- 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.js +3 -1
- package/dist/npm/hooks/useSchedulerItem.d.ts +1 -1
- package/dist/npm/hooks/useSchedulerItem.js +3 -1
- package/dist/npm/hooks/useSchedulerSlot.d.ts +1 -1
- package/dist/npm/hooks/useSchedulerSlot.js +3 -1
- package/dist/npm/hooks/useSlotExpand.js +4 -2
- package/dist/npm/hooks/useWorkHours.js +3 -1
- package/dist/npm/items/SchedulerEditItem.js +41 -40
- package/dist/npm/items/SchedulerItem.js +1 -0
- package/dist/npm/items/SchedulerItemContent.js +1 -0
- package/dist/npm/items/SchedulerViewItem.js +5 -2
- package/dist/npm/items/hooks/use-drag-item.d.ts +6 -2
- package/dist/npm/items/hooks/use-drag-item.js +9 -2
- package/dist/npm/items/hooks/use-form-item.d.ts +5 -1
- package/dist/npm/items/hooks/use-form-item.js +3 -1
- 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 +10 -3
- package/dist/npm/items/hooks/use-series.d.ts +2 -1
- package/dist/npm/items/hooks/use-series.js +3 -1
- package/dist/npm/items/hooks/use-show-occurrence-dialog.d.ts +2 -1
- package/dist/npm/items/hooks/use-show-occurrence-dialog.js +3 -1
- 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 +3 -1
- 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 +27 -0
- package/dist/npm/package-metadata.js +2 -1
- package/dist/npm/recurrence/RecurrenceEditor.js +3 -1
- package/dist/npm/recurrence/RecurrenceFrequencyEditor.js +7 -3
- package/dist/npm/recurrence/RecurrenceRepeatOnWeekEditor.js +14 -5
- package/dist/npm/recurrence/common.d.ts +5 -5
- package/dist/npm/recurrence/common.js +37 -18
- package/dist/npm/reducers/editReducer.js +9 -7
- package/dist/npm/reducers/index.js +11 -4
- package/dist/npm/services/index.js +14 -7
- package/dist/npm/services/itemsService.js +10 -11
- package/dist/npm/services/occurrenceService.d.ts +2 -2
- package/dist/npm/services/occurrenceService.js +10 -3
- package/dist/npm/services/rangeService.js +3 -1
- package/dist/npm/services/slotsService.js +3 -1
- package/dist/npm/slots/SchedulerEditSlot.js +5 -2
- package/dist/npm/slots/SchedulerSlot.js +1 -0
- package/dist/npm/slots/SchedulerViewSlot.js +5 -2
- package/dist/npm/tasks/SchedulerEditTask.js +5 -2
- package/dist/npm/tasks/SchedulerTask.js +1 -0
- package/dist/npm/tasks/SchedulerViewTask.js +5 -2
- package/dist/npm/utils/index.d.ts +14 -14
- package/dist/npm/utils/index.js +91 -46
- package/dist/npm/views/agenda/AgendaView.js +3 -1
- package/dist/npm/views/agenda/AgendaViewHeaderItem.js +3 -1
- package/dist/npm/views/common/HorizontalResourceIterator.js +5 -2
- package/dist/npm/views/common/SchedulerDrag.js +3 -1
- package/dist/npm/views/common/SchedulerResize.js +3 -1
- package/dist/npm/views/common/VerticalResourceIterator.js +3 -1
- package/dist/npm/views/common/utils.d.ts +2 -2
- package/dist/npm/views/common/utils.js +26 -11
- package/dist/npm/views/day/DayView.js +3 -1
- package/dist/npm/views/day/DayViewAllDayRowContent.js +3 -1
- package/dist/npm/views/day/DayViewGroupRowContent.js +3 -1
- package/dist/npm/views/day/DayViewRowContent.js +3 -1
- package/dist/npm/views/day/MultiDayView.js +11 -4
- package/dist/npm/views/month/MonthView.js +3 -1
- package/dist/npm/views/time/MultiDayTimelineView.js +3 -1
- package/dist/npm/views/time/TimelineView.js +3 -1
- package/dist/npm/views/time/TimelineViewAllEventsRowContent.js +3 -1
- package/dist/npm/views/time/TimelineViewRowContent.js +3 -1
- package/dist/npm/views/week/WeekView.js +3 -1
- package/dist/npm/views/week/WorkWeekView.js +7 -3
- package/dist/systemjs/kendo-react-scheduler.js +1 -1
- package/package.json +12 -12
|
@@ -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) {
|
|
@@ -43,3 +44,4 @@ exports.useRowSync = function (args, inputs) {
|
|
|
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,10 +1,11 @@
|
|
|
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);
|
|
@@ -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,10 +1,11 @@
|
|
|
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);
|
|
@@ -29,3 +30,4 @@ exports.useSchedulerSlot = function (props, ref) {
|
|
|
29
30
|
element: element
|
|
30
31
|
};
|
|
31
32
|
};
|
|
33
|
+
exports.useSchedulerSlot = useSchedulerSlot;
|
|
@@ -1,11 +1,12 @@
|
|
|
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
12
|
var scheduler = context_1.useSchedulerElementContext();
|
|
@@ -51,7 +52,7 @@ exports.useSlotExpand = function (slot, config) {
|
|
|
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 useWorkHours = function (showWorkHours, defaultShowWorkHours) {
|
|
7
8
|
var _a = _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");
|
|
@@ -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) {
|
|
@@ -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.SchedulerItem = void 0;
|
|
14
15
|
var React = require("react");
|
|
15
16
|
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
16
17
|
var kendo_react_intl_1 = require("@progress/kendo-react-intl");
|
|
@@ -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.SchedulerItemContent = void 0;
|
|
14
15
|
var React = require("react");
|
|
15
16
|
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
16
17
|
/* eslint-disable max-len */
|
|
@@ -15,11 +15,14 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
15
15
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
16
|
t[p] = s[p];
|
|
17
17
|
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++)
|
|
19
|
-
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
20
22
|
return t;
|
|
21
23
|
};
|
|
22
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.SchedulerViewItem = void 0;
|
|
23
26
|
var React = require("react");
|
|
24
27
|
var SchedulerItem_1 = require("./SchedulerItem");
|
|
25
28
|
var utils_1 = require("../utils");
|
|
@@ -31,8 +31,12 @@ export interface SchedulerItemDragItemAction {
|
|
|
31
31
|
}
|
|
32
32
|
/** @hidden */
|
|
33
33
|
export declare const useDragItem: (config: {
|
|
34
|
-
dataItem:
|
|
34
|
+
dataItem: DataItem;
|
|
35
35
|
ignoreIsAllDay?: boolean;
|
|
36
36
|
isAllDay?: boolean;
|
|
37
37
|
onDataAction?: any;
|
|
38
|
-
}, state: [
|
|
38
|
+
}, state: [
|
|
39
|
+
DataItem,
|
|
40
|
+
DataItem,
|
|
41
|
+
any
|
|
42
|
+
]) => any[];
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
3
|
+
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
4
|
+
to[j] = from[i];
|
|
5
|
+
return to;
|
|
6
|
+
};
|
|
2
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.useDragItem = exports.DRAG_ITEM_ACTION = void 0;
|
|
3
9
|
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
4
10
|
var React = require("react");
|
|
5
11
|
var context_1 = require("../../context");
|
|
@@ -32,7 +38,7 @@ var DRAG_ITEM_ACTION;
|
|
|
32
38
|
})(DRAG_ITEM_ACTION = exports.DRAG_ITEM_ACTION || (exports.DRAG_ITEM_ACTION = {}));
|
|
33
39
|
;
|
|
34
40
|
/** @hidden */
|
|
35
|
-
|
|
41
|
+
var useDragItem = function (config, state) {
|
|
36
42
|
var offset = React.useRef(0);
|
|
37
43
|
var initialXRef = React.useRef(0);
|
|
38
44
|
var initialYRef = React.useRef(0);
|
|
@@ -83,7 +89,7 @@ exports.useDragItem = function (config, state) {
|
|
|
83
89
|
return selectedDataItem;
|
|
84
90
|
}).filter(Boolean);
|
|
85
91
|
oldSlot.current = slot;
|
|
86
|
-
setDragItem(newDragItems
|
|
92
|
+
setDragItem(__spreadArray([], newDragItems));
|
|
87
93
|
break;
|
|
88
94
|
}
|
|
89
95
|
case DRAG_ITEM_ACTION.start: {
|
|
@@ -200,3 +206,4 @@ exports.useDragItem = function (config, state) {
|
|
|
200
206
|
};
|
|
201
207
|
return [dragItem, setDragItem, handleDragItemAction];
|
|
202
208
|
};
|
|
209
|
+
exports.useDragItem = useDragItem;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useFormItem = exports.FORM_ITEM_ACTION = void 0;
|
|
3
4
|
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
4
5
|
var context_1 = require("../../context");
|
|
5
6
|
var useControlledState_1 = require("../../hooks/useControlledState");
|
|
@@ -14,7 +15,7 @@ var FORM_ITEM_ACTION;
|
|
|
14
15
|
FORM_ITEM_ACTION["complete"] = "FORM_ITEM_COMPLETE";
|
|
15
16
|
})(FORM_ITEM_ACTION = exports.FORM_ITEM_ACTION || (exports.FORM_ITEM_ACTION = {}));
|
|
16
17
|
/** @hidden */
|
|
17
|
-
|
|
18
|
+
var useFormItem = function (config, state) {
|
|
18
19
|
var _a = useControlledState_1.useControlledState.apply(void 0, state), formItem = _a[0], setFormItem = _a[1];
|
|
19
20
|
var fields = context_1.useSchedulerFieldsContext();
|
|
20
21
|
var data = context_1.useSchedulerDataContext()[0];
|
|
@@ -48,3 +49,4 @@ exports.useFormItem = function (config, state) {
|
|
|
48
49
|
};
|
|
49
50
|
return [formItem, setFormItem, handleFormItemAction];
|
|
50
51
|
};
|
|
52
|
+
exports.useFormItem = useFormItem;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useRemoveItem = exports.REMOVE_ITEM_ACTION = void 0;
|
|
3
4
|
var useControlledState_1 = require("../../hooks/useControlledState");
|
|
4
5
|
var Scheduler_1 = require("../../Scheduler");
|
|
5
6
|
/**
|
|
@@ -17,7 +18,7 @@ var REMOVE_ITEM_ACTION;
|
|
|
17
18
|
REMOVE_ITEM_ACTION["complete"] = "REMOVE_ITEM_COMPLETE";
|
|
18
19
|
})(REMOVE_ITEM_ACTION = exports.REMOVE_ITEM_ACTION || (exports.REMOVE_ITEM_ACTION = {}));
|
|
19
20
|
/** @hidden */
|
|
20
|
-
|
|
21
|
+
var useRemoveItem = function (config, state) {
|
|
21
22
|
var _a = useControlledState_1.useControlledState.apply(void 0, state), removeItem = _a[0], setRemoveItem = _a[1];
|
|
22
23
|
var handleRemoveItemAction = function (action) {
|
|
23
24
|
var newRemoveItem;
|
|
@@ -46,3 +47,4 @@ exports.useRemoveItem = function (config, state) {
|
|
|
46
47
|
};
|
|
47
48
|
return [removeItem, setRemoveItem, handleRemoveItemAction];
|
|
48
49
|
};
|
|
50
|
+
exports.useRemoveItem = useRemoveItem;
|
|
@@ -36,6 +36,10 @@ export interface SchedulerItemResizeItemAction {
|
|
|
36
36
|
}
|
|
37
37
|
/** @hidden */
|
|
38
38
|
export declare const useResizeItem: (config: {
|
|
39
|
-
dataItem:
|
|
39
|
+
dataItem: DataItem;
|
|
40
40
|
onDataAction: any;
|
|
41
|
-
}, state: [
|
|
41
|
+
}, state: [
|
|
42
|
+
DataItem,
|
|
43
|
+
DataItem,
|
|
44
|
+
any
|
|
45
|
+
]) => any[];
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
3
|
+
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
4
|
+
to[j] = from[i];
|
|
5
|
+
return to;
|
|
6
|
+
};
|
|
2
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.useResizeItem = exports.RESIZE_ITEM_ACTION = void 0;
|
|
3
9
|
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
4
10
|
var React = require("react");
|
|
5
11
|
var context_1 = require("../../context");
|
|
@@ -36,7 +42,7 @@ var RESIZE_ITEM_ACTION;
|
|
|
36
42
|
})(RESIZE_ITEM_ACTION = exports.RESIZE_ITEM_ACTION || (exports.RESIZE_ITEM_ACTION = {}));
|
|
37
43
|
;
|
|
38
44
|
/** @hidden */
|
|
39
|
-
|
|
45
|
+
var useResizeItem = function (config, state) {
|
|
40
46
|
var oldSlot = React.useRef(null);
|
|
41
47
|
var _a = useControlledState_1.useControlledState.apply(void 0, state), resizeItem = _a[0], setResizeItem = _a[1];
|
|
42
48
|
var selectedItems = context_1.useSchedulerViewSelectedItemsContext()[0];
|
|
@@ -105,7 +111,7 @@ exports.useResizeItem = function (config, state) {
|
|
|
105
111
|
return selectedDataItem;
|
|
106
112
|
}).filter(Boolean);
|
|
107
113
|
if (!unreachable_1) {
|
|
108
|
-
newResizeItem = newResizeItems
|
|
114
|
+
newResizeItem = __spreadArray([], newResizeItems);
|
|
109
115
|
}
|
|
110
116
|
break;
|
|
111
117
|
}
|
|
@@ -183,7 +189,7 @@ exports.useResizeItem = function (config, state) {
|
|
|
183
189
|
return selectedDataItem;
|
|
184
190
|
}).filter(Boolean);
|
|
185
191
|
if (!unreachable_2) {
|
|
186
|
-
newResizeItem = newResizeItems
|
|
192
|
+
newResizeItem = __spreadArray([], newResizeItems);
|
|
187
193
|
}
|
|
188
194
|
break;
|
|
189
195
|
}
|
|
@@ -243,3 +249,4 @@ exports.useResizeItem = function (config, state) {
|
|
|
243
249
|
};
|
|
244
250
|
return [resizeItem, setResizeItem, handleDragItemAction];
|
|
245
251
|
};
|
|
252
|
+
exports.useResizeItem = useResizeItem;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DataItem } from '../../models';
|
|
1
2
|
/**
|
|
2
3
|
* Represents the available `action` types for the `SchedulerItemSeriesAction` objects.
|
|
3
4
|
*
|
|
@@ -19,4 +20,4 @@ export declare type SchedulerItemSeriesAction = {
|
|
|
19
20
|
payload?: boolean;
|
|
20
21
|
};
|
|
21
22
|
/** @hidden */
|
|
22
|
-
export declare const useSeries: (defaultProp:
|
|
23
|
+
export declare const useSeries: (defaultProp: DataItem, prop?: DataItem, callback?: any) => any[];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useSeries = exports.SERIES_ACTION = void 0;
|
|
3
4
|
var useControlledState_1 = require("../../hooks/useControlledState");
|
|
4
5
|
/**
|
|
5
6
|
* Represents the available `action` types for the `SchedulerItemSeriesAction` objects.
|
|
@@ -28,7 +29,7 @@ var seriesReducer = function (state, action) {
|
|
|
28
29
|
}
|
|
29
30
|
};
|
|
30
31
|
/** @hidden */
|
|
31
|
-
|
|
32
|
+
var useSeries = function (defaultProp, prop, callback) {
|
|
32
33
|
var _a = useControlledState_1.useControlledState(defaultProp, prop, callback), series = _a[0], setSeries = _a[1];
|
|
33
34
|
var handleSeriesAction = function (action) {
|
|
34
35
|
var newSeries = seriesReducer(series, action);
|
|
@@ -36,3 +37,4 @@ exports.useSeries = function (defaultProp, prop, callback) {
|
|
|
36
37
|
};
|
|
37
38
|
return [series, setSeries, handleSeriesAction];
|
|
38
39
|
};
|
|
40
|
+
exports.useSeries = useSeries;
|