@progress/kendo-react-scheduler
Version:
React Scheduler brings the functionality of Outlook's Calendar to a single UI component. KendoReact Scheduler package
1,361 lines (1,301 loc) • 176 kB
TypeScript
/**
* @license
*-------------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the package root for more information
*-------------------------------------------------------------------------------------------
*/
import { BaseEvent as BaseEvent_2 } from '@progress/kendo-react-common';
import { CheckboxHandle } from '@progress/kendo-react-inputs';
import { CheckboxProps } from '@progress/kendo-react-inputs';
import { ComboBoxProps } from '@progress/kendo-react-dropdowns';
import { DateFormatOptions } from '@progress/kendo-react-intl';
import { DatePickerCloseEvent } from '@progress/kendo-react-dateinputs';
import { DatePickerOpenEvent } from '@progress/kendo-react-dateinputs';
import { DatePickerProps } from '@progress/kendo-react-dateinputs';
import { DateRange as DateRange_2 } from '../..';
import { DateTimePickerCloseEvent } from '@progress/kendo-react-dateinputs';
import { DateTimePickerOpenEvent } from '@progress/kendo-react-dateinputs';
import { DateTimePickerProps } from '@progress/kendo-react-dateinputs';
import { Day } from '@progress/kendo-date-math';
import { DialogHandle } from '@progress/kendo-react-dialogs';
import { DialogProps } from '@progress/kendo-react-dialogs';
import { DropDownListProps } from '@progress/kendo-react-dropdowns';
import { ErrorProps } from '@progress/kendo-react-labels';
import { FieldProps } from '@progress/kendo-react-form';
import { FieldRenderProps } from '@progress/kendo-react-form';
import { FormElementHandle } from '@progress/kendo-react-form';
import { FormElementProps } from '@progress/kendo-react-form';
import { FormProps } from '@progress/kendo-react-form';
import { FormRenderProps } from '@progress/kendo-react-form';
import { InferProps } from 'prop-types';
import { InputHandle } from '@progress/kendo-react-inputs';
import { InputProps } from '@progress/kendo-react-inputs';
import { IntlService } from '@progress/kendo-react-intl';
import { JSX } from 'react/jsx-runtime';
import { LabelProps } from '@progress/kendo-react-labels';
import { LocalizationService } from '@progress/kendo-react-intl';
import { MultiSelectProps } from '@progress/kendo-react-dropdowns';
import * as React_2 from 'react';
import { ReactNodeLike } from 'prop-types';
import { RecurrenceEditorProps } from '../recurrence/RecurrenceEditor';
import { Requireable } from 'prop-types';
import { ResourceEditorProps } from './ResourceEditor';
import { SchedulerFooterHandle as SchedulerFooterHandle_2 } from './components/footer/SchedulerFooter';
import { SchedulerFormHandle as SchedulerFormHandle_2 } from '../components/SchedulerForm';
import { SchedulerHeaderHandle as SchedulerHeaderHandle_2 } from './components/header/SchedulerHeader';
import { SchedulerItemHandle as SchedulerItemHandle_2 } from '../../items/SchedulerItem';
import { SchedulerNavigationHandle } from './components/header/navigation/SchedulerNavigation';
import { SchedulerNavigationProps } from './components/header/navigation/SchedulerNavigation';
import { SchedulerOccurrenceDialogHandle as SchedulerOccurrenceDialogHandle_2 } from '../components/SchedulerOccurrenceDialog';
import { SchedulerRemoveDialogHandle as SchedulerRemoveDialogHandle_2 } from '../components/SchedulerRemoveDialog';
import { SchedulerTaskHandle as SchedulerTaskHandle_2 } from './SchedulerTask';
import { SchedulerViewDateRangeArgs as SchedulerViewDateRangeArgs_2 } from '../..';
import { SchedulerViewItemHandle as SchedulerViewItemHandle_2 } from '../../items/SchedulerViewItem';
import { SchedulerViewItemHandle as SchedulerViewItemHandle_3 } from './SchedulerViewItem';
import { SchedulerViewSelectorHandle } from './components/header/view-selector/SchedulerViewSelector';
import { SchedulerViewSelectorProps } from './components/header/view-selector/SchedulerViewSelector';
import { SchedulerViewSlotHandle as SchedulerViewSlotHandle_2 } from './SchedulerViewSlot';
import { SchedulerViewTaskHandle as SchedulerViewTaskHandle_2 } from './SchedulerViewTask';
import { TextAreaHandle } from '@progress/kendo-react-inputs';
import { TextAreaProps } from '@progress/kendo-react-inputs';
import { ToolbarProps } from '@progress/kendo-react-buttons';
import { ZonedDate } from '@progress/kendo-date-math';
/**
* Represents the KendoReact [AgendaView]({% slug agenda_view_scheduler %}) Component.
*/
export declare const AgendaView: React_2.FunctionComponent<AgendaViewProps>;
/** @hidden */
export declare const agendaViewDefaultProps: {
name: string;
title: (localization: LocalizationService) => string;
dateRange: ({ intl, date, numberOfDays, timezone }: SchedulerViewDateRangeArgs) => DateRange;
selectedDateFormat: string;
selectedShortDateFormat: string;
slotDuration: number;
slotDivision: number;
numberOfDays: number;
};
/**
* Represents the properties of the KendoReact [AgendaView]({% slug api_scheduler_agendaview %}) Component.
*/
export declare interface AgendaViewProps extends SchedulerViewProps {
/**
* Specifies the step by which the currently rendered days will be changed, when using the back and forwards buttons in the toolbar navigation.
*/
step?: number;
/**
* Specifies the number of days that the view will render.
* Defaults to `7`.
*/
numberOfDays?: number;
/**
* The long-date format for displaying the
* selected date in the Scheduler toolbar.
* Defaults to `{0:D} - {1:D}`
* ([more information](https://www.github.com/telerik/kendo-intl/blob/develop/docs/date-formatting/index.md))
*/
selectedDateFormat?: string;
/**
* The short-date format for displaying the
* selected date in the Scheduler toolbar.
* Defaults to `{0:d} - {1-d}`
* ([more information](https://www.github.com/telerik/kendo-intl/blob/develop/docs/date-formatting/index.md))
*/
selectedShortDateFormat?: string;
/**
* Sets a custom `className` to the wrapping element of the `AgendaView`.
*/
className?: string;
/**
* Sets a custom `id` to the wrapping element of the `AgendaView`.
*/
id?: string;
/**
* Sets a custom `style` property to the wrapping element of the `AgendaView`.
*/
style?: React_2.CSSProperties;
/**
* Overrides the general `editable` prop of the Scheduler for the specified view only.
*/
editable?: EditableProp;
/**
* Overrides the `task` prop of the Scheduler for the specified view only.
*/
task?: React_2.ComponentType<SchedulerTaskProps>;
/**
* Overrides the `viewTask` prop of the Scheduler for the specified view only.
*/
viewTask?: React_2.ComponentType<SchedulerTaskProps>;
/**
* Overrides the `editTask` prop of the Scheduler for the specified view only.
*/
editTask?: React_2.ComponentType<SchedulerTaskProps>;
/**
* Overrides the `slot` prop of the Scheduler for the specified view only.
*/
slot?: React_2.ComponentType<SchedulerSlotProps>;
/**
* Overrides the `viewSlot` prop of the Scheduler for the specified view only.
*/
viewSlot?: React_2.ComponentType<SchedulerViewSlotProps>;
/**
* Overrides the `editSlot` prop of the Scheduler for the specified view only.
*/
editSlot?: React_2.ComponentType<SchedulerEditSlotProps>;
}
/**
* @hidden
**/
export declare interface BaseEvent<T> {
target: T;
}
/**
* Specifies the available [DataAction]({% slug api_scheduler_data_action %}) types.
*/
export declare enum DATA_ACTION {
create = 0,
update = 1,
remove = 2
}
/**
* Specifies the action which can be dispatched through the [SchedulerDataContext]({% slug api_scheduler_schedulerdatacontext %}).
*
* For more information refer to the [Scheduler Context]({% slug context_scheduler %}) article.
*/
export declare interface DataAction {
/**
* The `type` of the action. The available types are:
* - `create`
* - `update`
* - `remove`
*/
type: DATA_ACTION;
/**
* Specifies if the action should be applied to the whole series of a recurring item. If the item is not recurring, set `series` to `false`.
*/
series: boolean;
/**
* Specifies the `dataItem` being edited.
*/
dataItem: DataItem;
}
/**
* Represents the items which the [`data`]({% slug api_scheduler_schedulerprops %}#toc-data) property accepts.
* The `data` has no strict type. However, to visualize it correctly,
* use it in combination with the [`modelFields`]({% slug api_scheduler_schedulerprops %}#toc-modelfields) property.
* For more information, refer to the article on
* [binding the Scheduler to data]({% slug data_binding_scheduler %}).
*/
export declare type DataItem = any;
/**
* Represents the DateHeaderCell component.
*/
export declare const DateHeaderCell: React_2.ForwardRefExoticComponent<DateHeaderCellProps & React_2.RefAttributes<DateHeaderCellHandle | null>>;
export declare const dateHeaderCellDefaultProps: {
as: React_2.ForwardRefExoticComponent<DateHeaderCellProps & React_2.RefAttributes<unknown>>;
format: string;
};
/**
* Represents the target(element and props).
*/
export declare interface DateHeaderCellHandle {
/**
* The current element or `null` if there is no one.
*/
element: HTMLElement | null;
/**
* The props values of the DateHeaderCell.
*/
props: DateHeaderCellProps;
}
/**
* Represents the properties of [DateHeaderCell]({% slug api_scheduler_dateheadercell %}) component.
*/
export declare interface DateHeaderCellProps extends React_2.HTMLAttributes<HTMLDivElement> {
/** @hidden */
as?: React_2.ComponentType<DateHeaderCellProps>;
/**
* Represents the date format.
*/
format?: string | DateFormatOptions;
/**
* Represents the current date.
*/
date: Date;
/**
* Represents the start date.
*/
start: Date;
/**
* Represents the end date.
*/
end: Date;
}
/** @hidden */
export declare interface DateRange {
start: Date;
end: Date;
zonedStart: ZonedDate;
zonedEnd: ZonedDate;
}
/**
* Represents the KendoReact [DayView]({% slug day_view_scheduler %}) Component.
*/
export declare const DayView: React_2.FunctionComponent<DayViewProps>;
/** @hidden */
export declare const dayViewDefaultProps: {
name: string;
title: (localization: any) => any;
numberOfDays: number;
slotDuration: number;
slotDivisions: number;
selectedDateFormat: string;
selectedShortDateFormat: string;
currentTimeMarker: boolean;
dateRange: ({ date, numberOfDays, timezone }: SchedulerViewDateRangeArgs_2) => DateRange_2;
startTime: string;
endTime: string;
isWorkDayStart: string;
isWorkDayEnd: string;
workWeekStart: Day;
workWeekEnd: Day;
showCurrentTime: boolean;
defaultShowWorkHours: boolean;
};
/**
* Represents the properties of the [DayView]({% slug api_scheduler_dayviewprops %}) Component.
*/
export declare interface DayViewProps extends MultiDayViewProps {
}
/**
* Represents the available `action` types for the `SchedulerItemDragItemAction` objects.
*
* The available types are:
* - `DRAG_ITEM_SET'`
* - `DRAG_ITEM_START'`
* - `DRAG_ITEM_DRAG'`
* - `DRAG_ITEM_COMPLETE'`
* - `DRAG_ITEM_COMPLETE_OCCURRENCE'`
* - `DRAG_ITEM_COMPLETE_SERIES'`
* - `DRAG_ITEM_RESET'`
* - `DRAG_ITEM_DRAG_SELECTED`
*/
export declare enum DRAG_ITEM_ACTION {
set = "DRAG_ITEM_SET",
start = "DRAG_ITEM_START",
drag = "DRAG_ITEM_DRAG",
complete = "DRAG_ITEM_COMPLETE",
completeOccurrence = "DRAG_ITEM_COMPLETE_OCCURRENCE",
completeSeries = "DRAG_ITEM_COMPLETE_SERIES",
reset = "DRAG_ITEM_RESET",
dragSelected = "DRAG_ITEM_DRAG_SELECTED"
}
/**
* The editable settings of the Scheduler.
*/
export declare interface EditableProp {
/**
* Specifies if the events can be removed by using a **Remove** icon.
*/
remove: boolean;
/**
* Specifies if the events can be dragged.
*/
drag: boolean;
/**
* Specifies if the events can be resized.
*/
resize: boolean;
/**
* Specifies if new events can be added on `slot double click`.
*/
add: boolean;
/**
* Specifies if the events can be edited on `item double click`.
*/
edit: boolean;
/**
* Specifies if the events can be edited on `item double click`.
*/
select: boolean;
}
/**
* Represents the combined object of the default and custom [modelFields]({% slug api_scheduler_schedulerprops %}#toc)
*/
export declare interface Fields {
id: string;
start: string;
startTimezone: string;
originalStart: string;
end: string;
endTimezone: string;
isAllDay: string;
title: string;
description: string;
recurrenceRule: string;
recurrenceId: string;
recurrenceExceptions: string;
}
/** @hidden */
declare enum FORM_ITEM_ACTION {
set = "FORM_ITEM_SET",
setMaster = "FORM_ITEM_SET_MASTER",
reset = "FORM_ITEM_RESET",
complete = "FORM_ITEM_COMPLETE"
}
/**
* Represents the Scheduler `Group` object, calculated based on the [group]({% slug api_scheduler_schedulerprops %}#toc-group) and [resources]({% slug api_scheduler_schedulerprops %}#toc-resources)
*/
export declare interface Group {
index: number;
resources: SchedulerResource[];
}
/** @hidden */
declare interface Item extends Occurrence {
/** @hidden */
_ref: React.RefObject<SchedulerItemHandle | SchedulerTaskHandle | null>;
/**
* Represents the `ref` of the actual `item`.
*/
itemRef: React.RefObject<SchedulerItemHandle | SchedulerTaskHandle | null>;
/**
* Represents if the `end` of the item is outside the current visual range.
*/
head: boolean;
/**
* Represents if the `start` of the item is outside the current visual range.
*/
tail: boolean;
/**
* Represents the order of the item among its siblings.
*/
order: number | null;
/**
* Represents the `start` Date in the provided timezone.
*
* For more information about timezones, refer to the [Scheduler TImezones]({% slug timezones_scheduler %}) article.
*/
zonedStart: ZonedDate;
/**
* Represents the `end` Date in the provided timezone.
*
* For more information about timezones, refer to the [Scheduler TImezones]({% slug timezones_scheduler %}) article.
*/
zonedEnd: ZonedDate;
/**
* A collection of all `slots` in which the current item fits.
*/
slots: Slot[];
/**
* Represents the current group in which the item is rendered.
*/
group: Group;
/**
* Represents the current range in which the item is rendered.
*/
range: Range_2;
/**
* Represents if the item is an exception to a recurrence rule.
*/
isException: boolean;
/**
* Represents if the item is a single occurrence of a recurring `DataItem`.
*/
isRecurring: boolean;
/**
* Represents if the item durations is through the whole day.
*/
isAllDay: boolean;
}
/**
* @hidden
*/
export declare interface ItemDragEvent {
pageX: number;
pageY: number;
clientX: number;
clientY: number;
offsetX: number;
offsetY: number;
type: string;
ctrlKey: boolean;
shiftKey: boolean;
altKey: boolean;
originalEvent: PointerEvent;
}
/**
* Represents the available `action` types for the `SchedulerItemsFocusAction` objects.
*
* The available types are:
* - `ITEMS_FOCUS_NEXT`
* - `ITEMS_FOCUS_PREV`
*/
export declare enum ITEMS_FOCUS_ACTION {
next = "ITEMS_FOCUS_NEXT",
prev = "ITEMS_FOCUS_PREV"
}
/**
* Represents the available `action` types for the `SchedulerItemsSelectAction` objects.
*
* The available types are:
* - 'ITEMS_SELECT_SELECT`
* - 'ITEMS_SELECT_SELECT_NEXT`
* - 'ITEMS_SELECT_SELECT_PREV`
* - 'ITEMS_SELECT_RESET`
* - 'ITEMS_SELECT_ADD`
* - 'ITEMS_SELECT_REMOVE`
*/
export declare enum ITEMS_SELECT_ACTION {
select = "ITEMS_SELECT_SELECT",
selectNext = "ITEMS_SELECT_SELECT_NEXT",
selectPrev = "ITEMS_SELECT_SELECT_PREV",
reset = "ITEMS_SELECT_RESET",
add = "ITEMS_SELECT_ADD",
remove = "ITEMS_SELECT_REMOVE"
}
/**
* Represents the KendoReact [MonthView]({% slug month_view_scheduler %}) Component.
*/
export declare const MonthView: React_2.FunctionComponent<MonthViewProps>;
/** @hidden */
export declare const monthViewDefaultProps: {
name: string;
dateRange: ({ intl, date, timezone }: SchedulerViewDateRangeArgs) => DateRange;
slotDuration: number;
slotDivision: number;
itemsPerSlot: number;
numberOfDays: number;
title: (localization: any) => any;
selectedDateFormat: string;
selectedShortDateFormat: string;
};
/**
* Represents the props of the KendoReact [MonthView]({% slug api_scheduler_monthview %}) Component.
*/
export declare interface MonthViewProps extends Omit<SchedulerViewProps, 'numberOfDays' | 'step'> {
/**
* Sets the maximum number of `items` to be rendered in a single `slot`, before adding the `show-more` button.
*/
itemsPerSlot?: number;
/**
* The long-date format for displaying the
* selected date in the Scheduler toolbar.
* Defaults to `{0:Y}`
* ([more information](https://www.github.com/telerik/kendo-intl/blob/develop/docs/date-formatting/index.md))
*/
selectedDateFormat?: string;
/**
* The short-date format for displaying the
* selected date in the Scheduler toolbar.
* Defaults to `{0:Y}`
* ([more information](https://www.github.com/telerik/kendo-intl/blob/develop/docs/date-formatting/index.md))
*/
selectedShortDateFormat?: string;
/**
* Overrides the general `editable` prop of the Scheduler for the specified view only.
*/
editable?: boolean;
/**
* Sets a custom `className` to the wrapping element of the `DayView`.
*/
className?: string;
/**
* Sets a custom `id` to the wrapping element of the `DayView`.
*/
id?: string;
/**
* Sets a custom `style` property to the wrapping element of the `DayView`.
*/
style?: React_2.CSSProperties;
/**
* Overrides the `item` prop of the Scheduler for the specified view only.
*/
item?: React_2.ComponentType<SchedulerItemProps>;
/**
* Overrides the `viewItem` prop of the Scheduler for the specified view only.
*/
viewItem?: React_2.ComponentType<SchedulerViewItemProps>;
/**
* Overrides the `editableItem` prop of the Scheduler for the specified view only.
*/
editItem?: React_2.ComponentType<SchedulerEditItemProps>;
/**
* Overrides the `slot` prop of the Scheduler for the specified view only.
*/
slot?: React_2.ComponentType<SchedulerSlotProps>;
/**
* Overrides the `viewSlot` prop of the Scheduler for the specified view only.
*/
viewSlot?: React_2.ComponentType<SchedulerViewSlotProps>;
/**
* Overrides the `editSlot` prop of the Scheduler for the specified view only.
*/
editSlot?: React_2.ComponentType<SchedulerEditSlotProps>;
/**
* Represents component based on the DateHeaderCellProps.
*/
dateHeaderCell?: React_2.ComponentType<DateHeaderCellProps>;
form?: React_2.ComponentType<SchedulerFormProps>;
}
/**
* @hidden
*/
declare interface MultiDayTimelineViewProps extends SchedulerViewProps {
/**
* Specifies the step by which the currently rendered days will be changed, when using the back and forwards buttons in the toolbar navigation.
*/
step?: number;
/**
* Specifies the number of days that the view will render.
* Defaults to `1`.
*/
numberOfDays?: number;
/**
* The long-date format for displaying the
* selected date in the Scheduler toolbar.
* Defaults to `{0:D} - {1:D}`
* ([more information](https://www.github.com/telerik/kendo-intl/blob/develop/docs/date-formatting/index.md))
*/
selectedDateFormat?: string;
/**
* The short-date format for displaying the
* selected date in the Scheduler toolbar.
* Defaults to `{0:d} - {1-d}`
* ([more information](https://www.github.com/telerik/kendo-intl/blob/develop/docs/date-formatting/index.md))
*/
selectedShortDateFormat?: string;
/**
* Overrides the general `editable` prop of the Scheduler for the specified view only.
*/
editable?: boolean | EditableProp;
/**
* The start time of the view. The TimelineView displays events which are visible after the start time.
* Accepts string values in the `HH:mm` format.
*/
startTime?: string;
/**
* The end time of the view. The TimelineView displays events which are visible before the end time.
* Accepts string values in the `HH:mm` format.
*/
endTime?: string;
/**
* The start time of the view when `showWorkHours` is set to `true`.
* Accepts string values in the `HH:mm` format.
*/
workDayStart?: string;
/** @hidden */
isWorkDayStart?: string;
/**
* The end time of the view when `showWorkHours` is set to `true`.
* Accepts string values in the `HH:mm` format.
*/
workDayEnd?: string;
/** @hidden */
isWorkDayEnd?: string;
/**
* The start of the work week.
*/
workWeekStart?: Day;
/**
* The end of the work week.
*/
workWeekEnd?: Day;
/**
* The number of divisions of the time slots.
*/
slotDivisions?: number;
/**
* The duration (in minutes) of the time slots.
*/
slotDuration?: number;
/**
* The width of a single time slot in pixels. Default is 100px.
*/
columnWidth?: number;
/**
* If set to `true`, the view will be shown in the business-hours mode only.
*
* This will always override the internal `showWorkHours` state.
*/
showWorkHours?: boolean;
/**
* Sets the initial business-hour mode. Default `true`.
*
* This option applies only the initial `showWorkHours` state.
*/
defaultShowWorkHours?: boolean;
/**
* Sets a custom `className` to the wrapping element of the `TimelineView`.
*/
className?: string;
/**
* Sets a custom `id` to the wrapping element of the `TimelineView`.
*/
id?: string;
/**
* Sets a custom `style` property to the wrapping element of the `TimelineView`.
*/
style?: React_2.CSSProperties;
/**
* Overrides the `item` prop of the Scheduler for the specified view only.
*/
item?: React_2.ComponentType<SchedulerItemProps>;
/**
* Overrides the `viewItem` prop of the Scheduler for the specified view only.
*/
viewItem?: React_2.ComponentType<SchedulerViewItemProps>;
/**
* Overrides the `editableItem` prop of the Scheduler for the specified view only.
*/
editItem?: React_2.ComponentType<SchedulerEditItemProps>;
/**
* Overrides the `slot` prop of the Scheduler for the specified view only.
*/
slot?: React_2.ComponentType<SchedulerSlotProps>;
/**
* Overrides the `viewSlot` prop of the Scheduler for the specified view only.
*/
viewSlot?: React_2.ComponentType<SchedulerViewSlotProps>;
/**
* Overrides the `editSlot` prop of the Scheduler for the specified view only.
*/
editSlot?: React_2.ComponentType<SchedulerEditSlotProps>;
form?: React_2.ComponentType<SchedulerFormProps>;
/**
* If set to `false` the "current time" marker of the scheduler would not be displayed.
*/
currentTimeMarker?: boolean;
/**
* Represents component based on the DateHeaderCellProps.
*/
dateHeaderCell?: React_2.ComponentType<DateHeaderCellProps>;
/**
* Represents component based on the TimeHeaderCellProps.
*/
timeHeaderCell?: React_2.ComponentType<TimeHeaderCellProps>;
}
/**
* @hidden
*/
declare interface MultiDayViewProps extends SchedulerViewProps {
/**
* The long-date format for displaying the
* selected date in the Scheduler toolbar.
* Defaults to `{0:D} - {1:D}`
* ([more information](https://www.github.com/telerik/kendo-intl/blob/develop/docs/date-formatting/index.md))
*/
selectedDateFormat?: string;
/**
* The short-date format for displaying the
* selected date in the Scheduler toolbar.
* Defaults to `{0:d} - {1-d}`
* ([more information](https://www.github.com/telerik/kendo-intl/blob/develop/docs/date-formatting/index.md))
*/
selectedShortDateFormat?: string;
/**
* Overrides the general `editable` prop of the Scheduler for the specified view only.
*/
editable?: boolean;
/**
* Specifies the number of days that the view will render.
* Defaults to `1`.
*/
numberOfDays?: number;
/**
* The start time of the view. The MultiDayView displays events which are visible after the start time.
* Accepts string values in the `HH:mm` format.
*/
startTime?: string;
/**
* The end time of the view. The MultiDayView displays events which are visible before the end time.
* Accepts string values in the `HH:mm` format.
*/
endTime?: string;
/**
* Specifies the step by which the currently rendered days will be changed, when using the back and forwards buttons in the toolbar navigation.
*/
step?: number;
/**
* The start time of the view when `showWorkHours` is set to `true`.
* Accepts string values in the `HH:mm` format.
*/
workDayStart?: string;
/** @hidden */
isWorkDayStart?: string;
/**
* The end time of the view when `showWorkHours` is set to `true`.
* Accepts string values in the `HH:mm` format.
*/
workDayEnd?: string;
/** @hidden */
isWorkDayEnd?: string;
/**
* The start of the work week.
*/
workWeekStart?: Day;
/**
* The end of the work week.
*/
workWeekEnd?: Day;
/**
* The number of divisions of the time slots.
*/
slotDivisions?: number;
/**
* The duration (in minutes) of the time slots.
*/
slotDuration?: number;
/**
* If set to `true`, the view will be shown in the business-hours mode only.
*
* This will always override the internal `showWorkHours` state.
*/
showWorkHours?: boolean;
/**
* Sets the initial business-hour mode. Default `true`.
*
* This option applies only the initial `showWorkHours` state.
*/
defaultShowWorkHours?: boolean;
/**
* Sets a custom `className` to the wrapping element of the `DayView`.
*/
className?: string;
/**
* Sets a custom `id` to the wrapping element of the `DayView`.
*/
id?: string;
/**
* Sets a custom `style` property to the wrapping element of the `DayView`.
*/
style?: React_2.CSSProperties;
/**
* Overrides the `item` prop of the Scheduler for the specified view only.
*/
item?: React_2.ComponentType<SchedulerItemProps>;
/**
* Overrides the `viewItem` prop of the Scheduler for the specified view only.
*/
viewItem?: React_2.ComponentType<SchedulerViewItemProps>;
/**
* Overrides the `editableItem` prop of the Scheduler for the specified view only.
*/
editItem?: React_2.ComponentType<SchedulerEditItemProps>;
/**
* Overrides the `slot` prop of the Scheduler for the specified view only.
*/
slot?: React_2.ComponentType<SchedulerSlotProps>;
/**
* Overrides the `viewSlot` prop of the Scheduler for the specified view only.
*/
viewSlot?: React_2.ComponentType<SchedulerViewSlotProps>;
/**
* Overrides the `editSlot` prop of the Scheduler for the specified view only.
*/
editSlot?: React_2.ComponentType<SchedulerEditSlotProps>;
form?: React_2.ComponentType<SchedulerFormProps>;
/**
* If set to `false` the "current time" marker of the scheduler would not be displayed.
*/
currentTimeMarker?: boolean;
/**
* Represents component based on the DateHeaderCellProps.
*/
dateHeaderCell?: React_2.ComponentType<DateHeaderCellProps>;
/**
* Represents component based on the TimeHeaderCellProps.
*/
timeHeaderCell?: React_2.ComponentType<TimeHeaderCellProps>;
}
/** @hidden */
export declare interface Occurrence {
/** @hidden */
uid: string | number;
/**
* The `start` date of the item.
*/
start: Date;
/**
* The `end` date of the item.
*/
end: Date;
/**
* Represents the original start of the item.
*
* This property is being used when only a single occurrence of a recurring item is being edited.
*/
originalStart: Date | null;
/**
* The timezone name for the `start` date.
*/
startTimezone: string | null;
/**
* The timezone name for the `end` date.
*/
endTimezone: string | null;
/** @hidden */
isAllDay: boolean | null;
/**
* The `title` of the item.
*/
title: string | null;
/**
* The `description` of the item.
*/
description: string | null;
/** @hidden */
occurrenceId: string | null;
/** @hidden */
recurrenceExceptions: Date[] | null;
/** @hidden */
recurrenceRule: string | null;
/** @hidden */
recurrenceId: string | number | null;
/**
* Represents the original `DataItem` from which the item was created.
*
* For more information about the `data` collection, refer to the [Scheduler Data Binding]({% slug data_binding_scheduler %}) article.
*/
dataItem: DataItem;
}
/**
* @hidden
*/
declare type Omit_2<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
/** @hidden */
declare type Orientation = 'horizontal' | 'vertical' | null;
/** @hidden */
declare interface Range_2 {
index: number;
start: Date;
end: Date;
zonedStart: ZonedDate;
zonedEnd: ZonedDate;
isAllDay?: boolean;
}
export { Range_2 as Range }
/**
* Represents the available `action` types for the `SchedulerItemRemoveItemAction` objects.
*
* The available types are:
* - `REMOVE_ITEM_SET`
* - `REMOVE_ITEM_RESET`
* - `REMOVE_ITEM_COMPLETE`
*/
export declare enum REMOVE_ITEM_ACTION {
set = "REMOVE_ITEM_SET",
reset = "REMOVE_ITEM_RESET",
complete = "REMOVE_ITEM_COMPLETE"
}
/**
* Represents the available `action` types for the `SchedulerItemResizeItemAction` objects.
*
* The available types are:
* - `RESIZE_ITEM_SET`
* - `RESIZE_ITEM_START`
* - `RESIZE_ITEM_START_DRAG`
* - `RESIZE_ITEM_START_DRAG_SELECTED`
* - `RESIZE_ITEM_END_DRAG`
* - `RESIZE_ITEM_END_DRAG_SELECTED`
* - `RESIZE_ITEM_COMPLETE`
* - `RESIZE_ITEM_COMPLETE_OCCURRENCE`
* - `RESIZE_ITEM_COMPLETE_SERIES`
* - `RESIZE_ITEM_RESET`
*/
export declare enum RESIZE_ITEM_ACTION {
set = "RESIZE_ITEM_SET",
start = "RESIZE_ITEM_START",
startDrag = "RESIZE_ITEM_START_DRAG",
startDragSelected = "RESIZE_ITEM_START_DRAG_SELECTED",
endDrag = "RESIZE_ITEM_END_DRAG",
endDragSelected = "RESIZE_ITEM_END_DRAG_SELECTED",
complete = "RESIZE_ITEM_COMPLETE",
completeOccurrence = "RESIZE_ITEM_COMPLETE_OCCURRENCE",
completeSeries = "RESIZE_ITEM_COMPLETE_SERIES",
reset = "RESIZE_ITEM_RESET"
}
/** @hidden */
export declare interface Resource {
field: string;
valueField: string;
textField?: string;
colorField?: string;
multiple?: boolean;
}
/**
* Represents the [KendoReact Scheduler component]({% slug overview_scheduler %})
*
* @remarks
* Supported children components are: {@link TimelineView}, {@link DayView}, {@link WeekView}, {@link MonthView}, {@link AgendaView}.
*
* @example
* ```jsx
* const currentYear = new Date().getFullYear();
* const parseAdjust = (eventDate) => {
* const date = new Date(eventDate);
* date.setFullYear(currentYear);
* return date;
* };
*
* const baseData = [
* {
* TaskID: 4,
* OwnerID: 2,
* Title: 'Bowling tournament',
* Description: '',
* StartTimezone: null,
* Start: '2013-06-09T21:00:00.000Z',
* End: '2013-06-10T00:00:00.000Z',
* EndTimezone: null,
* RecurrenceRule: null,
* RecurrenceID: null,
* RecurrenceException: null,
* isAllDay: false,
* },
* {
* TaskID: 5,
* OwnerID: 2,
* Title: 'Take the dog to the vet',
* Description: '',
* StartTimezone: null,
* Start: '2013-06-10T07:00:00.000Z',
* End: '2013-06-10T08:00:00.000Z',
* EndTimezone: null,
* RecurrenceRule: null,
* RecurrenceID: null,
* RecurrenceException: null,
* isAllDay: false,
* },
* ];
*
* const sampleData = baseData.map((dataItem) => ({
* id: dataItem.TaskID,
* start: parseAdjust(dataItem.Start),
* startTimezone: dataItem.startTimezone,
* end: parseAdjust(dataItem.End),
* endTimezone: dataItem.endTimezone,
* isAllDay: dataItem.isAllDay,
* title: dataItem.Title,
* description: dataItem.Description,
* recurrenceRule: dataItem.RecurrenceRule,
* recurrenceExceptions: dataItem.RecurrenceException,
* roomId: dataItem.RoomID,
* ownerID: dataItem.OwnerID,
* personId: dataItem.OwnerID,
* }));
*
* const App = () => {
* return (
* <Scheduler data={sampleData}>
* <AgendaView />
* <DayView />
* <WeekView />
* <MonthView />
* </Scheduler>
* );
* };
* ReactDOM.render(<App />, document.querySelector('my-app'));
* ```
*/
export declare const Scheduler: React_2.ForwardRefExoticComponent<SchedulerProps & React_2.RefAttributes<SchedulerHandle | null>>;
/**
* A [React Context](https://react.dev/reference/react/hooks#context-hooks) providing access to the Scheduler internal `activeView` state.
*
* For more information, refer to the [Scheduler Context]({% slug context_scheduler %}) article.
*/
export declare const SchedulerActiveViewContext: React_2.Context<SchedulerActiveViewContextType>;
/**
* Specifies the result of the [useSchedulerActiveViewContext]({% slug api_scheduler_usescheduleractiveviewcontext %}) and [SchedulerActiveViewContext]({% slug api_scheduler_scheduleractiveviewcontext %}).
*/
export declare type SchedulerActiveViewContextType = [string, (activeView: string, event?: any) => void];
/**
* Called every time the user changes the provided `data`.
*
* For more information, refer to the [Scheduler Data Binding]({% slug data_binding_scheduler %}) article.
*/
export declare interface SchedulerDataChangeEvent {
created: DataItem[];
updated: DataItem[];
deleted: DataItem[];
}
/**
* A [React Context](https://react.dev/reference/react/hooks#context-hooks) providing access to the Scheduler internal `data` reducer.
*
* For more information, refer to the [Scheduler Context]({% slug context_scheduler %}) article.
*/
export declare const SchedulerDataContext: React_2.Context<SchedulerDataContextType>;
/**
* Specifies the result of the [useSchedulerDataContext]({% slug api_scheduler_useschedulerdatacontext %}) and [SchedulerDataContext]({% slug api_scheduler_schedulerdatacontext %}).
*/
export declare type SchedulerDataContextType = [DataItem[], (action: DataAction, event?: any) => void];
/**
* Called every time the user changes the selected `date`.
* The value is a JavaScript `Date` object.
* For more information, refer to the article on
* [date selection]({% slug date_selection_scheduler %}).
*/
export declare interface SchedulerDateChangeEvent {
value: Date;
}
/**
* A [React Context](https://react.dev/reference/react/hooks#context-hooks) providing access to the Scheduler internal `date` state.
*
* For more information, refer to the [Scheduler Context]({% slug context_scheduler %}) article.
*/
export declare const SchedulerDateContext: React_2.Context<SchedulerDateContextType>;
/**
* Specifies the result of the [useSchedulerDateContext]({% slug api_scheduler_useschedulerdatecontext %}) and [SchedulerDateContext]({% slug api_scheduler_schedulerdatecontext %}).
*/
export declare type SchedulerDateContextType = [Date, (date: Date, event?: any) => void];
/**
* A [React Context](https://react.dev/reference/react/hooks#context-hooks) providing access to the `dateRange` of the current view.
*
* For more information, refer to the [Scheduler Context]({% slug context_scheduler %}) article.
*/
export declare const SchedulerDateRangeContext: React_2.Context<DateRange>;
/**
* Specifies the result of the [useSchedulerDateRangeContext]({% slug api_scheduler_useschedulerdaterangecontext %}) and [SchedulerDateRangeContext]({% slug api_scheduler_schedulerdaterangecontext %}).
*/
export declare type SchedulerDateRangeContextType = DateRange;
export declare const schedulerDefaultProps: {
data: never[];
height: number;
tabIndex: number;
editable: boolean;
defaultDate: Date;
header: React_2.ForwardRefExoticComponent<SchedulerHeaderProps & React_2.RefAttributes<SchedulerHeaderHandle_2>>;
footer: React_2.ForwardRefExoticComponent<SchedulerFooterProps & React_2.RefAttributes<SchedulerFooterHandle_2>>;
navigation: React_2.ForwardRefExoticComponent<SchedulerNavigationProps & React_2.RefAttributes<SchedulerNavigationHandle>>;
viewSelector: React_2.ForwardRefExoticComponent<SchedulerViewSelectorProps & React_2.RefAttributes<SchedulerViewSelectorHandle>>;
};
/**
* Represents the default `drag` component rendered by the [KendoReact SchedulerEditItem component].
*/
export declare const SchedulerDrag: React_2.FunctionComponent<SchedulerDragProps>;
export declare const schedulerDragDefaultProps: {
viewItem: React_2.ForwardRefExoticComponent<SchedulerViewItemProps & React_2.RefAttributes<SchedulerViewItemHandle_2>>;
item: React_2.ForwardRefExoticComponent<SchedulerItemProps & React_2.RefAttributes<SchedulerItemHandle_2>>;
};
/**
* Represents the props of the KendoReact [SchedulerDrag] component.
*/
export declare interface SchedulerDragProps {
/** @hidden */
ignoreIsAllDay?: boolean;
/**
* Specifies the `DataItem` to be visualized as a Drag item.
*/
dataItem: DataItem;
/**
* Specifies the orientation of the SchedulerItem inside the Drag.
*/
vertical?: boolean;
/**
* Overrides the default component responsible for visualizing a single item.
*
* The default Component is: [SchedulerItem].
*/
item?: React_2.ComponentType<SchedulerItemProps>;
/**
* Overrides the default component responsible for positioning the item inside the view.
*
* The default Component is: [SchedulerViewItem]().
*/
viewItem?: React_2.ComponentType<SchedulerViewItemProps>;
}
/**
* Represents the default `editItem` component rendered by the [KendoReact Scheduler component]({% slug overview_scheduler %}).
*
* This is a composite component of the [`SchedulerViewItem`]({% slug api_scheduler_schedulerviewitem %}), extending it to provide editing through drag, resize and external form.
*/
export declare const SchedulerEditItem: React_2.ForwardRefExoticComponent<SchedulerEditItemProps & React_2.RefAttributes<SchedulerEditItemHandle>>;
/**
* Represents the available SchedulerEditItem` actions.
*
* Can be one of:
* - [SchedulerItemDragItemAction]({% slug api_scheduler_scheduleritemdragitemaction %})
* - [SchedulerItemResizeItemAction]({% slug api_scheduler_scheduleritemresizeitemaction %})
* - [SchedulerItemRemoveItemAction]({% slug api_scheduler_scheduleritemremoveitemaction %})
* - [SchedulerItemShowRemoveDialogAction]({% slug api_scheduler_scheduleritemshowremovedialogaction %})
* - [SchedulerItemShowOccurrenceDialogAction]({% slug api_scheduler_scheduleritemshowoccurrencedialogaction %})
* - [SchedulerItemSeriesAction]({% slug api_scheduler_scheduleritemseriesaction %})
* - [SchedulerItemsFocusAction]({% slug api_scheduler_scheduleritemsfocusaction %})
* - [SchedulerItemsSelectAction]({% slug api_scheduler_scheduleritemsselectaction %})
* - [SchedulerSlotsFocusAction]({% slug api_scheduler_schedulerslotsfocusaction %})
* - [SchedulerSlotsSelectAction]({% slug api_scheduler_schedulerslotsselectaction %})
*
* The following `falsy` values will be ignored:
* - `null`
* - `false`
* - `undefined`
*/
export declare type SchedulerEditItemAction = SchedulerItemFormItemAction | SchedulerItemDragItemAction | SchedulerItemResizeItemAction | SchedulerItemRemoveItemAction | SchedulerItemShowRemoveDialogAction | SchedulerItemShowOccurrenceDialogAction | SchedulerItemSeriesAction | SchedulerItemsFocusAction | SchedulerItemsSelectAction | SchedulerSlotsFocusAction | SchedulerSlotsSelectAction | null | false | undefined;
export declare const schedulerEditItemDefaultProps: {
viewItem: React_2.ForwardRefExoticComponent<SchedulerViewItemProps & React_2.RefAttributes<SchedulerViewItemHandle_3>>;
drag: React_2.FunctionComponent<SchedulerDragProps>;
resize: React_2.FunctionComponent<SchedulerResizeProps>;
form: React_2.ForwardRefExoticComponent<SchedulerFormProps & React_2.RefAttributes<SchedulerFormHandle_2 | null>>;
occurrenceDialog: React_2.ForwardRefExoticComponent<SchedulerOccurrenceDialogProps & React_2.RefAttributes<SchedulerOccurrenceDialogHandle_2 | null>>;
removeDialog: React_2.ForwardRefExoticComponent<SchedulerRemoveDialogProps & React_2.RefAttributes<SchedulerRemoveDialogHandle_2 | null>>;
onClickAction: (event: SchedulerItemMouseEvent, _: SchedulerEditItemProps, state: SchedulerEditItemState) => SchedulerEditItemAction[];
onDoubleClickAction: (_: any, props: SchedulerEditItemProps) => (false | {
type: FORM_ITEM_ACTION;
payload: any;
} | {
type: SHOW_OCCURRENCE_DIALOG_ACTION;
payload?: undefined;
})[];
onRemoveClickAction: (_: any, props: SchedulerEditItemProps) => ({
type: REMOVE_ITEM_ACTION;
payload: any;
} | {
type: SHOW_OCCURRENCE_DIALOG_ACTION;
payload?: undefined;
} | {
type: SHOW_REMOVE_DIALOG_ACTION;
payload?: undefined;
})[];
onPressAction: (event: SchedulerItemDragEvent, props: SchedulerEditItemProps) => never[] | {
type: DRAG_ITEM_ACTION;
payload: {
x: number;
y: number;
};
};
onDragAction: (event: SchedulerItemDragEvent, props: SchedulerEditItemProps) => never[] | {
type: DRAG_ITEM_ACTION;
payload: {
x: number;
y: number;
};
};
onReleaseAction: (event: SchedulerItemDragEvent, props: SchedulerEditItemProps, state: SchedulerEditItemState) => never[] | {
type: SHOW_OCCURRENCE_DIALOG_ACTION;
payload?: undefined;
} | {
type: DRAG_ITEM_ACTION;
payload: {
x: number;
y: number;
};
};
onResizePressAction: (event: SchedulerItemDragEvent, props: SchedulerEditItemProps) => never[] | {
type: RESIZE_ITEM_ACTION;
payload: {
x: number;
y: number;
};
};
onResizeStartDragAction: (event: SchedulerItemDragEvent, props: SchedulerEditItemProps) => never[] | {
type: RESIZE_ITEM_ACTION;
payload: {
x: number;
y: number;
};
};
onResizeEndDragAction: (event: SchedulerItemDragEvent, props: SchedulerEditItemProps) => never[] | {
type: RESIZE_ITEM_ACTION;
payload: {
x: number;
y: number;
};
};
onResizeReleaseAction: (event: SchedulerItemDragEvent, props: SchedulerEditItemProps, state: SchedulerEditItemState) => never[] | {
type: SHOW_OCCURRENCE_DIALOG_ACTION;
payload?: undefined;
} | {
type: RESIZE_ITEM_ACTION;
payload: {
x: number;
y: number;
};
};
onOccurrenceClickAction: (_event: SchedulerOccurrenceDialogStateChangeEvent<any>, props: SchedulerEditItemProps, state: SchedulerEditItemState) => SchedulerEditItemAction[];
onSeriesClickAction: (_event: SchedulerOccurrenceDialogStateChangeEvent<any>, props: SchedulerEditItemProps, state: SchedulerEditItemState) => SchedulerEditItemAction[];
onKeyDownAction: (event: SchedulerItemKeyboardEvent, props: SchedulerEditItemProps) => SchedulerEditItemAction | SchedulerEditItemAction[];
onFormSubmitAction: (event: SchedulerFormStateChangeEvent<DataItem | null>) => SchedulerEditItemAction[];
onRemoveConfirmAction: () => SchedulerEditItemAction[];
onCancelAction: () => SchedulerEditItemAction[];
};
/**
* A [React Context](https://react.dev/reference/react/hooks#context-hooks) providing access to the [SchedulerEditItem]({% slug edit-item_items_scheduler %}) internal `dragItem` state.
*
* For more information, refer to the [Items Context]({% slug state-update_items_scheduler %}) article.
*/
export declare const SchedulerEditItemDragItemContext: React_2.Context<SchedulerEditItemDragItemContextType>;
/**
* Specifies the result of the [useSchedulerEditItemDragItemContext]({% slug api_scheduler_usescheduleredititemdragitemcontext %}) and [SchedulerEditItemDragItemContext]({% slug api_scheduler_scheduleredititemdragitemcontext %}).
*/
export declare type SchedulerEditItemDragItemContextType = [
DataItem | null,
(newValue?: DataItem | null, event?: React_2.SyntheticEvent | BaseEvent_2<any> | {
preventDefault: any;
}) => void,
(action: SchedulerItemFormItemAction, event?: React_2.SyntheticEvent | BaseEvent_2<any> | {
preventDefault: any;
}) => void
];
/**
* A [React Context](https://react.dev/reference/react/hooks#context-hooks) providing access to the [SchedulerEditItem]({% slug edit-item_items_scheduler %}) internal `formItem` state.
*
* For more information, refer to the [Items Context]({% slug state-update_items_scheduler %}) article.
*/
export declare const SchedulerEditItemFormItemContext: React_2.Context<SchedulerEditItemFormItemContextType>;
/**
* Specifies the result of the [useSchedulerEditItemFormItemContext]({% slug api_scheduler_usescheduleredititemformitemcontext %}) and [SchedulerEditItemFormItemContext]({% slug api_scheduler_scheduleredititemformitemcontext %}).
*/
export declare type SchedulerEditItemFormItemContextType = [
DataItem | null,
(newValue: DataItem | null, event?: React_2.SyntheticEvent | BaseEvent_2<any> | {
preventDefault: any;
}) => void,
(action: SchedulerItemFormItemAction, event?: React_2.SyntheticEvent | BaseEvent_2<any> | {
preventDefault: any;
}) => void
];
/**
* Represents the object which is returned from the `ref` callback of the [SchedulerEditItem]({% slug api_scheduler_scheduleredititem %}).
*
* For more information about Refs, refer to the [React Refs & Dom](https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom) article.
*/
export declare interface SchedulerEditItemHandle {
element: HTMLDivElement | null;
props: SchedulerEditItemProps;
}
/**
* Represents the props of the KendoReact [SchedulerEditItem]() component.
*/
export declare interface SchedulerEditItemProps extends SchedulerViewItemProps {
/**
* Overrides the default component responsible for positioning the item inside the view.
*
* The default Component is: [SchedulerViewItem]({% slug api_scheduler_schedulerviewitem %}).
*/
viewItem?: React_2.ComponentType<SchedulerViewItemProps>;
/**
* Overrides the default component responsible for visualizing the `dragItem`.
*
* The default Component is: [SchedulerDrag]({% slug api_scheduler_schedulerdrag %}).
*/
drag?: React_2.ComponentType<SchedulerDragProps>;
/**
* Overrides the default component responsible for visualizing the `resizeItem`.
*
* The default Component is: [SchedulerResize]({% slug api_scheduler_schedulerresize %}).
*/
resize?: React_2.ComponentType<SchedulerResizeProps>;
/**
* Overrides the default component responsible for visualizing the `formItem`.
*
* The default Component is: [SchedulerForm]({% slug api_scheduler_schedulerform %}).
*/
form?: React_2.ComponentType<SchedulerFormProps>;
/**
* Overrides the default component responsible for visualizing the `removeItem` and confirming the `remove` action.
*
* The default Component is: [SchedulerRemoveDialog]({% slug api_scheduler_schedulerremovedialog %}).
*/
removeDialog?: React_2.ComponentType<SchedulerRemoveDialogProps>;
/**
* Overrides the default compo