@super-calendar/native 2.11.0 → 2.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- import { A as CalendarTheme, C as RecurrenceFrequency, D as TimeGridMode, E as RenderEventArgs, F as mergeTheme, I as useCalendarTheme, M as PartialCalendarTheme, N as darkTheme, O as WeekStartsOn, P as defaultTheme, S as ICalendarEvent, T as RenderEvent, _ as EventAccessibilityLabelContext, a as MonthPager, b as EventDragStartHandler, c as MonthViewProps, d as SlotDefault, f as SlotStyleProps, g as CalendarMode, h as CalendarEvent, i as MonthListSlot, j as CalendarThemeProvider, k as WeekdayFormat, l as MonthViewSlot, m as BusinessHoursBand, n as MonthList, o as MonthPagerProps, p as BusinessHours, r as MonthListProps, s as MonthView, t as DefaultMonthEvent, u as ResolvedSlot, v as EventAccessibilityLabeler, w as RecurrenceRule, x as EventKeyExtractor, y as EventDragHandler } from "./DefaultMonthEvent--9Jg6w-x.js";
1
+ import { A as CalendarTheme, C as RecurrenceFrequency, D as TimeGridMode, E as RenderEventArgs, F as mergeTheme, I as useCalendarTheme, M as PartialCalendarTheme, N as darkTheme, O as WeekStartsOn, P as defaultTheme, S as ICalendarEvent, T as RenderEvent, _ as EventAccessibilityLabelContext, a as MonthPager, b as EventDragStartHandler, c as MonthViewProps, d as SlotDefault, f as SlotStyleProps, g as CalendarMode, h as CalendarEvent, i as MonthListSlot, j as CalendarThemeProvider, k as WeekdayFormat, l as MonthViewSlot, m as BusinessHoursBand, n as MonthList, o as MonthPagerProps, p as BusinessHours, r as MonthListProps, s as MonthView, t as DefaultMonthEvent, u as ResolvedSlot, v as EventAccessibilityLabeler, w as RecurrenceRule, x as EventKeyExtractor, y as EventDragHandler } from "./DefaultMonthEvent-DlIIWDzr.js";
2
2
  import { Locale } from "date-fns";
3
3
  import { ComponentType, ReactElement, ReactNode } from "react";
4
4
  import { ScrollViewProps, StyleProp, ViewStyle } from "react-native";
5
5
  import { SharedValue, useSharedValue } from "react-native-reanimated";
6
- import { BusinessHoursBand as BusinessHoursBand$1, BusinessHoursValue, CalendarEvent as CalendarEvent$1, DateRange, DateRange as DateRange$1, DateSelectionConstraints, DaySelectionState, EventAccessibilityLabeler as EventAccessibilityLabeler$1, ICalEvent, MonthEventSegment, MonthGrid, MonthGridDay, MonthGridWeek, MonthGridWeekday, MonthWeekEvents, PositionedEvent, ToICalendarOptions, UseDateRangeOptions, UseMonthGridOptions, WeekdayFormat as WeekdayFormat$1, backgroundBandsForDay, buildMonthGrid, buildMonthWeeks, daySelectionState, eventsInTimeZone, expandRecurringEvents, getIsToday, getViewDays, getWeekDays, isAllDayEvent, isBackgroundEvent, isDateSelectable, isRangeEndpoint, isSameCalendarDay, isWeekend, isWithinDateRange, layoutDayEvents, layoutMonthWeek, minutesIntoDay, nextDateRange, parseICalendar, toICalendar, toZonedTime, useDateRange, useEventSource, useMonthGrid, useNow, weekdayFormatToken } from "@super-calendar/core";
6
+ import { BusinessHoursBand as BusinessHoursBand$1, BusinessHoursValue, CalendarEvent as CalendarEvent$1, CalendarLabels, CalendarLabels as CalendarLabels$1, DateRange, DateRange as DateRange$1, DateSelectionConstraints, DaySelectionState, EventAccessibilityLabeler as EventAccessibilityLabeler$1, ICalEvent, MonthEventSegment, MonthGrid, MonthGridDay, MonthGridWeek, MonthGridWeekday, MonthWeekEvents, PositionedEvent, ToICalendarOptions, UseDateRangeOptions, UseMonthGridOptions, WeekdayFormat as WeekdayFormat$1, backgroundBandsForDay, buildMonthGrid, buildMonthWeeks, daySelectionState, defaultCalendarLabels, eventsInTimeZone, expandRecurringEvents, getIsToday, getViewDays, getWeekDays, isAllDayEvent, isBackgroundEvent, isDateSelectable, isRangeEndpoint, isSameCalendarDay, isWeekend, isWithinDateRange, layoutDayEvents, layoutMonthWeek, minutesIntoDay, nextDateRange, parseICalendar, toICalendar, toZonedTime, useDateRange, useEventSource, useMonthGrid, useNow, weekdayFormatToken } from "@super-calendar/core";
7
7
  //#region src/components/YearView.d.ts
