import PropTypes from 'prop-types'; import XDate from 'xdate'; import React, { Component } from 'react'; import { Animated, ViewStyle, LayoutChangeEvent, NativeSyntheticEvent, NativeScrollEvent } from 'react-native'; import { DateData, AgendaSchedule } from '../types'; import { CalendarListProps } from '../calendar-list'; import ReservationList, { ReservationListProps } from './reservation-list'; export type AgendaProps = CalendarListProps & ReservationListProps & { /** the list of items that have to be displayed in agenda. If you want to render item as empty date the value of date key kas to be an empty array []. If there exists no value for date key it is considered that the date in question is not yet loaded */ items?: AgendaSchedule; /** callback that gets called when items for a certain month should be loaded (month became visible) */ loadItemsForMonth?: (data: DateData) => void; /** callback that fires when the calendar is opened or closed */ onCalendarToggled?: (enabled: boolean) => void; /** callback that gets called when day changes while scrolling agenda list */ onDayChange?: (data: DateData) => void; /** specify how agenda knob should look like */ renderKnob?: () => JSX.Element; /** override inner list with a custom implemented component */ renderList?: (listProps: ReservationListProps) => JSX.Element; /** initially selected day */ selected?: string; /** Hide knob button. Default = false */ hideKnob?: boolean; /** Whether the knob should always be visible (when hideKnob = false) */ showClosingKnob?: boolean; }; type State = { scrollY: Animated.Value; calendarIsReady: boolean; calendarScrollable: boolean; firstReservationLoad: boolean; selectedDay: XDate; topDay: XDate; }; /** * @description: Agenda component * @extends: CalendarList * @extendslink: docs/CalendarList * @example: https://github.com/wix/react-native-calendars/blob/master/example/src/screens/agenda.js * @gif: https://github.com/wix/react-native-calendars/blob/master/demo/assets/agenda.gif */ export default class Agenda extends Component { static displayName: string; static propTypes: { items: PropTypes.Requireable; style: PropTypes.Requireable>; loadItemsForMonth: PropTypes.Requireable<(...args: any[]) => any>; onCalendarToggled: PropTypes.Requireable<(...args: any[]) => any>; onDayChange: PropTypes.Requireable<(...args: any[]) => any>; renderKnob: PropTypes.Requireable<(...args: any[]) => any>; renderList: PropTypes.Requireable<(...args: any[]) => any>; selected: PropTypes.Requireable; hideKnob: PropTypes.Requireable; showClosingKnob: PropTypes.Requireable; selectedDay: PropTypes.Requireable; topDay: PropTypes.Requireable; showOnlySelectedDayItems: PropTypes.Requireable; renderEmptyData: PropTypes.Requireable<(...args: any[]) => any>; onScroll: PropTypes.Requireable<(...args: any[]) => any>; onScrollBeginDrag: PropTypes.Requireable<(...args: any[]) => any>; onScrollEndDrag: PropTypes.Requireable<(...args: any[]) => any>; onMomentumScrollBegin: PropTypes.Requireable<(...args: any[]) => any>; onMomentumScrollEnd: PropTypes.Requireable<(...args: any[]) => any>; refreshControl: PropTypes.Requireable; refreshing: PropTypes.Requireable; onRefresh: PropTypes.Requireable<(...args: any[]) => any>; reservationsKeyExtractor: PropTypes.Requireable<(...args: any[]) => any>; date: PropTypes.Requireable; item: PropTypes.Requireable; theme: PropTypes.Requireable; /** callback that gets called when items for a certain month should be loaded (month became visible) */ rowHasChanged: PropTypes.Requireable<(...args: any[]) => any>; renderDay: PropTypes.Requireable<(...args: any[]) => any>; renderItem: PropTypes.Requireable<(...args: any[]) => any>; renderEmptyDate: PropTypes.Requireable<(...args: any[]) => any>; pastScrollRange?: React.Validator | undefined; futureScrollRange?: React.Validator | undefined; calendarWidth?: React.Validator | undefined; calendarHeight?: React.Validator | undefined; calendarStyle?: React.Validator | undefined; staticHeader?: React.Validator | undefined; showScrollIndicator?: React.Validator | undefined; animateScroll?: React.Validator | undefined; current?: React.Validator | undefined; initialDate?: React.Validator | undefined; minDate?: React.Validator | undefined; maxDate?: React.Validator | undefined; allowSelectionOutOfRange?: React.Validator | undefined; markedDates?: React.Validator | undefined; hideExtraDays?: React.Validator | undefined; showSixWeeks?: React.Validator | undefined; onDayPress?: React.Validator<((date: DateData) => void) | null | undefined> | undefined; onDayLongPress?: React.Validator<((date: DateData) => void) | null | undefined> | undefined; onMonthChange?: React.Validator<((date: DateData) => void) | null | undefined> | undefined; onVisibleMonthsChange?: React.Validator<((months: DateData[]) => void) | null | undefined> | undefined; disableMonthChange?: React.Validator | undefined; enableSwipeMonths?: React.Validator | undefined; headerStyle?: React.Validator> | undefined; customHeader?: React.Validator | undefined; disabledByDefault?: React.Validator | undefined; disabledByWeekDays?: React.Validator | undefined; testID?: React.Validator | undefined; month?: React.Validator | undefined; addMonth?: React.Validator<((num: number) => void) | null | undefined> | undefined; firstDay?: React.Validator | undefined; displayLoadingIndicator?: React.Validator | undefined; showWeekNumbers?: React.Validator | undefined; monthFormat?: React.Validator | undefined; hideDayNames?: React.Validator | undefined; hideArrows?: React.Validator | undefined; renderArrow?: React.Validator<((direction: import("../types").Direction) => React.ReactNode) | null | undefined> | undefined; onPressArrowLeft?: React.Validator<((method: () => void, month?: XDate | undefined) => void) | null | undefined> | undefined; onPressArrowRight?: React.Validator<((method: () => void, month?: XDate | undefined) => void) | null | undefined> | undefined; arrowsHitSlop?: React.Validator | undefined; disableArrowLeft?: React.Validator | undefined; disableArrowRight?: React.Validator | undefined; disabledDaysIndexes?: React.Validator | undefined; renderHeader?: React.Validator<((date?: XDate | undefined, info?: Pick | undefined) => React.ReactNode) | null | undefined> | undefined; customHeaderTitle?: React.Validator | undefined; webAriaLevel?: React.Validator | undefined; accessibilityElementsHidden?: React.Validator | undefined; importantForAccessibility?: React.Validator<"auto" | "yes" | "no" | "no-hide-descendants" | null | undefined> | undefined; numberOfDays?: React.Validator | undefined; timelineLeftInset?: React.Validator | undefined; onHeaderLayout?: React.Validator<((event: LayoutChangeEvent) => void) | null | undefined> | undefined; dayComponent?: React.Validator | null | undefined> | undefined; state?: React.Validator | undefined; marking?: React.Validator | undefined; markingType?: React.Validator | undefined; onPress?: React.Validator<((date?: DateData | undefined) => void) | null | undefined> | undefined; onLongPress?: React.Validator<((date?: DateData | undefined) => void) | null | undefined> | undefined; disableAllTouchEventsForDisabledDays?: React.Validator | undefined; disableAllTouchEventsForInactiveDays?: React.Validator | undefined; accessibilityLabel?: React.Validator | undefined; children?: React.Validator | undefined; hitSlop?: React.Validator | undefined; id?: React.Validator | undefined; onLayout?: React.Validator<((event: LayoutChangeEvent) => void) | null | undefined> | undefined; pointerEvents?: React.Validator<"auto" | "none" | "box-none" | "box-only" | null | undefined> | undefined; removeClippedSubviews?: React.Validator | undefined; nativeID?: React.Validator | undefined; collapsable?: React.Validator | undefined; needsOffscreenAlphaCompositing?: React.Validator | undefined; renderToHardwareTextureAndroid?: React.Validator | undefined; focusable?: React.Validator | undefined; shouldRasterizeIOS?: React.Validator | undefined; isTVSelectable?: React.Validator | undefined; hasTVPreferredFocus?: React.Validator | undefined; tvParallaxProperties?: React.Validator | undefined; tvParallaxShiftDistanceX?: React.Validator | undefined; tvParallaxShiftDistanceY?: React.Validator | undefined; tvParallaxTiltAngle?: React.Validator | undefined; tvParallaxMagnification?: React.Validator | undefined; onStartShouldSetResponder?: React.Validator<((event: import("react-native").GestureResponderEvent) => boolean) | null | undefined> | undefined; onMoveShouldSetResponder?: React.Validator<((event: import("react-native").GestureResponderEvent) => boolean) | null | undefined> | undefined; onResponderEnd?: React.Validator<((event: import("react-native").GestureResponderEvent) => void) | null | undefined> | undefined; onResponderGrant?: React.Validator<((event: import("react-native").GestureResponderEvent) => void) | null | undefined> | undefined; onResponderReject?: React.Validator<((event: import("react-native").GestureResponderEvent) => void) | null | undefined> | undefined; onResponderMove?: React.Validator<((event: import("react-native").GestureResponderEvent) => void) | null | undefined> | undefined; onResponderRelease?: React.Validator<((event: import("react-native").GestureResponderEvent) => void) | null | undefined> | undefined; onResponderStart?: React.Validator<((event: import("react-native").GestureResponderEvent) => void) | null | undefined> | undefined; onResponderTerminationRequest?: React.Validator<((event: import("react-native").GestureResponderEvent) => boolean) | null | undefined> | undefined; onResponderTerminate?: React.Validator<((event: import("react-native").GestureResponderEvent) => void) | null | undefined> | undefined; onStartShouldSetResponderCapture?: React.Validator<((event: import("react-native").GestureResponderEvent) => boolean) | null | undefined> | undefined; onMoveShouldSetResponderCapture?: React.Validator<((event: import("react-native").GestureResponderEvent) => boolean) | null | undefined> | undefined; onTouchStart?: React.Validator<((event: import("react-native").GestureResponderEvent) => void) | null | undefined> | undefined; onTouchMove?: React.Validator<((event: import("react-native").GestureResponderEvent) => void) | null | undefined> | undefined; onTouchEnd?: React.Validator<((event: import("react-native").GestureResponderEvent) => void) | null | undefined> | undefined; onTouchCancel?: React.Validator<((event: import("react-native").GestureResponderEvent) => void) | null | undefined> | undefined; onTouchEndCapture?: React.Validator<((event: import("react-native").GestureResponderEvent) => void) | null | undefined> | undefined; onPointerEnter?: React.Validator<((event: import("react-native").PointerEvent) => void) | null | undefined> | undefined; onPointerEnterCapture?: React.Validator<((event: import("react-native").PointerEvent) => void) | null | undefined> | undefined; onPointerLeave?: React.Validator<((event: import("react-native").PointerEvent) => void) | null | undefined> | undefined; onPointerLeaveCapture?: React.Validator<((event: import("react-native").PointerEvent) => void) | null | undefined> | undefined; onPointerMove?: React.Validator<((event: import("react-native").PointerEvent) => void) | null | undefined> | undefined; onPointerMoveCapture?: React.Validator<((event: import("react-native").PointerEvent) => void) | null | undefined> | undefined; onPointerCancel?: React.Validator<((event: import("react-native").PointerEvent) => void) | null | undefined> | undefined; onPointerCancelCapture?: React.Validator<((event: import("react-native").PointerEvent) => void) | null | undefined> | undefined; onPointerDown?: React.Validator<((event: import("react-native").PointerEvent) => void) | null | undefined> | undefined; onPointerDownCapture?: React.Validator<((event: import("react-native").PointerEvent) => void) | null | undefined> | undefined; onPointerUp?: React.Validator<((event: import("react-native").PointerEvent) => void) | null | undefined> | undefined; onPointerUpCapture?: React.Validator<((event: import("react-native").PointerEvent) => void) | null | undefined> | undefined; accessible?: React.Validator | undefined; accessibilityActions?: React.Validator[] | null | undefined> | undefined; 'aria-label'?: React.Validator | undefined; accessibilityRole?: React.Validator | undefined; accessibilityState?: React.Validator | undefined; 'aria-busy'?: React.Validator | undefined; 'aria-checked'?: React.Validator | undefined; 'aria-disabled'?: React.Validator | undefined; 'aria-expanded'?: React.Validator | undefined; 'aria-selected'?: React.Validator | undefined; 'aria-labelledby'?: React.Validator | undefined; accessibilityHint?: React.Validator | undefined; accessibilityValue?: React.Validator | undefined; 'aria-valuemax'?: React.Validator | undefined; 'aria-valuemin'?: React.Validator | undefined; 'aria-valuenow'?: React.Validator | undefined; 'aria-valuetext'?: React.Validator | undefined; onAccessibilityAction?: React.Validator<((event: import("react-native").AccessibilityActionEvent) => void) | null | undefined> | undefined; 'aria-hidden'?: React.Validator | undefined; 'aria-live'?: React.Validator<"polite" | "assertive" | "off" | null | undefined> | undefined; 'aria-modal'?: React.Validator | undefined; role?: React.Validator | undefined; accessibilityLiveRegion?: React.Validator<"none" | "polite" | "assertive" | null | undefined> | undefined; accessibilityLabelledBy?: React.Validator | undefined; accessibilityViewIsModal?: React.Validator | undefined; onAccessibilityEscape?: React.Validator<(() => void) | null | undefined> | undefined; onAccessibilityTap?: React.Validator<(() => void) | null | undefined> | undefined; onMagicTap?: React.Validator<(() => void) | null | undefined> | undefined; accessibilityIgnoresInvertColors?: React.Validator | undefined; accessibilityLanguage?: React.Validator | undefined; horizontal?: React.Validator | undefined; columnWrapperStyle?: React.Validator> | undefined; keyboardShouldPersistTaps?: React.Validator | undefined; extraData?: React.Validator | undefined; getItemLayout?: React.Validator<((data: ArrayLike | null | undefined, index: number) => { length: number; offset: number; index: number; }) | null | undefined> | undefined; initialNumToRender?: React.Validator | undefined; initialScrollIndex?: React.Validator | undefined; keyExtractor?: React.Validator<((item: any, index: number) => string) | null | undefined> | undefined; legacyImplementation?: React.Validator | undefined; numColumns?: React.Validator | undefined; onViewableItemsChanged?: React.Validator<((info: { viewableItems: import("react-native").ViewToken[]; changed: import("react-native").ViewToken[]; }) => void) | null | undefined> | undefined; viewabilityConfig?: React.Validator | undefined; fadingEdgeLength?: React.Validator | undefined; ItemSeparatorComponent?: React.Validator | null | undefined> | undefined; ListEmptyComponent?: React.Validator | React.ReactElement> | null | undefined> | undefined; ListFooterComponent?: React.Validator | React.ReactElement> | null | undefined> | undefined; ListFooterComponentStyle?: React.Validator> | undefined; ListHeaderComponent?: React.Validator | React.ReactElement> | null | undefined> | undefined; ListHeaderComponentStyle?: React.Validator> | undefined; debug?: React.Validator | undefined; disableVirtualization?: React.Validator | undefined; getItem?: React.Validator<((data: any, index: number) => any) | null | undefined> | undefined; getItemCount?: React.Validator<((data: any) => number) | null | undefined> | undefined; inverted?: React.Validator | undefined; maxToRenderPerBatch?: React.Validator | undefined; onEndReached?: React.Validator<((info: { distanceFromEnd: number; }) => void) | null | undefined> | undefined; onEndReachedThreshold?: React.Validator | undefined; onScrollToIndexFailed?: React.Validator<((info: { index: number; highestMeasuredFrameIndex: number; averageItemLength: number; }) => void) | null | undefined> | undefined; onStartReached?: React.Validator<((info: { distanceFromStart: number; }) => void) | null | undefined> | undefined; onStartReachedThreshold?: React.Validator | undefined; progressViewOffset?: React.Validator | undefined; renderScrollComponent?: React.Validator<((props: import("react-native").ScrollViewProps) => React.ReactElement>) | null | undefined> | undefined; updateCellsBatchingPeriod?: React.Validator | undefined; viewabilityConfigCallbackPairs?: React.Validator | undefined; windowSize?: React.Validator | undefined; CellRendererComponent?: React.Validator> | null | undefined> | undefined; contentContainerStyle?: React.Validator> | undefined; decelerationRate?: React.Validator | undefined; invertStickyHeaders?: React.Validator | undefined; keyboardDismissMode?: React.Validator<"none" | "interactive" | "on-drag" | null | undefined> | undefined; onContentSizeChange?: React.Validator<((w: number, h: number) => void) | null | undefined> | undefined; pagingEnabled?: React.Validator | undefined; scrollEnabled?: React.Validator | undefined; showsHorizontalScrollIndicator?: React.Validator | undefined; showsVerticalScrollIndicator?: React.Validator | undefined; stickyHeaderHiddenOnScroll?: React.Validator | undefined; snapToInterval?: React.Validator | undefined; snapToOffsets?: React.Validator | undefined; snapToStart?: React.Validator | undefined; snapToEnd?: React.Validator | undefined; stickyHeaderIndices?: React.Validator | undefined; disableIntervalMomentum?: React.Validator | undefined; disableScrollViewPanResponder?: React.Validator | undefined; StickyHeaderComponent?: React.Validator | null | undefined> | undefined; alwaysBounceHorizontal?: React.Validator | undefined; alwaysBounceVertical?: React.Validator | undefined; automaticallyAdjustContentInsets?: React.Validator | undefined; automaticallyAdjustKeyboardInsets?: React.Validator | undefined; automaticallyAdjustsScrollIndicatorInsets?: React.Validator | undefined; bounces?: React.Validator | undefined; bouncesZoom?: React.Validator | undefined; canCancelContentTouches?: React.Validator | undefined; centerContent?: React.Validator | undefined; contentInset?: React.Validator | undefined; contentOffset?: React.Validator | undefined; contentInsetAdjustmentBehavior?: React.Validator<"never" | "always" | "automatic" | "scrollableAxes" | null | undefined> | undefined; directionalLockEnabled?: React.Validator | undefined; indicatorStyle?: React.Validator<"white" | "default" | "black" | null | undefined> | undefined; maintainVisibleContentPosition?: React.Validator<{ autoscrollToTopThreshold?: number | null | undefined; minIndexForVisible: number; } | null | undefined> | undefined; maximumZoomScale?: React.Validator | undefined; minimumZoomScale?: React.Validator | undefined; onScrollAnimationEnd?: React.Validator<(() => void) | null | undefined> | undefined; pinchGestureEnabled?: React.Validator | undefined; scrollEventThrottle?: React.Validator | undefined; scrollIndicatorInsets?: React.Validator | undefined; scrollToOverflowEnabled?: React.Validator | undefined; scrollsToTop?: React.Validator | undefined; snapToAlignment?: React.Validator<"center" | "end" | "start" | null | undefined> | undefined; onScrollToTop?: React.Validator<((event: NativeSyntheticEvent) => void) | null | undefined> | undefined; zoomScale?: React.Validator | undefined; endFillColor?: React.Validator | undefined; scrollPerfTag?: React.Validator | undefined; overScrollMode?: React.Validator<"auto" | "never" | "always" | null | undefined> | undefined; nestedScrollEnabled?: React.Validator | undefined; persistentScrollbar?: React.Validator | undefined; context?: React.Validator | undefined; ref?: React.Validator | undefined> | undefined; key?: React.Validator | undefined; }; private style; private viewHeight; private viewWidth; private scrollTimeout?; private headerState; private currentMonth; private knobTracker; private _isMounted; private scrollPad; private calendar; private knob; list: React.RefObject; constructor(props: AgendaProps); componentDidMount(): void; componentWillUnmount(): void; componentDidUpdate(prevProps: AgendaProps, prevState: State): void; static getDerivedStateFromProps(nextProps: AgendaProps): { firstReservationLoad: boolean; } | null; getSelectedDate(date?: string): XDate; calendarOffset(): number; initialScrollPadPosition: () => number; setScrollPadPosition: (y: number, animated: boolean) => void; toggleCalendarPosition: (open: boolean) => void; enableCalendarScrolling(enable?: boolean): void; loadReservations(props: AgendaProps): void; onDayPress: (d: DateData) => void; chooseDay(d: DateData, optimisticScroll: boolean): void; generateMarkings: (this: any, selectedDay: any, markedDates: any, items: any) => any; onScrollPadLayout: () => void; onCalendarListLayout: () => void; onLayout: (event: LayoutChangeEvent) => void; onTouchStart: () => void; onTouchEnd: () => void; onStartDrag: () => void; onSnapAfterDrag: (e: NativeSyntheticEvent) => void; onVisibleMonthsChange: (months: DateData[]) => void; onDayChange: (day: XDate) => void; renderReservations(): React.JSX.Element; renderCalendarList(): React.JSX.Element; renderKnob(): JSX.Element | null; renderWeekDaysNames: () => React.JSX.Element; renderWeekNumbersSpace: () => false | React.JSX.Element | undefined; render(): React.JSX.Element; } export {};