@super-calendar/solid 2.16.0 → 2.17.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/README.md +46 -2
- package/dist/client/index.d.ts +40 -3
- package/dist/client/index.js +538 -101
- package/dist/server/index.d.ts +40 -3
- package/dist/server/index.js +854 -338
- package/package.json +2 -2
- package/src/Calendar.tsx +73 -2
- package/src/MonthView.tsx +435 -86
- package/src/MultiWeekView.tsx +49 -0
- package/src/index.ts +7 -0
- package/src/touch.ts +70 -0
package/dist/server/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BusinessHours, BusinessHours as BusinessHours$1, BusinessHoursBand, BusinessHoursBand as BusinessHoursBand$1, BusinessHoursValue, CalendarColors, CalendarEvent, CalendarEvent as CalendarEvent$1, CalendarHandle, CalendarHandle as CalendarHandle$1, CalendarLabels, CalendarLabels as CalendarLabels$1, CalendarMode, CalendarMode as CalendarMode$1, CreateGhostArgs, CreateGhostArgs as CreateGhostArgs$1, DateRange, DateRange as DateRange$1, DateSelectionConstraints, DateSelectionConstraints as DateSelectionConstraints$1, DaySelectionState, EventAccessibilityLabelContext, EventAccessibilityLabeler, EventAccessibilityLabeler as EventAccessibilityLabeler$1, EventSource, EventSource as EventSource$1, EventSourceOptions, EventSourceOptions as EventSourceOptions$1, ICalEvent, ICalendarEvent, MonthEventSegment, MonthGrid, MonthGridDay, MonthGridWeek, MonthGridWeekday, MonthWeekEvents, PositionedEvent, RecurrenceFrequency, RecurrenceRule, ScrollToTimeOptions, TimeGridMode, TimeGridMode as TimeGridMode$1, ToICalendarOptions, UseDateRangeOptions, UseMonthGridOptions, UseMonthGridOptions as UseMonthGridOptions$1, WeekStartsOn, WeekStartsOn as WeekStartsOn$1, WeekdayFormat, WeekdayFormat as WeekdayFormat$1, backgroundBandsForDay, buildMonthGrid, daySelectionState, defaultCalendarLabels, expandRecurringEvents, getViewDays, isAllDayEvent, isBackgroundEvent, isDateSelectable, isRangeEndpoint, isWithinDateRange, layoutDayEvents, layoutMonthWeek, loadEventSource, nextDateRange, parseICalendar, toICalendar, weekdayFormatToken } from "@super-calendar/core/vanilla";
|
|
1
|
+
import { BusinessHours, BusinessHours as BusinessHours$1, BusinessHoursBand, BusinessHoursBand as BusinessHoursBand$1, BusinessHoursValue, CalendarColors, CalendarEvent, CalendarEvent as CalendarEvent$1, CalendarHandle, CalendarHandle as CalendarHandle$1, CalendarLabels, CalendarLabels as CalendarLabels$1, CalendarMode, CalendarMode as CalendarMode$1, CreateGhostArgs, CreateGhostArgs as CreateGhostArgs$1, DateRange, DateRange as DateRange$1, DateSelectionConstraints, DateSelectionConstraints as DateSelectionConstraints$1, DaySelectionState, EventAccessibilityLabelContext, EventAccessibilityLabeler, EventAccessibilityLabeler as EventAccessibilityLabeler$1, EventSource, EventSource as EventSource$1, EventSourceOptions, EventSourceOptions as EventSourceOptions$1, ICalEvent, ICalendarEvent, MonthEventSegment, MonthGrid, MonthGridDay, MonthGridWeek, MonthGridWeekday, MonthWeekEvents, MultiWeekGrid, MultiWeekGridDay, MultiWeekGridInterval, MultiWeekGridOptions, MultiWeekGridWeek, PositionedEvent, RecurrenceFrequency, RecurrenceRule, ScrollToTimeOptions, TimeGridMode, TimeGridMode as TimeGridMode$1, ToICalendarOptions, UseDateRangeOptions, UseMonthGridOptions, UseMonthGridOptions as UseMonthGridOptions$1, WeekStartsOn, WeekStartsOn as WeekStartsOn$1, WeekdayFormat, WeekdayFormat as WeekdayFormat$1, backgroundBandsForDay, buildMonthGrid, buildMultiWeekGrid, daySelectionState, defaultCalendarLabels, expandRecurringEvents, getViewDays, isAllDayEvent, isBackgroundEvent, isDateSelectable, isRangeEndpoint, isWithinDateRange, layoutDayEvents, layoutMonthWeek, loadEventSource, nextDateRange, parseICalendar, toICalendar, weekdayFormatToken } from "@super-calendar/core/vanilla";
|
|
2
2
|
import { Accessor, Component } from "solid-js";
|
|
3
3
|
import { JSX } from "@solidjs/web";
|
|
4
4
|
import { Locale } from "date-fns";
|
|
@@ -143,6 +143,8 @@ interface SolidMonthEventArgs<T = unknown> {
|
|
|
143
143
|
event: CalendarEvent$1<T>;
|
|
144
144
|
/** Call to fire the view's `onPressEvent` for this chip. */
|
|
145
145
|
onPress: () => void;
|
|
146
|
+
/** The current row view. Supplied by the calendar; optional for existing standalone chip callers. */
|
|
147
|
+
mode?: "month" | "multiweek";
|
|
146
148
|
}
|
|
147
149
|
/** A component that renders a single month-grid event chip. */
|
|
148
150
|
type SolidMonthEvent<T = unknown> = Component<SolidMonthEventArgs<T>>;
|
|
@@ -270,7 +272,7 @@ interface MonthViewInternalProps<T = unknown> extends MonthViewProps<T> {
|
|
|
270
272
|
* <MonthView date={new Date()} events={events} onPressDay={(d) => setDate(d)} />
|
|
271
273
|
* ```
|
|
272
274
|
*/
|
|
273
|
-
export declare function MonthView<T = unknown>(
|
|
275
|
+
export declare function MonthView<T = unknown>(props: MonthViewInternalProps<T>): JSX.Element;
|
|
274
276
|
/** Styleable parts of the built-in move and resize actions. */
|
|
275
277
|
type EventActionsSlot = "eventActionsTrigger" | "eventActionsList" | "eventActions" | "eventAction";
|
|
276
278
|
/**
|
|
@@ -580,6 +582,8 @@ interface CalendarProps<T = unknown> extends DateSelectionConstraints$1, SlotSty
|
|
|
580
582
|
now?: Date;
|
|
581
583
|
/** Column count for `mode="custom"`. */
|
|
582
584
|
numberOfDays?: number;
|
|
585
|
+
/** Consecutive full week rows for `mode="multiweek"` (default 2). */
|
|
586
|
+
numberOfWeeks?: number;
|
|
583
587
|
/** date-fns locale for titles, headers, and time labels. */
|
|
584
588
|
locale?: Locale;
|
|
585
589
|
/**
|
|
@@ -902,6 +906,39 @@ interface DateRangePickerProps extends PickerBaseProps {
|
|
|
902
906
|
* ```
|
|
903
907
|
*/
|
|
904
908
|
export declare function DateRangePicker(incoming: DateRangePickerProps): JSX.Element;
|
|
909
|
+
/** Props for {@link MultiWeekView}. */
|
|
910
|
+
interface MultiWeekViewProps<T = unknown> extends Omit<MonthViewProps<T>, "date" | "weekStartsOn" | "showAdjacentMonths"> {
|
|
911
|
+
/**
|
|
912
|
+
* Any day in the first week to show. The rows start on the `weekStartsOn` day
|
|
913
|
+
* on or before it, in the device's local calendar.
|
|
914
|
+
*/
|
|
915
|
+
date: Date;
|
|
916
|
+
/**
|
|
917
|
+
* How many consecutive full weeks to show, as stacked rows. A positive whole
|
|
918
|
+
* number; default 2. Other values throw a `RangeError`.
|
|
919
|
+
*/
|
|
920
|
+
numberOfWeeks?: number;
|
|
921
|
+
/** First day of the week. Sunday = 0 (default) … Saturday = 6. */
|
|
922
|
+
weekStartsOn?: WeekStartsOn$1;
|
|
923
|
+
/** Event chip and overflow-button height in pixels (default 24). */
|
|
924
|
+
chipHeight?: number;
|
|
925
|
+
}
|
|
926
|
+
/**
|
|
927
|
+
* Consecutive full weeks as stacked seven-day rows, with event chips and no hour
|
|
928
|
+
* slots. It has the month grid's event bars, overflow, selection, and drag
|
|
929
|
+
* interactions, and the month slots, `renderEvent`, and theme style it. Every
|
|
930
|
+
* row is kept at full height; when the view is given less room, the rows scroll
|
|
931
|
+
* under the title and weekday header.
|
|
932
|
+
*
|
|
933
|
+
* Standalone, it shows `events` as given; expand recurring events first with
|
|
934
|
+
* `expandRecurringEvents`, or use `Calendar` with `mode="multiweek"`.
|
|
935
|
+
*
|
|
936
|
+
* @example
|
|
937
|
+
* ```tsx
|
|
938
|
+
* <MultiWeekView date={new Date()} numberOfWeeks={3} events={events} />
|
|
939
|
+
* ```
|
|
940
|
+
*/
|
|
941
|
+
export declare function MultiWeekView<T = unknown>(props: MultiWeekViewProps<T>): JSX.Element;
|
|
905
942
|
/**
|
|
906
943
|
* Styleable parts of {@link ResourceTimeline}. Pass a class or inline style per
|
|
907
944
|
* slot via the `classNames` / `styles` props.
|
|
@@ -1079,4 +1116,4 @@ export declare function createDateRange(options?: Accessor<DateRangeOptions>): {
|
|
|
1079
1116
|
};
|
|
1080
1117
|
/** A reactive, renderer-independent month grid. */
|
|
1081
1118
|
export declare function createMonthGrid(month: Accessor<Date>, options?: Accessor<UseMonthGridOptions$1>): import("solid-js").SourceAccessor<import("@super-calendar/core/vanilla").MonthGrid>;
|
|
1082
|
-
export { type AgendaProps, type AgendaSlot, type BusinessHours, type BusinessHoursBand, type CSSProperties, type CalendarEvent, type CalendarHandle, type CalendarLabels, type CalendarMode, type CalendarProps, type CalendarSlot, type CreateGhostArgs, type DatePickerProps, type DatePickerSlot, type DateRange, type DateRangeOptions, type DateRangePickerProps, type DateSelectionConstraints, type DaySelectionState, type EventAccessibilityLabelContext, type EventAccessibilityLabeler, type EventSource, type EventSourceOptions, type EventSourceState, type ICalEvent, type ICalendarEvent, type MonthEventSegment, type MonthGrid, type MonthGridDay, type MonthGridWeek, type MonthGridWeekday, type MonthListProps, type MonthListSlot, type MonthViewProps, type MonthViewSlot, type MonthWeekEvents, type NowOptions, type PositionedEvent, type RecurrenceFrequency, type RecurrenceRule, type ResolvedSlot, type Resource, type ResourceEventArgs, type ResourceTimelineProps, type ResourceTimelineSlot, type ScrollToTimeOptions, type SlotDefault, type SlotStyleProps, type SolidAgendaEvent, type SolidAgendaEventArgs, type SolidCalendarTheme, type SolidMonthEvent, type SolidMonthEventArgs, type SolidRenderEvent, type SolidRenderEventArgs, type TimeGridMode, type TimeGridProps, type TimeGridSlot, type ToICalendarOptions, type UseDateRangeOptions, type UseMonthGridOptions, type WeekStartsOn, type WeekdayFormat, type YearViewProps, type YearViewSlot, backgroundBandsForDay, buildMonthGrid, daySelectionState, defaultCalendarLabels, expandRecurringEvents, getViewDays, isAllDayEvent, isBackgroundEvent, isDateSelectable, isRangeEndpoint, isWithinDateRange, layoutDayEvents, layoutMonthWeek, loadEventSource, nextDateRange, parseICalendar, toICalendar, weekdayFormatToken };
|
|
1119
|
+
export { type AgendaProps, type AgendaSlot, type BusinessHours, type BusinessHoursBand, type CSSProperties, type CalendarEvent, type CalendarHandle, type CalendarLabels, type CalendarMode, type CalendarProps, type CalendarSlot, type CreateGhostArgs, type DatePickerProps, type DatePickerSlot, type DateRange, type DateRangeOptions, type DateRangePickerProps, type DateSelectionConstraints, type DaySelectionState, type EventAccessibilityLabelContext, type EventAccessibilityLabeler, type EventSource, type EventSourceOptions, type EventSourceState, type ICalEvent, type ICalendarEvent, type MonthEventSegment, type MonthGrid, type MonthGridDay, type MonthGridWeek, type MonthGridWeekday, type MonthListProps, type MonthListSlot, type MonthViewProps, type MonthViewSlot, type MonthWeekEvents, type MultiWeekGrid, type MultiWeekGridDay, type MultiWeekGridInterval, type MultiWeekGridOptions, type MultiWeekGridWeek, type MultiWeekViewProps, type NowOptions, type PositionedEvent, type RecurrenceFrequency, type RecurrenceRule, type ResolvedSlot, type Resource, type ResourceEventArgs, type ResourceTimelineProps, type ResourceTimelineSlot, type ScrollToTimeOptions, type SlotDefault, type SlotStyleProps, type SolidAgendaEvent, type SolidAgendaEventArgs, type SolidCalendarTheme, type SolidMonthEvent, type SolidMonthEventArgs, type SolidRenderEvent, type SolidRenderEventArgs, type TimeGridMode, type TimeGridProps, type TimeGridSlot, type ToICalendarOptions, type UseDateRangeOptions, type UseMonthGridOptions, type WeekStartsOn, type WeekdayFormat, type YearViewProps, type YearViewSlot, backgroundBandsForDay, buildMonthGrid, buildMultiWeekGrid, daySelectionState, defaultCalendarLabels, expandRecurringEvents, getViewDays, isAllDayEvent, isBackgroundEvent, isDateSelectable, isRangeEndpoint, isWithinDateRange, layoutDayEvents, layoutMonthWeek, loadEventSource, nextDateRange, parseICalendar, toICalendar, weekdayFormatToken };
|