8
8
  /**
9
9
  * The styleable parts of {@link YearView}. `dayText` and `eventDot` are the
@@ -22,6 +22,8 @@ type YearViewProps<T = unknown> = SlotStyleProps<YearViewSlot> & {
22
22
  /** Weekdays (0=Sunday…6=Saturday) hidden from the grid, e.g. `[0, 6]` for weekends off. */
23
23
  hiddenDays?: number[];
24
24
  locale?: Locale;
25
+ /** Translations for the screen-reader words; omitted keys use English. */
26
+ labels?: Partial<CalendarLabels$1>;
25
27
  /** Highlight this date instead of the real "today". */
26
28
  activeDate?: Date;
27
29
  /** A selected span: endpoints get a filled badge, the days between get the range band. */
@@ -62,7 +64,7 @@ type YearViewProps<T = unknown> = SlotStyleProps<YearViewSlot> & {
62
64
  /** Pull-to-refresh control, mounted on the year's scroll view. */
63
65
  refreshControl?: ScrollViewProps["refreshControl"];
64
66
  };
65
- declare function YearViewInner<T>({ date, events, weekStartsOn, hiddenDays, locale, activeDate, selectedRange, selectedDates, minDate, maxDate, isDateDisabled, minMonthWidth, onPressDay, onPressMonth, onSelectDrag, onCreateEvent, refreshControl, classNames, styles: styleOverrides }: YearViewProps<T>): ReactElement;
67
+ declare function YearViewInner<T>({ date, events, weekStartsOn, hiddenDays, locale, labels: labelsProp, activeDate, selectedRange, selectedDates, minDate, maxDate, isDateDisabled, minMonthWidth, onPressDay, onPressMonth, onSelectDrag, onCreateEvent, refreshControl, classNames, styles: styleOverrides }: YearViewProps<T>): ReactElement;
66
68
  /**
67
69
  * A year at a glance: the twelve months as compact mini grids, with today
68
70
  * highlighted and a dot under days that hold events. Tap a day or a month
@@ -81,7 +83,7 @@ declare function YearViewInner<T>({ date, events, weekStartsOn, hiddenDays, loca
81
83
  * />
82
84
  * ```
83
85
  */
84
- declare const YearView: typeof YearViewInner;
86
+ export declare const YearView: typeof YearViewInner;
85
87
  //#endregion
86
88
  //#region src/components/Agenda.d.ts
87
89
  /**
@@ -110,11 +112,11 @@ type AgendaProps<T> = SlotStyleProps<AgendaSlot> & {
110
112
  * start, grouped under a date header per day. The consumer controls which
111
113
  * events (and therefore which date range) are shown.
112
114
  */
113
- declare function Agenda<T>({ events, locale, renderEvent, keyExtractor, onPressEvent, onLongPressEvent, onPressDay, activeDate, itemSeparatorComponent, refreshControl, classNames, styles: styleOverrides }: AgendaProps<T>): ReactElement;
115
+ export declare function Agenda<T>({ events, locale, renderEvent, keyExtractor, onPressEvent, onLongPressEvent, onPressDay, activeDate, itemSeparatorComponent, refreshControl, classNames, styles: styleOverrides }: AgendaProps<T>): ReactElement;
114
116
  //#endregion
