@ilamy/calendar 1.8.0 → 1.8.1
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 +16 -8
- package/dist/index.js +5 -5
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -316,14 +316,14 @@ interface DateRange {
|
|
|
316
316
|
start: Dayjs;
|
|
317
317
|
end: Dayjs;
|
|
318
318
|
}
|
|
319
|
-
interface
|
|
320
|
-
/** Start date/time of the
|
|
319
|
+
interface CellInfo {
|
|
320
|
+
/** Start date/time of the cell */
|
|
321
321
|
start: Dayjs;
|
|
322
|
-
/** End date/time of the
|
|
322
|
+
/** End date/time of the cell */
|
|
323
323
|
end: Dayjs;
|
|
324
|
-
/**
|
|
325
|
-
|
|
326
|
-
/** Whether
|
|
324
|
+
/** Full resource object in resource calendars; undefined in a regular calendar */
|
|
325
|
+
resource?: Resource;
|
|
326
|
+
/** Whether this is an all-day cell (optional) */
|
|
327
327
|
allDay?: boolean;
|
|
328
328
|
}
|
|
329
329
|
/**
|
|
@@ -394,7 +394,15 @@ interface IlamyCalendarProps {
|
|
|
394
394
|
* Callback when a calendar cell is clicked.
|
|
395
395
|
* Provides cell information including start/end dates and optional resourceId.
|
|
396
396
|
*/
|
|
397
|
-
onCellClick?: (info:
|
|
397
|
+
onCellClick?: (info: CellInfo) => void;
|
|
398
|
+
/**
|
|
399
|
+
* Predicate to disable individual cells based on custom logic (holidays,
|
|
400
|
+
* days-off, past dates, on-call windows, etc.). Return `true` to disable a
|
|
401
|
+
* cell — disabled cells block event creation clicks, reject drag-drops, and
|
|
402
|
+
* are grayed out. Composes with `businessHours` (a cell is disabled if either
|
|
403
|
+
* business hours or this predicate disables it).
|
|
404
|
+
*/
|
|
405
|
+
isCellDisabled?: (info: CellInfo) => boolean;
|
|
398
406
|
/**
|
|
399
407
|
* Callback when the calendar view changes (month, week, day, year).
|
|
400
408
|
* Useful for syncing with external state or analytics.
|
|
@@ -673,4 +681,4 @@ interface UseIlamyCalendarContextReturn {
|
|
|
673
681
|
*/
|
|
674
682
|
declare function useIlamyCalendarContext(): UseIlamyCalendarContextReturn;
|
|
675
683
|
declare const defaultTranslations: Translations;
|
|
676
|
-
export { useIlamyCalendarContext, isRecurringEvent, generateRecurringEvents, defaultTranslations, Weekday, WeekDays, UseIlamyCalendarContextReturn, TranslatorFunction, Translations, TranslationKey, TimeFormat, SlotDuration, Resource, RenderCurrentTimeIndicatorProps, RRuleOptions, RRule, IlamyResourceCalendarProps, IlamyResourceCalendar, IlamyCalendarProps, IlamyCalendar, EventFormProps,
|
|
684
|
+
export { useIlamyCalendarContext, isRecurringEvent, generateRecurringEvents, defaultTranslations, Weekday, WeekDays, UseIlamyCalendarContextReturn, TranslatorFunction, Translations, TranslationKey, TimeFormat, SlotDuration, Resource, RenderCurrentTimeIndicatorProps, RRuleOptions, RRule, IlamyResourceCalendarProps, IlamyResourceCalendar, IlamyCalendarProps, IlamyCalendar, EventFormProps, CellInfo, CalendarView, CalendarEvent, BusinessHours };
|