@progress/kendo-react-scheduler 5.6.0-dev.202208120836 → 5.6.0-dev.202208261541
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/about.md +1 -1
- package/dist/cdn/js/kendo-react-scheduler.js +1 -1
- package/dist/es/Scheduler.js +3 -2
- package/dist/es/components/ShowMoreItemsButton.js +5 -1
- package/dist/es/components/header/navigation/NavigationDatePicker.js +1 -1
- package/dist/es/context/SchedulerContext.d.ts +17 -1
- package/dist/es/context/SchedulerContext.js +15 -2
- package/dist/es/items/SchedulerEditItem.js +6 -3
- package/dist/es/items/SchedulerItem.js +1 -1
- package/dist/es/messages/index.d.ts +3 -0
- package/dist/es/messages/index.js +3 -0
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/services/occurrenceService.js +2 -2
- package/dist/es/slots/SchedulerSlot.js +1 -1
- package/dist/npm/Scheduler.js +3 -2
- package/dist/npm/components/ShowMoreItemsButton.js +5 -1
- package/dist/npm/components/header/navigation/NavigationDatePicker.js +1 -1
- package/dist/npm/context/SchedulerContext.d.ts +17 -1
- package/dist/npm/context/SchedulerContext.js +17 -3
- package/dist/npm/items/SchedulerEditItem.js +4 -1
- package/dist/npm/items/SchedulerItem.js +1 -1
- package/dist/npm/messages/index.d.ts +3 -0
- package/dist/npm/messages/index.js +4 -1
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/services/occurrenceService.js +2 -2
- package/dist/npm/slots/SchedulerSlot.js +1 -1
- package/dist/systemjs/kendo-react-scheduler.js +1 -1
- package/package.json +13 -13
package/dist/es/Scheduler.js
CHANGED
|
@@ -277,18 +277,19 @@ export var Scheduler = React.forwardRef(function (props, ref) {
|
|
|
277
277
|
var Footer = view.props.footer || props.footer || defaultProps.footer;
|
|
278
278
|
var Navigation = SchedulerNavigation;
|
|
279
279
|
var ViewSelector = SchedulerViewSelector;
|
|
280
|
+
var _d = React.useState(null), eventSelection = _d[0], setEventSelection = _d[1];
|
|
280
281
|
return (React.createElement(SchedulerContext
|
|
281
282
|
// Static
|
|
282
283
|
, {
|
|
283
284
|
// Static
|
|
284
285
|
element: element, props: props, views: views, fields: fields, groups: groups, dateRange: dateRange, orientation: orientation, dateFormat: { dateFormat: dateFormat, shortDateFormat: shortDateFormat },
|
|
285
286
|
// State
|
|
286
|
-
date: [date, handleDateChange], activeView: [activeViewName, handleActiveViewNameChange],
|
|
287
|
+
date: [date, handleDateChange], activeView: [activeViewName, handleActiveViewNameChange], selection: [eventSelection, setEventSelection],
|
|
287
288
|
// Reducers
|
|
288
289
|
data: [data, handleDataAction] },
|
|
289
290
|
React.createElement("div", { ref: element, id: props.id, style: style, className: className, tabIndex: props.tabIndex,
|
|
290
291
|
// Aria
|
|
291
|
-
dir: dir, role: props.role, "aria-label": props.ariaLabel, "aria-labelledby": props.ariaLabelledby,
|
|
292
|
+
dir: dir, role: props.role, "aria-label": props.ariaLabel, "aria-labelledby": props.ariaLabelledby, "aria-activedescendant": (eventSelection && eventSelection.props.id) || undefined,
|
|
292
293
|
// Handlers
|
|
293
294
|
onFocus: handleFocus, onBlur: handleBlur },
|
|
294
295
|
React.createElement(Header, null,
|
|
@@ -11,12 +11,15 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
import * as React from 'react';
|
|
13
13
|
import { Button } from '@progress/kendo-react-buttons';
|
|
14
|
+
import { useLocalization } from '@progress/kendo-react-intl';
|
|
15
|
+
import { messages, moreEvents } from '../messages';
|
|
14
16
|
/**
|
|
15
17
|
* @hidden
|
|
16
18
|
*/
|
|
17
19
|
export var ShowMoreItemsButton = React.forwardRef(function (props, ref) {
|
|
18
20
|
var btn = React.useRef(null);
|
|
19
21
|
var element = React.useRef(null);
|
|
22
|
+
var localization = useLocalization();
|
|
20
23
|
React.useImperativeHandle(btn, function () { return (__assign({ element: element.current && element.current.element }, props)); });
|
|
21
24
|
React.useImperativeHandle(ref, function () { return btn.current; });
|
|
22
25
|
var handleClick = React.useCallback(function (syntheticEvent) {
|
|
@@ -32,7 +35,8 @@ export var ShowMoreItemsButton = React.forwardRef(function (props, ref) {
|
|
|
32
35
|
props.slot,
|
|
33
36
|
props.onClick
|
|
34
37
|
]);
|
|
35
|
-
|
|
38
|
+
var moreEventsLabel = localization.toLanguageString(moreEvents, messages[moreEvents]);
|
|
39
|
+
return (React.createElement(Button, { ref: element, tabIndex: -1, className: "k-more-events", onClick: handleClick, "aria-label": moreEventsLabel },
|
|
36
40
|
React.createElement("span", { className: "k-icon k-i-more-horizontal" })));
|
|
37
41
|
});
|
|
38
42
|
ShowMoreItemsButton.displayName = 'KendoReactSchedulerShowMoreItemsButton';
|
|
@@ -48,7 +48,7 @@ var SchedulerNavigationDatePickerToggleButton = function (props) {
|
|
|
48
48
|
: dateRange.zonedStart, isMonthView
|
|
49
49
|
? date
|
|
50
50
|
: dateRange.zonedEnd.addDays(-1));
|
|
51
|
-
return (React.createElement(Button, __assign({}, props, { className: "k-nav-current", tabIndex: -1, fillMode: 'flat' }),
|
|
51
|
+
return (React.createElement(Button, __assign({}, props, { className: "k-nav-current", tabIndex: -1, fillMode: 'flat', "aria-live": "polite" }),
|
|
52
52
|
React.createElement("span", { className: "k-sm-date-format" }, shortText),
|
|
53
53
|
React.createElement("span", { className: "k-lg-date-format" }, text)));
|
|
54
54
|
};
|
|
@@ -17,6 +17,7 @@ export interface SchedulerContextProps {
|
|
|
17
17
|
orientation: SchedulerOrientationContextType;
|
|
18
18
|
date: SchedulerDateContextType;
|
|
19
19
|
activeView: SchedulerActiveViewContextType;
|
|
20
|
+
selection: SchedulerItemSelectionContextType;
|
|
20
21
|
data: SchedulerDataContextType;
|
|
21
22
|
}
|
|
22
23
|
/** @hidden */
|
|
@@ -208,5 +209,20 @@ export declare const SchedulerActiveViewContext: React.Context<SchedulerActiveVi
|
|
|
208
209
|
* @returns
|
|
209
210
|
*/
|
|
210
211
|
export declare const useSchedulerActiveViewContext: () => SchedulerActiveViewContextType;
|
|
212
|
+
/**
|
|
213
|
+
* @hidden
|
|
214
|
+
*/
|
|
215
|
+
export declare type SchedulerItemSelectionContextType = [any, any];
|
|
216
|
+
/**
|
|
217
|
+
* @hidden
|
|
218
|
+
*/
|
|
219
|
+
export declare const SchedulerItemSelectionContext: React.Context<SchedulerItemSelectionContextType>;
|
|
220
|
+
/**
|
|
221
|
+
* @hidden
|
|
222
|
+
*/
|
|
223
|
+
export declare const useSchedulerItemSelectionContext: () => SchedulerItemSelectionContextType;
|
|
224
|
+
/**
|
|
225
|
+
*
|
|
226
|
+
*/
|
|
211
227
|
/** @hidden */
|
|
212
|
-
export declare const SchedulerContext: ({ children, element, props, views, fields, groups, dateRange, dateFormat, orientation, date, data, activeView }: SchedulerContextProps) => JSX.Element;
|
|
228
|
+
export declare const SchedulerContext: ({ children, element, props, views, fields, groups, dateRange, dateFormat, orientation, date, data, activeView, selection }: SchedulerContextProps) => JSX.Element;
|
|
@@ -157,9 +157,21 @@ export var SchedulerActiveViewContext = React.createContext(['day', noop]);
|
|
|
157
157
|
*/
|
|
158
158
|
export var useSchedulerActiveViewContext = function () { return React.useContext(SchedulerActiveViewContext); };
|
|
159
159
|
SchedulerActiveViewContext.displayName = 'SchedulerActiveViewContext';
|
|
160
|
+
/**
|
|
161
|
+
* @hidden
|
|
162
|
+
*/
|
|
163
|
+
export var SchedulerItemSelectionContext = React.createContext([null, function () { }]);
|
|
164
|
+
/**
|
|
165
|
+
* @hidden
|
|
166
|
+
*/
|
|
167
|
+
export var useSchedulerItemSelectionContext = function () { return React.useContext(SchedulerItemSelectionContext); };
|
|
168
|
+
SchedulerItemSelectionContext.displayName = 'SchedulerItemSelectionContext';
|
|
169
|
+
/**
|
|
170
|
+
*
|
|
171
|
+
*/
|
|
160
172
|
/** @hidden */
|
|
161
173
|
export var SchedulerContext = function (_a) {
|
|
162
|
-
var children = _a.children, element = _a.element, props = _a.props, views = _a.views, fields = _a.fields, groups = _a.groups, dateRange = _a.dateRange, dateFormat = _a.dateFormat, orientation = _a.orientation, date = _a.date, data = _a.data, activeView = _a.activeView;
|
|
174
|
+
var children = _a.children, element = _a.element, props = _a.props, views = _a.views, fields = _a.fields, groups = _a.groups, dateRange = _a.dateRange, dateFormat = _a.dateFormat, orientation = _a.orientation, date = _a.date, data = _a.data, activeView = _a.activeView, selection = _a.selection;
|
|
163
175
|
return (React.createElement(SchedulerElementContext.Provider, { value: element },
|
|
164
176
|
React.createElement(SchedulerPropsContext.Provider, { value: props },
|
|
165
177
|
React.createElement(SchedulerViewsContext.Provider, { value: views },
|
|
@@ -170,5 +182,6 @@ export var SchedulerContext = function (_a) {
|
|
|
170
182
|
React.createElement(SchedulerOrientationContext.Provider, { value: orientation },
|
|
171
183
|
React.createElement(SchedulerDateContext.Provider, { value: date },
|
|
172
184
|
React.createElement(SchedulerDataContext.Provider, { value: data },
|
|
173
|
-
React.createElement(SchedulerActiveViewContext.Provider, { value: activeView },
|
|
185
|
+
React.createElement(SchedulerActiveViewContext.Provider, { value: activeView },
|
|
186
|
+
React.createElement(SchedulerItemSelectionContext.Provider, { value: selection }, children)))))))))))));
|
|
174
187
|
};
|
|
@@ -13,12 +13,12 @@ import * as React from 'react';
|
|
|
13
13
|
import { SchedulerOccurrenceDialog } from '../components/SchedulerOccurrenceDialog';
|
|
14
14
|
import { SchedulerForm } from '../components/SchedulerForm';
|
|
15
15
|
import { SchedulerRemoveDialog } from '../components/SchedulerRemoveDialog';
|
|
16
|
-
import { Keys } from '@progress/kendo-react-common';
|
|
16
|
+
import { Keys, guid } from '@progress/kendo-react-common';
|
|
17
17
|
import { SchedulerDrag } from '../views/common/SchedulerDrag';
|
|
18
18
|
import { SchedulerResize } from '../views/common/SchedulerResize';
|
|
19
19
|
import { SchedulerViewItem } from './SchedulerViewItem';
|
|
20
20
|
import { ITEMS_FOCUS_ACTION, SLOTS_FOCUS_ACTION, useEditable } from '../hooks';
|
|
21
|
-
import { useSchedulerViewFocusedItemsContext, useSchedulerViewFocusedSlotsContext, useSchedulerViewSelectedItemsContext, useSchedulerViewItemsContext } from '../context';
|
|
21
|
+
import { useSchedulerViewFocusedItemsContext, useSchedulerViewFocusedSlotsContext, useSchedulerViewSelectedItemsContext, useSchedulerViewItemsContext, SchedulerItemSelectionContext } from '../context';
|
|
22
22
|
import { SchedulerEditItemContext } from '../context/SchedulerEditItemContext';
|
|
23
23
|
import { FORM_ITEM_ACTION, useFormItem } from './hooks/use-form-item';
|
|
24
24
|
import { SHOW_OCCURRENCE_DIALOG_ACTION, useShowOccurrenceDialog } from './hooks/use-show-occurrence-dialog';
|
|
@@ -39,6 +39,7 @@ export var SchedulerEditItem = React.forwardRef(function (props, ref) {
|
|
|
39
39
|
var _a = React.useState(props.tabIndex), tabIndex = _a[0], setTabIndex = _a[1];
|
|
40
40
|
var editItem = React.useRef(null);
|
|
41
41
|
var item = React.useRef(null);
|
|
42
|
+
var eventId = React.useMemo(function () { return guid(); }, []);
|
|
42
43
|
React.useImperativeHandle(editItem, function () { return ({ props: props, element: item.current && item.current.element }); });
|
|
43
44
|
React.useImperativeHandle(ref, function () { return editItem.current; });
|
|
44
45
|
React.useImperativeHandle(_ref, function () { return item.current; });
|
|
@@ -178,8 +179,10 @@ export var SchedulerEditItem = React.forwardRef(function (props, ref) {
|
|
|
178
179
|
onMouseUp.call(undefined, event);
|
|
179
180
|
}
|
|
180
181
|
}, [actionsReducerMap, onMouseUp, onMouseUpAction, props, state]);
|
|
182
|
+
var _m = React.useContext(SchedulerItemSelectionContext), setSelectedItem = _m[1];
|
|
181
183
|
var handleClick = React.useCallback(function (event) {
|
|
182
184
|
if (onClickAction) {
|
|
185
|
+
setSelectedItem(item.current);
|
|
183
186
|
var actions = onClickAction(event, props, state);
|
|
184
187
|
if (actions) {
|
|
185
188
|
Array.isArray(actions)
|
|
@@ -412,7 +415,7 @@ export var SchedulerEditItem = React.forwardRef(function (props, ref) {
|
|
|
412
415
|
: undefined);
|
|
413
416
|
}, [items, props.tabIndex, selectedItems.length]);
|
|
414
417
|
return (React.createElement(SchedulerEditItemContext, { props: props, form: [formItem, setFormItem, dispatchFormItem], drag: [dragItem, setDragItem, dispatchDragItem], resize: [resizeItem, setResizeItem, dispatchResizeItem], remove: [removeItem, setRemoveItem, dispatchRemoveItem], showRemoveDialog: [showRemoveDialog, setShowRemoveDialog, dispatchShowRemoveDialog], showOccurrenceDialog: [showOccurrenceDialog, setShowOccurrenceDialog, dispatchShowOccurrenceDialog] },
|
|
415
|
-
React.createElement(ViewItem, __assign({}, props, { _ref: item, itemRef: item, selected: selected, tabIndex: tabIndex,
|
|
418
|
+
React.createElement(ViewItem, __assign({}, props, { _ref: item, itemRef: item, selected: selected, tabIndex: tabIndex, id: eventId,
|
|
416
419
|
// Keyboard
|
|
417
420
|
onKeyDown: handleKeyDown, onKeyUp: handleKeyUp,
|
|
418
421
|
// Focus
|
|
@@ -290,7 +290,7 @@ export var SchedulerItem = React.forwardRef(function (props, ref) {
|
|
|
290
290
|
onDrag: handleResizeEndDrag,
|
|
291
291
|
onRelease: handleResizeRelease
|
|
292
292
|
});
|
|
293
|
-
return (React.createElement("div", { ref: element, id: props.id, style: style, tabIndex: tabIndex, className: className, "aria-label": eventLabel, "aria-selected": props.selected,
|
|
293
|
+
return (React.createElement("div", { ref: element, id: props.id, style: style, tabIndex: tabIndex, className: className, "aria-label": eventLabel, "aria-selected": props.selected || undefined,
|
|
294
294
|
// Focus
|
|
295
295
|
onFocus: handleFocus, onBlur: handleBlur,
|
|
296
296
|
// Mouse
|
|
@@ -150,6 +150,8 @@ export declare const editorValidationStart = "scheduler.editorValidationStart";
|
|
|
150
150
|
export declare const editorValidationEnd = "scheduler.editorValidationEnd";
|
|
151
151
|
/** @hidden */
|
|
152
152
|
export declare const noEvents = "scheduler.noEvents";
|
|
153
|
+
/** @hidden */
|
|
154
|
+
export declare const moreEvents = "scheduler.moreEvents";
|
|
153
155
|
/**
|
|
154
156
|
* @hidden
|
|
155
157
|
*/
|
|
@@ -230,4 +232,5 @@ export declare const messages: {
|
|
|
230
232
|
"scheduler.timeTitle": string;
|
|
231
233
|
"scheduler.eventTitle": string;
|
|
232
234
|
"scheduler.noEvents": string;
|
|
235
|
+
"scheduler.moreEvents": string;
|
|
233
236
|
};
|
|
@@ -151,6 +151,8 @@ export var editorValidationStart = 'scheduler.editorValidationStart';
|
|
|
151
151
|
export var editorValidationEnd = 'scheduler.editorValidationEnd';
|
|
152
152
|
/** @hidden */
|
|
153
153
|
export var noEvents = 'scheduler.noEvents';
|
|
154
|
+
/** @hidden */
|
|
155
|
+
export var moreEvents = 'scheduler.moreEvents';
|
|
154
156
|
/**
|
|
155
157
|
* @hidden
|
|
156
158
|
*/
|
|
@@ -231,4 +233,5 @@ export var messages = (_a = {},
|
|
|
231
233
|
_a[timeTitle] = 'Time',
|
|
232
234
|
_a[eventTitle] = 'Event',
|
|
233
235
|
_a[noEvents] = 'no events',
|
|
236
|
+
_a[moreEvents] = 'More events',
|
|
234
237
|
_a);
|
|
@@ -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: 1661528062,
|
|
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
|
};
|
|
@@ -66,8 +66,8 @@ var occurrences = function (item, _a) {
|
|
|
66
66
|
var utcRangeStart = dateRange.zonedStart;
|
|
67
67
|
var utcRangeEnd = dateRange.zonedEnd;
|
|
68
68
|
var series = expand(rule, {
|
|
69
|
-
rangeStart:
|
|
70
|
-
rangeEnd:
|
|
69
|
+
rangeStart: utcRangeStart,
|
|
70
|
+
rangeEnd: utcRangeEnd
|
|
71
71
|
});
|
|
72
72
|
if (!series.events.length) {
|
|
73
73
|
return [];
|
|
@@ -143,7 +143,7 @@ export var SchedulerSlot = React.forwardRef(function (props, ref) {
|
|
|
143
143
|
target: slot.current
|
|
144
144
|
});
|
|
145
145
|
}, [onKeyUp, slot]);
|
|
146
|
-
return (React.createElement("div", { ref: element, id: props.id, style: style, className: className, tabIndex: tabIndex, "aria-label": slotLabel, "aria-selected": props.selected,
|
|
146
|
+
return (React.createElement("div", { ref: element, id: props.id, style: style, className: className, tabIndex: tabIndex, "aria-label": slotLabel, "aria-selected": props.selected || undefined,
|
|
147
147
|
// Focus
|
|
148
148
|
onFocus: handleFocus, onBlur: handleBlur,
|
|
149
149
|
// Mouse
|
package/dist/npm/Scheduler.js
CHANGED
|
@@ -280,18 +280,19 @@ exports.Scheduler = React.forwardRef(function (props, ref) {
|
|
|
280
280
|
var Footer = view.props.footer || props.footer || defaultProps.footer;
|
|
281
281
|
var Navigation = SchedulerNavigation_1.SchedulerNavigation;
|
|
282
282
|
var ViewSelector = SchedulerViewSelector_1.SchedulerViewSelector;
|
|
283
|
+
var _d = React.useState(null), eventSelection = _d[0], setEventSelection = _d[1];
|
|
283
284
|
return (React.createElement(SchedulerContext_1.SchedulerContext
|
|
284
285
|
// Static
|
|
285
286
|
, {
|
|
286
287
|
// Static
|
|
287
288
|
element: element, props: props, views: views, fields: fields, groups: groups, dateRange: dateRange, orientation: orientation, dateFormat: { dateFormat: dateFormat, shortDateFormat: shortDateFormat },
|
|
288
289
|
// State
|
|
289
|
-
date: [date, handleDateChange], activeView: [activeViewName, handleActiveViewNameChange],
|
|
290
|
+
date: [date, handleDateChange], activeView: [activeViewName, handleActiveViewNameChange], selection: [eventSelection, setEventSelection],
|
|
290
291
|
// Reducers
|
|
291
292
|
data: [data, handleDataAction] },
|
|
292
293
|
React.createElement("div", { ref: element, id: props.id, style: style, className: className, tabIndex: props.tabIndex,
|
|
293
294
|
// Aria
|
|
294
|
-
dir: dir, role: props.role, "aria-label": props.ariaLabel, "aria-labelledby": props.ariaLabelledby,
|
|
295
|
+
dir: dir, role: props.role, "aria-label": props.ariaLabel, "aria-labelledby": props.ariaLabelledby, "aria-activedescendant": (eventSelection && eventSelection.props.id) || undefined,
|
|
295
296
|
// Handlers
|
|
296
297
|
onFocus: handleFocus, onBlur: handleBlur },
|
|
297
298
|
React.createElement(Header, null,
|
|
@@ -14,12 +14,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
14
14
|
exports.ShowMoreItemsButton = void 0;
|
|
15
15
|
var React = require("react");
|
|
16
16
|
var kendo_react_buttons_1 = require("@progress/kendo-react-buttons");
|
|
17
|
+
var kendo_react_intl_1 = require("@progress/kendo-react-intl");
|
|
18
|
+
var messages_1 = require("../messages");
|
|
17
19
|
/**
|
|
18
20
|
* @hidden
|
|
19
21
|
*/
|
|
20
22
|
exports.ShowMoreItemsButton = React.forwardRef(function (props, ref) {
|
|
21
23
|
var btn = React.useRef(null);
|
|
22
24
|
var element = React.useRef(null);
|
|
25
|
+
var localization = (0, kendo_react_intl_1.useLocalization)();
|
|
23
26
|
React.useImperativeHandle(btn, function () { return (__assign({ element: element.current && element.current.element }, props)); });
|
|
24
27
|
React.useImperativeHandle(ref, function () { return btn.current; });
|
|
25
28
|
var handleClick = React.useCallback(function (syntheticEvent) {
|
|
@@ -35,7 +38,8 @@ exports.ShowMoreItemsButton = React.forwardRef(function (props, ref) {
|
|
|
35
38
|
props.slot,
|
|
36
39
|
props.onClick
|
|
37
40
|
]);
|
|
38
|
-
|
|
41
|
+
var moreEventsLabel = localization.toLanguageString(messages_1.moreEvents, messages_1.messages[messages_1.moreEvents]);
|
|
42
|
+
return (React.createElement(kendo_react_buttons_1.Button, { ref: element, tabIndex: -1, className: "k-more-events", onClick: handleClick, "aria-label": moreEventsLabel },
|
|
39
43
|
React.createElement("span", { className: "k-icon k-i-more-horizontal" })));
|
|
40
44
|
});
|
|
41
45
|
exports.ShowMoreItemsButton.displayName = 'KendoReactSchedulerShowMoreItemsButton';
|
|
@@ -51,7 +51,7 @@ var SchedulerNavigationDatePickerToggleButton = function (props) {
|
|
|
51
51
|
: dateRange.zonedStart, isMonthView
|
|
52
52
|
? date
|
|
53
53
|
: dateRange.zonedEnd.addDays(-1));
|
|
54
|
-
return (React.createElement(kendo_react_buttons_1.Button, __assign({}, props, { className: "k-nav-current", tabIndex: -1, fillMode: 'flat' }),
|
|
54
|
+
return (React.createElement(kendo_react_buttons_1.Button, __assign({}, props, { className: "k-nav-current", tabIndex: -1, fillMode: 'flat', "aria-live": "polite" }),
|
|
55
55
|
React.createElement("span", { className: "k-sm-date-format" }, shortText),
|
|
56
56
|
React.createElement("span", { className: "k-lg-date-format" }, text)));
|
|
57
57
|
};
|
|
@@ -17,6 +17,7 @@ export interface SchedulerContextProps {
|
|
|
17
17
|
orientation: SchedulerOrientationContextType;
|
|
18
18
|
date: SchedulerDateContextType;
|
|
19
19
|
activeView: SchedulerActiveViewContextType;
|
|
20
|
+
selection: SchedulerItemSelectionContextType;
|
|
20
21
|
data: SchedulerDataContextType;
|
|
21
22
|
}
|
|
22
23
|
/** @hidden */
|
|
@@ -208,5 +209,20 @@ export declare const SchedulerActiveViewContext: React.Context<SchedulerActiveVi
|
|
|
208
209
|
* @returns
|
|
209
210
|
*/
|
|
210
211
|
export declare const useSchedulerActiveViewContext: () => SchedulerActiveViewContextType;
|
|
212
|
+
/**
|
|
213
|
+
* @hidden
|
|
214
|
+
*/
|
|
215
|
+
export declare type SchedulerItemSelectionContextType = [any, any];
|
|
216
|
+
/**
|
|
217
|
+
* @hidden
|
|
218
|
+
*/
|
|
219
|
+
export declare const SchedulerItemSelectionContext: React.Context<SchedulerItemSelectionContextType>;
|
|
220
|
+
/**
|
|
221
|
+
* @hidden
|
|
222
|
+
*/
|
|
223
|
+
export declare const useSchedulerItemSelectionContext: () => SchedulerItemSelectionContextType;
|
|
224
|
+
/**
|
|
225
|
+
*
|
|
226
|
+
*/
|
|
211
227
|
/** @hidden */
|
|
212
|
-
export declare const SchedulerContext: ({ children, element, props, views, fields, groups, dateRange, dateFormat, orientation, date, data, activeView }: SchedulerContextProps) => JSX.Element;
|
|
228
|
+
export declare const SchedulerContext: ({ children, element, props, views, fields, groups, dateRange, dateFormat, orientation, date, data, activeView, selection }: SchedulerContextProps) => JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SchedulerContext = exports.useSchedulerActiveViewContext = exports.SchedulerActiveViewContext = exports.useSchedulerDataContext = exports.SchedulerDataContext = exports.useSchedulerDateContext = exports.SchedulerDateContext = exports.useSchedulerOrientationContext = exports.SchedulerOrientationContext = exports.useSchedulerDateRangeContext = exports.SchedulerDateRangeContext = exports.useSchedulerGroupsContext = exports.SchedulerGroupsContext = exports.useSchedulerDateFormatContext = exports.SchedulerDateFormatContext = exports.useSchedulerFieldsContext = exports.SchedulerFieldsContext = exports.useSchedulerViewsContext = exports.SchedulerViewsContext = exports.useSchedulerPropsContext = exports.SchedulerPropsContext = exports.useSchedulerElementContext = exports.SchedulerElementContext = void 0;
|
|
3
|
+
exports.SchedulerContext = exports.useSchedulerItemSelectionContext = exports.SchedulerItemSelectionContext = exports.useSchedulerActiveViewContext = exports.SchedulerActiveViewContext = exports.useSchedulerDataContext = exports.SchedulerDataContext = exports.useSchedulerDateContext = exports.SchedulerDateContext = exports.useSchedulerOrientationContext = exports.SchedulerOrientationContext = exports.useSchedulerDateRangeContext = exports.SchedulerDateRangeContext = exports.useSchedulerGroupsContext = exports.SchedulerGroupsContext = exports.useSchedulerDateFormatContext = exports.SchedulerDateFormatContext = exports.useSchedulerFieldsContext = exports.SchedulerFieldsContext = exports.useSchedulerViewsContext = exports.SchedulerViewsContext = exports.useSchedulerPropsContext = exports.SchedulerPropsContext = exports.useSchedulerElementContext = exports.SchedulerElementContext = void 0;
|
|
4
4
|
var React = require("react");
|
|
5
5
|
var utils_1 = require("../utils");
|
|
6
6
|
var constants_1 = require("../constants");
|
|
@@ -171,9 +171,22 @@ exports.SchedulerActiveViewContext = React.createContext(['day', utils_1.noop]);
|
|
|
171
171
|
var useSchedulerActiveViewContext = function () { return React.useContext(exports.SchedulerActiveViewContext); };
|
|
172
172
|
exports.useSchedulerActiveViewContext = useSchedulerActiveViewContext;
|
|
173
173
|
exports.SchedulerActiveViewContext.displayName = 'SchedulerActiveViewContext';
|
|
174
|
+
/**
|
|
175
|
+
* @hidden
|
|
176
|
+
*/
|
|
177
|
+
exports.SchedulerItemSelectionContext = React.createContext([null, function () { }]);
|
|
178
|
+
/**
|
|
179
|
+
* @hidden
|
|
180
|
+
*/
|
|
181
|
+
var useSchedulerItemSelectionContext = function () { return React.useContext(exports.SchedulerItemSelectionContext); };
|
|
182
|
+
exports.useSchedulerItemSelectionContext = useSchedulerItemSelectionContext;
|
|
183
|
+
exports.SchedulerItemSelectionContext.displayName = 'SchedulerItemSelectionContext';
|
|
184
|
+
/**
|
|
185
|
+
*
|
|
186
|
+
*/
|
|
174
187
|
/** @hidden */
|
|
175
188
|
var SchedulerContext = function (_a) {
|
|
176
|
-
var children = _a.children, element = _a.element, props = _a.props, views = _a.views, fields = _a.fields, groups = _a.groups, dateRange = _a.dateRange, dateFormat = _a.dateFormat, orientation = _a.orientation, date = _a.date, data = _a.data, activeView = _a.activeView;
|
|
189
|
+
var children = _a.children, element = _a.element, props = _a.props, views = _a.views, fields = _a.fields, groups = _a.groups, dateRange = _a.dateRange, dateFormat = _a.dateFormat, orientation = _a.orientation, date = _a.date, data = _a.data, activeView = _a.activeView, selection = _a.selection;
|
|
177
190
|
return (React.createElement(exports.SchedulerElementContext.Provider, { value: element },
|
|
178
191
|
React.createElement(exports.SchedulerPropsContext.Provider, { value: props },
|
|
179
192
|
React.createElement(exports.SchedulerViewsContext.Provider, { value: views },
|
|
@@ -184,6 +197,7 @@ var SchedulerContext = function (_a) {
|
|
|
184
197
|
React.createElement(exports.SchedulerOrientationContext.Provider, { value: orientation },
|
|
185
198
|
React.createElement(exports.SchedulerDateContext.Provider, { value: date },
|
|
186
199
|
React.createElement(exports.SchedulerDataContext.Provider, { value: data },
|
|
187
|
-
React.createElement(exports.SchedulerActiveViewContext.Provider, { value: activeView },
|
|
200
|
+
React.createElement(exports.SchedulerActiveViewContext.Provider, { value: activeView },
|
|
201
|
+
React.createElement(exports.SchedulerItemSelectionContext.Provider, { value: selection }, children)))))))))))));
|
|
188
202
|
};
|
|
189
203
|
exports.SchedulerContext = SchedulerContext;
|
|
@@ -42,6 +42,7 @@ exports.SchedulerEditItem = React.forwardRef(function (props, ref) {
|
|
|
42
42
|
var _a = React.useState(props.tabIndex), tabIndex = _a[0], setTabIndex = _a[1];
|
|
43
43
|
var editItem = React.useRef(null);
|
|
44
44
|
var item = React.useRef(null);
|
|
45
|
+
var eventId = React.useMemo(function () { return (0, kendo_react_common_1.guid)(); }, []);
|
|
45
46
|
React.useImperativeHandle(editItem, function () { return ({ props: props, element: item.current && item.current.element }); });
|
|
46
47
|
React.useImperativeHandle(ref, function () { return editItem.current; });
|
|
47
48
|
React.useImperativeHandle(_ref, function () { return item.current; });
|
|
@@ -181,8 +182,10 @@ exports.SchedulerEditItem = React.forwardRef(function (props, ref) {
|
|
|
181
182
|
onMouseUp.call(undefined, event);
|
|
182
183
|
}
|
|
183
184
|
}, [actionsReducerMap, onMouseUp, onMouseUpAction, props, state]);
|
|
185
|
+
var _m = React.useContext(context_1.SchedulerItemSelectionContext), setSelectedItem = _m[1];
|
|
184
186
|
var handleClick = React.useCallback(function (event) {
|
|
185
187
|
if (onClickAction) {
|
|
188
|
+
setSelectedItem(item.current);
|
|
186
189
|
var actions = onClickAction(event, props, state);
|
|
187
190
|
if (actions) {
|
|
188
191
|
Array.isArray(actions)
|
|
@@ -415,7 +418,7 @@ exports.SchedulerEditItem = React.forwardRef(function (props, ref) {
|
|
|
415
418
|
: undefined);
|
|
416
419
|
}, [items, props.tabIndex, selectedItems.length]);
|
|
417
420
|
return (React.createElement(SchedulerEditItemContext_1.SchedulerEditItemContext, { props: props, form: [formItem, setFormItem, dispatchFormItem], drag: [dragItem, setDragItem, dispatchDragItem], resize: [resizeItem, setResizeItem, dispatchResizeItem], remove: [removeItem, setRemoveItem, dispatchRemoveItem], showRemoveDialog: [showRemoveDialog, setShowRemoveDialog, dispatchShowRemoveDialog], showOccurrenceDialog: [showOccurrenceDialog, setShowOccurrenceDialog, dispatchShowOccurrenceDialog] },
|
|
418
|
-
React.createElement(ViewItem, __assign({}, props, { _ref: item, itemRef: item, selected: selected, tabIndex: tabIndex,
|
|
421
|
+
React.createElement(ViewItem, __assign({}, props, { _ref: item, itemRef: item, selected: selected, tabIndex: tabIndex, id: eventId,
|
|
419
422
|
// Keyboard
|
|
420
423
|
onKeyDown: handleKeyDown, onKeyUp: handleKeyUp,
|
|
421
424
|
// Focus
|
|
@@ -293,7 +293,7 @@ exports.SchedulerItem = React.forwardRef(function (props, ref) {
|
|
|
293
293
|
onDrag: handleResizeEndDrag,
|
|
294
294
|
onRelease: handleResizeRelease
|
|
295
295
|
});
|
|
296
|
-
return (React.createElement("div", { ref: element, id: props.id, style: style, tabIndex: tabIndex, className: className, "aria-label": eventLabel, "aria-selected": props.selected,
|
|
296
|
+
return (React.createElement("div", { ref: element, id: props.id, style: style, tabIndex: tabIndex, className: className, "aria-label": eventLabel, "aria-selected": props.selected || undefined,
|
|
297
297
|
// Focus
|
|
298
298
|
onFocus: handleFocus, onBlur: handleBlur,
|
|
299
299
|
// Mouse
|
|
@@ -150,6 +150,8 @@ export declare const editorValidationStart = "scheduler.editorValidationStart";
|
|
|
150
150
|
export declare const editorValidationEnd = "scheduler.editorValidationEnd";
|
|
151
151
|
/** @hidden */
|
|
152
152
|
export declare const noEvents = "scheduler.noEvents";
|
|
153
|
+
/** @hidden */
|
|
154
|
+
export declare const moreEvents = "scheduler.moreEvents";
|
|
153
155
|
/**
|
|
154
156
|
* @hidden
|
|
155
157
|
*/
|
|
@@ -230,4 +232,5 @@ export declare const messages: {
|
|
|
230
232
|
"scheduler.timeTitle": string;
|
|
231
233
|
"scheduler.eventTitle": string;
|
|
232
234
|
"scheduler.noEvents": string;
|
|
235
|
+
"scheduler.moreEvents": string;
|
|
233
236
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.recurrenceEditorOffsetPositionsFirst = exports.recurrenceEditorFrequenciesYearly = exports.recurrenceEditorFrequenciesWeekly = exports.recurrenceEditorFrequenciesNever = exports.recurrenceEditorFrequenciesMonthly = exports.recurrenceEditorFrequenciesDaily = exports.recurrenceEditorYearlyInterval = exports.recurrenceEditorYearlyRepeatOn = exports.recurrenceEditorYearlyRepeatEvery = exports.recurrenceEditorYearlyOf = exports.recurrenceEditorMonthlyRepeatOn = exports.recurrenceEditorMonthlyRepeatEvery = exports.recurrenceEditorMonthlyInterval = exports.recurrenceEditorMonthlyDay = exports.recurrenceEditorWeeklyRepeatOn = exports.recurrenceEditorWeeklyRepeatEvery = exports.recurrenceEditorWeeklyInterval = exports.recurrenceEditorDailyRepeatEvery = exports.recurrenceEditorDailyInterval = exports.recurrenceEditorRepeat = exports.editorEventTimeZone = exports.editorEventSeparateTimeZones = exports.editorEventDescription = exports.editorEventAllDay = exports.editorEventEndTimeZone = exports.editorEventEnd = exports.editorEventStartTimeZone = exports.editorEventStart = exports.editorEventTitle = exports.editorTitle = exports.editorCancel = exports.editorSave = exports.editorRecurringDialogTitle = exports.editorRecurringConfirmation = exports.editorSeries = exports.editorOccurrence = exports.showWorkDay = exports.showFullDay = exports.nextTitle = exports.previousTitle = exports.deleteTitle = exports.monthViewTitle = exports.dayViewTitle = exports.agendaViewTitle = exports.workWeekViewTitle = exports.weekViewTitle = exports.timelineViewTitle = exports.today = exports.allDay = exports.allEvents = void 0;
|
|
5
|
-
exports.messages = exports.noEvents = exports.editorValidationEnd = exports.editorValidationStart = exports.editorValidationRequired = exports.eventTitle = exports.timeTitle = exports.dateTitle = exports.deleteRecurringDialogTitle = exports.deleteDialogTitle = exports.deleteSeries = exports.deleteOccurrence = exports.deleteRecurringConfirmation = exports.deleteConfirmation = exports.editorDelete = exports.recurrenceEditorEndOn = exports.recurrenceEditorEndNever = exports.recurrenceEditorEndLabel = exports.recurrenceEditorEndOccurrence = exports.recurrenceEditorEndAfter = exports.recurrenceEditorWeekdaysWeekendday = exports.recurrenceEditorWeekdaysWeekday = exports.recurrenceEditorWeekdaysDay = exports.recurrenceEditorOffsetPositionsLast = exports.recurrenceEditorOffsetPositionsFourth = exports.recurrenceEditorOffsetPositionsThird = exports.recurrenceEditorOffsetPositionsSecond = void 0;
|
|
5
|
+
exports.messages = exports.moreEvents = exports.noEvents = exports.editorValidationEnd = exports.editorValidationStart = exports.editorValidationRequired = exports.eventTitle = exports.timeTitle = exports.dateTitle = exports.deleteRecurringDialogTitle = exports.deleteDialogTitle = exports.deleteSeries = exports.deleteOccurrence = exports.deleteRecurringConfirmation = exports.deleteConfirmation = exports.editorDelete = exports.recurrenceEditorEndOn = exports.recurrenceEditorEndNever = exports.recurrenceEditorEndLabel = exports.recurrenceEditorEndOccurrence = exports.recurrenceEditorEndAfter = exports.recurrenceEditorWeekdaysWeekendday = exports.recurrenceEditorWeekdaysWeekday = exports.recurrenceEditorWeekdaysDay = exports.recurrenceEditorOffsetPositionsLast = exports.recurrenceEditorOffsetPositionsFourth = exports.recurrenceEditorOffsetPositionsThird = exports.recurrenceEditorOffsetPositionsSecond = void 0;
|
|
6
6
|
/** @hidden */
|
|
7
7
|
exports.allEvents = 'scheduler.allEvents';
|
|
8
8
|
/** @hidden */
|
|
@@ -155,6 +155,8 @@ exports.editorValidationStart = 'scheduler.editorValidationStart';
|
|
|
155
155
|
exports.editorValidationEnd = 'scheduler.editorValidationEnd';
|
|
156
156
|
/** @hidden */
|
|
157
157
|
exports.noEvents = 'scheduler.noEvents';
|
|
158
|
+
/** @hidden */
|
|
159
|
+
exports.moreEvents = 'scheduler.moreEvents';
|
|
158
160
|
/**
|
|
159
161
|
* @hidden
|
|
160
162
|
*/
|
|
@@ -235,4 +237,5 @@ exports.messages = (_a = {},
|
|
|
235
237
|
_a[exports.timeTitle] = 'Time',
|
|
236
238
|
_a[exports.eventTitle] = 'Event',
|
|
237
239
|
_a[exports.noEvents] = 'no events',
|
|
240
|
+
_a[exports.moreEvents] = 'More events',
|
|
238
241
|
_a);
|
|
@@ -8,7 +8,7 @@ exports.packageMetadata = {
|
|
|
8
8
|
name: '@progress/kendo-react-scheduler',
|
|
9
9
|
productName: 'KendoReact',
|
|
10
10
|
productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
|
|
11
|
-
publishDate:
|
|
11
|
+
publishDate: 1661528062,
|
|
12
12
|
version: '',
|
|
13
13
|
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'
|
|
14
14
|
};
|
|
@@ -70,8 +70,8 @@ var occurrences = function (item, _a) {
|
|
|
70
70
|
var utcRangeStart = dateRange.zonedStart;
|
|
71
71
|
var utcRangeEnd = dateRange.zonedEnd;
|
|
72
72
|
var series = (0, kendo_recurrence_1.expand)(rule, {
|
|
73
|
-
rangeStart:
|
|
74
|
-
rangeEnd:
|
|
73
|
+
rangeStart: utcRangeStart,
|
|
74
|
+
rangeEnd: utcRangeEnd
|
|
75
75
|
});
|
|
76
76
|
if (!series.events.length) {
|
|
77
77
|
return [];
|
|
@@ -146,7 +146,7 @@ exports.SchedulerSlot = React.forwardRef(function (props, ref) {
|
|
|
146
146
|
target: slot.current
|
|
147
147
|
});
|
|
148
148
|
}, [onKeyUp, slot]);
|
|
149
|
-
return (React.createElement("div", { ref: element, id: props.id, style: style, className: className, tabIndex: tabIndex, "aria-label": slotLabel, "aria-selected": props.selected,
|
|
149
|
+
return (React.createElement("div", { ref: element, id: props.id, style: style, className: className, tabIndex: tabIndex, "aria-label": slotLabel, "aria-selected": props.selected || undefined,
|
|
150
150
|
// Focus
|
|
151
151
|
onFocus: handleFocus, onBlur: handleBlur,
|
|
152
152
|
// Mouse
|