115
117
  //#region src/components/TimeGrid.d.ts
116
118
  /** Default height in pixels of one hour row on the time grid. */
117
- declare const DEFAULT_HOUR_HEIGHT = 48;
119
+ export declare const DEFAULT_HOUR_HEIGHT = 48;
118
120
  /** Replace the hour-axis label. Receives the hour (0–23) and the `ampm` flag. */
119
121
  type HourRenderer = (hour: number, ampm: boolean) => React.ReactNode;
120
122
  /**
@@ -153,6 +155,8 @@ type TimeGridProps<T> = SlotStyleProps<TimeGridSlot> & {
153
155
  weekStartsOn: WeekStartsOn;
154
156
  /** Column-header weekday label width: `narrow` ("M"), `short` ("Mon", default), or `long` ("Monday"). */
155
157
  weekdayFormat?: WeekdayFormat$1;
158
+ /** Translations for the screen-reader words and gutter text; omitted keys use English. */
159
+ labels?: Partial<CalendarLabels$1>;
156
160
  renderEvent: RenderEvent<T>;
157
161
  /**
158
162
  * Override the screen-reader label for each event. Receives the event and a
@@ -264,7 +268,7 @@ type TimeGridProps<T> = SlotStyleProps<TimeGridSlot> & {
264
268
  /** Optional header above the grid (e.g. weekday labels). Rendered full-width. */
265
269
  renderHeader?: (days: Date[]) => React.ReactNode;
266
270
  };
267
- declare function TimeGridInner<T>({ mode, numberOfDays, weekEndsOn, date, events, cellHeight, hourHeight, weekStartsOn, weekdayFormat, renderEvent, eventAccessibilityLabel, keyExtractor, scrollOffsetMinutes, hourColumnWidth: hourColumnWidthProp, hideHours, timeslots, showAllDayEventCell, showAllDayLabel, refreshControl, highlightWeekends, calendarCellStyle, businessHours, renderBusinessHours, renderBackgroundEvent, showWeekNumber, headerComponent, minHour, maxHour, ampm, isRTL, minHourHeight, maxHourHeight, minEventHeight, eventGap, showNowIndicator, locale, freeSwipe, swipeEnabled, showVerticalScrollIndicator, verticalScrollEnabled, weekNumberPrefix, hiddenDays, now, timeZone, hourComponent, activeDate, resetPageOnPressCell, dragStepMinutes, showDragHandle, eventStartEditable, eventDurationEditable, eventOverlap, onPressEvent, onLongPressEvent, onDragEvent: onDragEventProp, onDragStart, onPressCell, onLongPressCell, onCreateEvent, onPressDateHeader, onChangeDate, renderHeader, classNames, styles: styleOverrides }: TimeGridProps<T>): ReactElement;
271
+ declare function TimeGridInner<T>({ mode, numberOfDays, weekEndsOn, date, events, cellHeight, hourHeight, weekStartsOn, weekdayFormat, labels: labelsProp, renderEvent, eventAccessibilityLabel, keyExtractor, scrollOffsetMinutes, hourColumnWidth: hourColumnWidthProp, hideHours, timeslots, showAllDayEventCell, showAllDayLabel, refreshControl, highlightWeekends, calendarCellStyle, businessHours, renderBusinessHours, renderBackgroundEvent, showWeekNumber, headerComponent, minHour, maxHour, ampm, isRTL, minHourHeight, maxHourHeight, minEventHeight, eventGap, showNowIndicator, locale, freeSwipe, swipeEnabled, showVerticalScrollIndicator, verticalScrollEnabled, weekNumberPrefix, hiddenDays, now, timeZone, hourComponent, activeDate, resetPageOnPressCell, dragStepMinutes, showDragHandle, eventStartEditable, eventDurationEditable, eventOverlap, onPressEvent, onLongPressEvent, onDragEvent: onDragEventProp, onDragStart, onPressCell, onLongPressCell, onCreateEvent, onPressDateHeader, onChangeDate, renderHeader, classNames, styles: styleOverrides }: TimeGridProps<T>): ReactElement;
268
272
  /**
269
273
  * The timetable view used in day, 3days, week, and custom modes: an
270
274
  * hour-by-hour grid with positioned event boxes, an all-day lane, pinch-to-zoom
@@ -284,7 +288,7 @@ declare function TimeGridInner<T>({ mode, numberOfDays, weekEndsOn, date, events
284
288
  * />
285
289
  * ```
286
290
  */
