@progress/kendo-react-scheduler 4.13.0-dev.202111230848 → 4.13.0-dev.202111291459
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 -2
- package/dist/es/components/BaseView.js +2 -1
- package/dist/es/context/SchedulerViewContext.d.ts +2 -1
- package/dist/es/hooks/index.d.ts +0 -1
- package/dist/es/hooks/index.js +0 -1
- package/dist/es/hooks/useSchedulerItem.js +1 -1
- package/dist/es/hooks/useSchedulerSlot.js +1 -1
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/recurrence/RecurrenceEditor.js +4 -2
- package/dist/npm/components/BaseView.js +3 -2
- package/dist/npm/context/SchedulerViewContext.d.ts +2 -1
- package/dist/npm/hooks/index.d.ts +0 -1
- package/dist/npm/hooks/index.js +0 -1
- package/dist/npm/hooks/useSchedulerItem.js +3 -3
- package/dist/npm/hooks/useSchedulerSlot.js +3 -3
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/recurrence/RecurrenceEditor.js +4 -2
- package/dist/systemjs/kendo-react-scheduler.js +1 -1
- package/package.json +12 -12
- package/dist/es/hooks/useCollection.d.ts +0 -14
- package/dist/es/hooks/useCollection.js +0 -26
- package/dist/npm/hooks/useCollection.d.ts +0 -14
- package/dist/npm/hooks/useCollection.js +0 -28
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { useCellSync,
|
|
2
|
+
import { useCellSync, useItemsFocus, useSlotsFocus } from '../hooks';
|
|
3
3
|
import { classNames } from '@progress/kendo-react-common';
|
|
4
4
|
import { SchedulerViewContext } from '../context/SchedulerViewContext';
|
|
5
5
|
import { ITEMS_SELECT_ACTION, useItemsSelection } from '../hooks/use-items-selection';
|
|
6
6
|
import { useSlotsSelection, SLOTS_SELECT_ACTION } from '../hooks/use-slots-selection';
|
|
7
|
+
import { useCollection } from '@progress/kendo-react-common';
|
|
7
8
|
/**
|
|
8
9
|
* @hidden
|
|
9
10
|
*/
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { SchedulerViewProps, Range } from '../models';
|
|
3
|
-
import {
|
|
3
|
+
import { SchedulerItemsFocusAction, SchedulerSlotsFocusAction } from '../hooks';
|
|
4
4
|
import { SchedulerSlotHandle, SchedulerItemHandle } from '../main';
|
|
5
5
|
import { SchedulerItemsSelectAction } from '../hooks/use-items-selection';
|
|
6
6
|
import { SchedulerSlotsSelectAction } from '../hooks/use-slots-selection';
|
|
7
|
+
import { CollectionAction } from '@progress/kendo-react-common';
|
|
7
8
|
/**
|
|
8
9
|
* @hidden
|
|
9
10
|
*/
|
package/dist/es/hooks/index.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ export * from './useCellSync';
|
|
|
3
3
|
export * from './useRowSync';
|
|
4
4
|
export * from './useAsyncMouseEnterLeave';
|
|
5
5
|
export * from './useEditable';
|
|
6
|
-
export * from './useCollection';
|
|
7
6
|
export * from './useSlotExpand';
|
|
8
7
|
export * from './useWorkHours';
|
|
9
8
|
export * from './useSchedulerItem';
|
package/dist/es/hooks/index.js
CHANGED
|
@@ -3,7 +3,6 @@ export * from './useCellSync';
|
|
|
3
3
|
export * from './useRowSync';
|
|
4
4
|
export * from './useAsyncMouseEnterLeave';
|
|
5
5
|
export * from './useEditable';
|
|
6
|
-
export * from './useCollection';
|
|
7
6
|
export * from './useSlotExpand';
|
|
8
7
|
export * from './useWorkHours';
|
|
9
8
|
export * from './useSchedulerItem';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useSchedulerViewItemsContext } from '../context';
|
|
3
|
-
import { COLLECTION_ACTION } from '
|
|
3
|
+
import { COLLECTION_ACTION } from '@progress/kendo-react-common';
|
|
4
4
|
/** @hidden */
|
|
5
5
|
export var useSchedulerItem = function (props, ref) {
|
|
6
6
|
var _ref = props._ref, itemRef = props.itemRef;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useSchedulerViewSlotsContext } from '../context';
|
|
3
|
-
import { COLLECTION_ACTION } from '
|
|
3
|
+
import { COLLECTION_ACTION } from '@progress/kendo-react-common';
|
|
4
4
|
/** @hidden */
|
|
5
5
|
export var useSchedulerSlot = function (props, ref) {
|
|
6
6
|
var _ref = props._ref;
|
|
@@ -5,7 +5,7 @@ export var packageMetadata = {
|
|
|
5
5
|
name: '@progress/kendo-react-scheduler',
|
|
6
6
|
productName: 'KendoReact',
|
|
7
7
|
productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
|
|
8
|
-
publishDate:
|
|
8
|
+
publishDate: 1638197590,
|
|
9
9
|
version: '',
|
|
10
10
|
licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning'
|
|
11
11
|
};
|
|
@@ -21,10 +21,12 @@ import { Label } from '@progress/kendo-react-labels';
|
|
|
21
21
|
import { NumericTextBox, RadioGroup } from '@progress/kendo-react-inputs';
|
|
22
22
|
import { DropDownList } from '@progress/kendo-react-dropdowns';
|
|
23
23
|
import { DatePicker } from '@progress/kendo-react-dateinputs';
|
|
24
|
+
import { useSchedulerPropsContext } from '../context';
|
|
24
25
|
/** @hidden */
|
|
25
26
|
export var RecurrenceEditor = function (props) {
|
|
26
27
|
var intl = useInternationalization();
|
|
27
28
|
var localization = useLocalization();
|
|
29
|
+
var timezone = useSchedulerPropsContext().timezone;
|
|
28
30
|
var _a = React.useState(1), defaultCount = _a[0], setDefaultCount = _a[1];
|
|
29
31
|
var _b = React.useState(ZonedDate.fromUTCDate(props.start)), defaultUntil = _b[0], setDefaultUntil = _b[1];
|
|
30
32
|
var localizeMessage = React.useCallback(function (baseMassage, removePrepend) {
|
|
@@ -62,7 +64,7 @@ export var RecurrenceEditor = function (props) {
|
|
|
62
64
|
newRrule.interval = 1;
|
|
63
65
|
if (newFreq === 'weekly') {
|
|
64
66
|
newRrule.byWeekDay = [{
|
|
65
|
-
day: props.start.getDay(),
|
|
67
|
+
day: ZonedDate.fromLocalDate(props.start, timezone).getDay(),
|
|
66
68
|
offset: 0
|
|
67
69
|
}];
|
|
68
70
|
}
|
|
@@ -73,7 +75,7 @@ export var RecurrenceEditor = function (props) {
|
|
|
73
75
|
newRrule.byMonth = [props.start.getMonth() + 1];
|
|
74
76
|
}
|
|
75
77
|
onChangeHandler(newRrule);
|
|
76
|
-
}, [onChangeHandler, props.start]);
|
|
78
|
+
}, [onChangeHandler, props.start, timezone]);
|
|
77
79
|
var handleIntervalChange = React.useCallback(function (event) {
|
|
78
80
|
var newInterval = event.value;
|
|
79
81
|
onChangeHandler(Object.assign({}, rrule, {
|
|
@@ -6,14 +6,15 @@ var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
|
6
6
|
var SchedulerViewContext_1 = require("../context/SchedulerViewContext");
|
|
7
7
|
var use_items_selection_1 = require("../hooks/use-items-selection");
|
|
8
8
|
var use_slots_selection_1 = require("../hooks/use-slots-selection");
|
|
9
|
+
var kendo_react_common_2 = require("@progress/kendo-react-common");
|
|
9
10
|
/**
|
|
10
11
|
* @hidden
|
|
11
12
|
*/
|
|
12
13
|
exports.BaseView = React.forwardRef(function (props, ref) {
|
|
13
14
|
var element = React.useRef(null);
|
|
14
15
|
React.useImperativeHandle(ref, function () { return element.current; });
|
|
15
|
-
var _a =
|
|
16
|
-
var _b =
|
|
16
|
+
var _a = kendo_react_common_2.useCollection([]), items = _a[0], dispatchItems = _a[1];
|
|
17
|
+
var _b = kendo_react_common_2.useCollection([]), slots = _b[0], dispatchSlots = _b[1];
|
|
17
18
|
var _c = hooks_1.useItemsFocus(items), focusedItems = _c[0], dispatchFocusedItems = _c[1];
|
|
18
19
|
var _d = hooks_1.useSlotsFocus(slots), focusedSlots = _d[0], dispatchFocusedSlots = _d[1];
|
|
19
20
|
var _e = use_items_selection_1.useItemsSelection(items), selectedItems = _e[0], dispatchSelectedItems = _e[1];
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { SchedulerViewProps, Range } from '../models';
|
|
3
|
-
import {
|
|
3
|
+
import { SchedulerItemsFocusAction, SchedulerSlotsFocusAction } from '../hooks';
|
|
4
4
|
import { SchedulerSlotHandle, SchedulerItemHandle } from '../main';
|
|
5
5
|
import { SchedulerItemsSelectAction } from '../hooks/use-items-selection';
|
|
6
6
|
import { SchedulerSlotsSelectAction } from '../hooks/use-slots-selection';
|
|
7
|
+
import { CollectionAction } from '@progress/kendo-react-common';
|
|
7
8
|
/**
|
|
8
9
|
* @hidden
|
|
9
10
|
*/
|
|
@@ -3,7 +3,6 @@ export * from './useCellSync';
|
|
|
3
3
|
export * from './useRowSync';
|
|
4
4
|
export * from './useAsyncMouseEnterLeave';
|
|
5
5
|
export * from './useEditable';
|
|
6
|
-
export * from './useCollection';
|
|
7
6
|
export * from './useSlotExpand';
|
|
8
7
|
export * from './useWorkHours';
|
|
9
8
|
export * from './useSchedulerItem';
|
package/dist/npm/hooks/index.js
CHANGED
|
@@ -8,7 +8,6 @@ __export(require("./useCellSync"));
|
|
|
8
8
|
__export(require("./useRowSync"));
|
|
9
9
|
__export(require("./useAsyncMouseEnterLeave"));
|
|
10
10
|
__export(require("./useEditable"));
|
|
11
|
-
__export(require("./useCollection"));
|
|
12
11
|
__export(require("./useSlotExpand"));
|
|
13
12
|
__export(require("./useWorkHours"));
|
|
14
13
|
__export(require("./useSchedulerItem"));
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var React = require("react");
|
|
4
4
|
var context_1 = require("../context");
|
|
5
|
-
var
|
|
5
|
+
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
6
6
|
/** @hidden */
|
|
7
7
|
exports.useSchedulerItem = function (props, ref) {
|
|
8
8
|
var _ref = props._ref, itemRef = props.itemRef;
|
|
@@ -15,12 +15,12 @@ exports.useSchedulerItem = function (props, ref) {
|
|
|
15
15
|
React.useImperativeHandle(itemRef, function () { return item.current; });
|
|
16
16
|
React.useLayoutEffect(function () {
|
|
17
17
|
dispatchItems({
|
|
18
|
-
type:
|
|
18
|
+
type: kendo_react_common_1.COLLECTION_ACTION.add,
|
|
19
19
|
item: item
|
|
20
20
|
});
|
|
21
21
|
return function () {
|
|
22
22
|
dispatchItems({
|
|
23
|
-
type:
|
|
23
|
+
type: kendo_react_common_1.COLLECTION_ACTION.remove,
|
|
24
24
|
item: item
|
|
25
25
|
});
|
|
26
26
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var React = require("react");
|
|
4
4
|
var context_1 = require("../context");
|
|
5
|
-
var
|
|
5
|
+
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
6
6
|
/** @hidden */
|
|
7
7
|
exports.useSchedulerSlot = function (props, ref) {
|
|
8
8
|
var _ref = props._ref;
|
|
@@ -14,12 +14,12 @@ exports.useSchedulerSlot = function (props, ref) {
|
|
|
14
14
|
React.useImperativeHandle(_ref, function () { return slot.current; });
|
|
15
15
|
React.useEffect(function () {
|
|
16
16
|
dispatchSlots({
|
|
17
|
-
type:
|
|
17
|
+
type: kendo_react_common_1.COLLECTION_ACTION.add,
|
|
18
18
|
item: slot
|
|
19
19
|
});
|
|
20
20
|
return function () {
|
|
21
21
|
dispatchSlots({
|
|
22
|
-
type:
|
|
22
|
+
type: kendo_react_common_1.COLLECTION_ACTION.remove,
|
|
23
23
|
item: slot
|
|
24
24
|
});
|
|
25
25
|
};
|
|
@@ -7,7 +7,7 @@ exports.packageMetadata = {
|
|
|
7
7
|
name: '@progress/kendo-react-scheduler',
|
|
8
8
|
productName: 'KendoReact',
|
|
9
9
|
productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
|
|
10
|
-
publishDate:
|
|
10
|
+
publishDate: 1638197590,
|
|
11
11
|
version: '',
|
|
12
12
|
licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning'
|
|
13
13
|
};
|
|
@@ -23,10 +23,12 @@ var kendo_react_labels_1 = require("@progress/kendo-react-labels");
|
|
|
23
23
|
var kendo_react_inputs_1 = require("@progress/kendo-react-inputs");
|
|
24
24
|
var kendo_react_dropdowns_1 = require("@progress/kendo-react-dropdowns");
|
|
25
25
|
var kendo_react_dateinputs_1 = require("@progress/kendo-react-dateinputs");
|
|
26
|
+
var context_1 = require("../context");
|
|
26
27
|
/** @hidden */
|
|
27
28
|
exports.RecurrenceEditor = function (props) {
|
|
28
29
|
var intl = kendo_react_intl_1.useInternationalization();
|
|
29
30
|
var localization = kendo_react_intl_1.useLocalization();
|
|
31
|
+
var timezone = context_1.useSchedulerPropsContext().timezone;
|
|
30
32
|
var _a = React.useState(1), defaultCount = _a[0], setDefaultCount = _a[1];
|
|
31
33
|
var _b = React.useState(kendo_date_math_1.ZonedDate.fromUTCDate(props.start)), defaultUntil = _b[0], setDefaultUntil = _b[1];
|
|
32
34
|
var localizeMessage = React.useCallback(function (baseMassage, removePrepend) {
|
|
@@ -64,7 +66,7 @@ exports.RecurrenceEditor = function (props) {
|
|
|
64
66
|
newRrule.interval = 1;
|
|
65
67
|
if (newFreq === 'weekly') {
|
|
66
68
|
newRrule.byWeekDay = [{
|
|
67
|
-
day: props.start.getDay(),
|
|
69
|
+
day: kendo_date_math_1.ZonedDate.fromLocalDate(props.start, timezone).getDay(),
|
|
68
70
|
offset: 0
|
|
69
71
|
}];
|
|
70
72
|
}
|
|
@@ -75,7 +77,7 @@ exports.RecurrenceEditor = function (props) {
|
|
|
75
77
|
newRrule.byMonth = [props.start.getMonth() + 1];
|
|
76
78
|
}
|
|
77
79
|
onChangeHandler(newRrule);
|
|
78
|
-
}, [onChangeHandler, props.start]);
|
|
80
|
+
}, [onChangeHandler, props.start, timezone]);
|
|
79
81
|
var handleIntervalChange = React.useCallback(function (event) {
|
|
80
82
|
var newInterval = event.value;
|
|
81
83
|
onChangeHandler(Object.assign({}, rrule, {
|