287
- declare const TimeGrid: typeof TimeGridInner;
291
+ export declare const TimeGrid: typeof TimeGridInner;
288
292
  //#endregion
289
293
  //#region src/components/Calendar.d.ts
290
294
  /**
@@ -395,6 +399,8 @@ type CalendarProps<T> = SlotStyleProps<CalendarSlot> & {
395
399
  sortedMonthView?: boolean;
396
400
  /** Month overflow label template; `{moreCount}` is replaced. Default "{moreCount} More". */
397
401
  moreLabel?: string;
402
+ /** Translations for the screen-reader words and gutter text; omitted keys use English. */
403
+ labels?: Partial<CalendarLabels$1>;
398
404
  /** Show dimmed adjacent-month days in the month grid. Default true. */
399
405
  showAdjacentMonths?: boolean;
400
406
  /** Ignore taps on month-cell events (day taps still fire). Default false. */
@@ -609,7 +615,7 @@ type CalendarProps<T> = SlotStyleProps<CalendarSlot> & {
609
615
  * }
610
616
  * ```
611
617
  */
612
- declare function Calendar<T>({ events, mode, date, onChangeDate, onChangeDateRange, onPressEvent, onLongPressEvent, onDragEvent, onDragStart, dragStepMinutes, showDragHandle, onPressDay, onPressMonth, onLongPressDay, onPressMore, onPressCell, resetPageOnPressCell, onLongPressCell, onCreateEvent, onSelectDrag, selectedDates, selectedRange, fillCellOnSelection, minDate, maxDate, isDateDisabled, onPressDateHeader, maxVisibleEventCount, sortedMonthView, moreLabel, showAdjacentMonths, disableMonthEventCellPress, weekStartsOn, hiddenDays, now, weekdayFormat, numberOfDays, weekEndsOn, renderEvent, eventAccessibilityLabel, eventCellStyle, calendarCellStyle, businessHours, renderBusinessHours, renderBackgroundEvent, keyExtractor, theme, cellHeight: cellHeightProp, hourHeight, minHourHeight, maxHourHeight, minEventHeight, eventGap, hourColumnWidth, hideHours, timeslots, showAllDayEventCell, showAllDayLabel, refreshControl, highlightWeekends, eventStartEditable, eventDurationEditable, eventOverlap, showWeekNumber, weekNumberPrefix, hourComponent, showSixWeeks, showTitle, swipeEnabled, showVerticalScrollIndicator, verticalScrollEnabled, headerComponent, minHour, maxHour, ampm, showTime, ellipsizeTitle, allDayLabel, scrollOffsetMinutes, showNowIndicator, locale, timeZone, activeDate, isRTL, freeSwipe, renderTimeGridHeader, renderHeaderForMonthView, renderCustomDateForMonth, itemSeparatorComponent, classNames, styles: styleOverrides }: CalendarProps<T>): ReactElement;
618
+ export declare function Calendar<T>({ events, mode, date, onChangeDate, onChangeDateRange, onPressEvent, onLongPressEvent, onDragEvent, onDragStart, dragStepMinutes, showDragHandle, onPressDay, onPressMonth, onLongPressDay, onPressMore, onPressCell, resetPageOnPressCell, onLongPressCell, onCreateEvent, onSelectDrag, selectedDates, selectedRange, fillCellOnSelection, minDate, maxDate, isDateDisabled, onPressDateHeader, maxVisibleEventCount, sortedMonthView, moreLabel, labels, showAdjacentMonths, disableMonthEventCellPress, weekStartsOn, hiddenDays, now, weekdayFormat, numberOfDays, weekEndsOn, renderEvent, eventAccessibilityLabel, eventCellStyle, calendarCellStyle, businessHours, renderBusinessHours, renderBackgroundEvent, keyExtractor, theme, cellHeight: cellHeightProp, hourHeight, minHourHeight, maxHourHeight, minEventHeight, eventGap, hourColumnWidth, hideHours, timeslots, showAllDayEventCell, showAllDayLabel, refreshControl, highlightWeekends, eventStartEditable, eventDurationEditable, eventOverlap, showWeekNumber, weekNumberPrefix, hourComponent, showSixWeeks, showTitle, swipeEnabled, showVerticalScrollIndicator, verticalScrollEnabled, headerComponent, minHour, maxHour, ampm, showTime, ellipsizeTitle, allDayLabel, scrollOffsetMinutes, showNowIndicator, locale, timeZone, activeDate, isRTL, freeSwipe, renderTimeGridHeader, renderHeaderForMonthView, renderCustomDateForMonth, itemSeparatorComponent, classNames, styles: styleOverrides }: CalendarProps<T>): ReactElement;
613
619
  //#endregion
614
620
  //#region src/components/DefaultEvent.d.ts
615
621
  /**
@@ -620,7 +626,7 @@ declare function Calendar<T>({ events, mode, date, onChangeDate, onChangeDateRan
620
626
  * only shows once a full line is free beneath the title. Pass your own
621
627
  * `renderEvent` to `<Calendar>` to replace it entirely.
622
628
  */
623
- declare function DefaultEvent<T>({ event, mode, boxHeight, isAllDay, ampm, showTime, ellipsizeTitle, allDayLabel, accessibilityLabel: accessibilityLabelProp, accessibilityActions, onAccessibilityAction, cellStyle, onPress, onLongPress }: RenderEventArgs<T>): ReactElement;
629
+ export declare function DefaultEvent<T>({ event, mode, boxHeight, isAllDay, ampm, showTime, ellipsizeTitle, allDayLabel, accessibilityLabel: accessibilityLabelProp, accessibilityActions, onAccessibilityAction, cellStyle, onPress, onLongPress }: RenderEventArgs<T>): ReactElement;
624
630
  //#endregion
625
631
  //#region src/components/ResourceTimeline.d.ts
626
632
  /** A schedulable lane (room, person, machine) events are grouped under. */
@@ -747,6 +753,8 @@ interface ResourceTimelineProps<T = unknown> {
747
753
  now?: Date;
748
754
  /** Shift the now indicator into this IANA zone (pair with `eventsInTimeZone`). */
749
755
  timeZone?: string;
756
+ /** Translations for the screen-reader drag actions; omitted keys use English. */
757
+ labels?: Partial<CalendarLabels$1>;
750
758
  }
751
759
  /**
752
760
  * A horizontal resource timeline: rows are resources (rooms, people, machines)
@@ -766,6 +774,6 @@ interface ResourceTimelineProps<T = unknown> {
766
774
  * />
767
775
  * ```
768
776
  */
769
- declare function ResourceTimeline<T = unknown>({ date, orientation, resources: allResources, resourcesPerPage, resourcePage, events, resourceId, startHour, endHour, hourWidth, hourHeight, rowHeight, labelWidth, ampm, renderEvent, onPressEvent, onLongPressEvent, onDragEvent, onPressCell, onLongPressCell, onCreateEvent, businessHours, renderBusinessHours, renderResourceHeader, dragStepMinutes, showNowIndicator, now: nowProp, timeZone }: ResourceTimelineProps<T>): ReactElement;
777
+ export declare function ResourceTimeline<T = unknown>({ date, orientation, resources: allResources, resourcesPerPage, resourcePage, events, resourceId, startHour, endHour, hourWidth, hourHeight, rowHeight, labelWidth, ampm, renderEvent, onPressEvent, onLongPressEvent, onDragEvent, onPressCell, onLongPressCell, onCreateEvent, businessHours, renderBusinessHours, renderResourceHeader, dragStepMinutes, showNowIndicator, now: nowProp, timeZone, labels: labelsProp }: ResourceTimelineProps<T>): ReactElement;
770
778
  //#endregion
771
- export { Agenda, type AgendaProps, type AgendaSlot, type BusinessHours, type BusinessHoursBand, Calendar, type CalendarEvent, type CalendarMode, type CalendarProps, type CalendarSlot, type CalendarTheme, CalendarThemeProvider, DEFAULT_HOUR_HEIGHT, type DateRange, type DateSelectionConstraints, type DaySelectionState, DefaultEvent, DefaultMonthEvent, type EventAccessibilityLabelContext, type EventAccessibilityLabeler, type EventDragHandler, type EventDragStartHandler, type EventKeyExtractor, type HourRenderer, type ICalEvent, type ICalendarEvent, type MonthEventSegment, type MonthGrid, type MonthGridDay, type MonthGridWeek, type MonthGridWeekday, MonthList, type MonthListProps, type MonthListSlot, MonthPager, type MonthPagerProps, MonthView, type MonthViewProps, type MonthViewSlot, type MonthWeekEvents, type PartialCalendarTheme, type PositionedEvent, type RecurrenceFrequency, type RecurrenceRule, type RenderEvent, type RenderEventArgs, type ResolvedSlot, type Resource, type ResourceEventArgs, ResourceTimeline, type ResourceTimelineProps, type SlotDefault, type SlotStyleProps, TimeGrid, type TimeGridMode, type TimeGridProps, type TimeGridSlot, type ToICalendarOptions, type UseDateRangeOptions, type UseMonthGridOptions, type WeekStartsOn, type WeekdayFormat, YearView, type YearViewProps, type YearViewSlot, backgroundBandsForDay, buildMonthGrid, buildMonthWeeks, darkTheme, daySelectionState, defaultTheme, eventsInTimeZone, expandRecurringEvents, getIsToday, getViewDays, getWeekDays, isAllDayEvent, isBackgroundEvent, isDateSelectable, isRangeEndpoint, isSameCalendarDay, isWeekend, isWithinDateRange, layoutDayEvents, layoutMonthWeek, mergeTheme, minutesIntoDay, nextDateRange, parseICalendar, toICalendar, toZonedTime, useCalendarTheme, useDateRange, useEventSource, useMonthGrid, useNow, weekdayFormatToken };
779
+ export { type AgendaProps, type AgendaSlot, type BusinessHours, type BusinessHoursBand, type CalendarEvent, type CalendarLabels, type CalendarMode, type CalendarProps, type CalendarSlot, type CalendarTheme, CalendarThemeProvider, type DateRange, type DateSelectionConstraints, type DaySelectionState, DefaultMonthEvent, type EventAccessibilityLabelContext, type EventAccessibilityLabeler, type EventDragHandler, type EventDragStartHandler, type EventKeyExtractor, type HourRenderer, type ICalEvent, type ICalendarEvent, type MonthEventSegment, type MonthGrid, type MonthGridDay, type MonthGridWeek, type MonthGridWeekday, MonthList, type MonthListProps, type MonthListSlot, MonthPager, type MonthPagerProps, MonthView, type MonthViewProps, type MonthViewSlot, type MonthWeekEvents, type PartialCalendarTheme, type PositionedEvent, type RecurrenceFrequency, type RecurrenceRule, type RenderEvent, type RenderEventArgs, type ResolvedSlot, type Resource, type ResourceEventArgs, type ResourceTimelineProps, type SlotDefault, type SlotStyleProps, type TimeGridMode, type TimeGridProps, type TimeGridSlot, type ToICalendarOptions, type UseDateRangeOptions, type UseMonthGridOptions, type WeekStartsOn, type WeekdayFormat, type YearViewProps, type YearViewSlot, backgroundBandsForDay, buildMonthGrid, buildMonthWeeks, darkTheme, daySelectionState, defaultCalendarLabels, defaultTheme, eventsInTimeZone, expandRecurringEvents, getIsToday, getViewDays, getWeekDays, isAllDayEvent, isBackgroundEvent, isDateSelectable, isRangeEndpoint, isSameCalendarDay, isWeekend, isWithinDateRange, layoutDayEvents, layoutMonthWeek, mergeTheme, minutesIntoDay, nextDateRange, parseICalendar, toICalendar, toZonedTime, useCalendarTheme, useDateRange, useEventSource, useMonthGrid, useNow, weekdayFormatToken };