@ilamy/calendar 1.7.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 +22 -34
- package/dist/index.js +6 -6
- package/package.json +6 -3
package/dist/index.d.ts
CHANGED
|
@@ -266,32 +266,6 @@ interface Translations {
|
|
|
266
266
|
date: string;
|
|
267
267
|
noResourcesVisible: string;
|
|
268
268
|
addResourcesOrShowExisting: string;
|
|
269
|
-
sunday: string;
|
|
270
|
-
monday: string;
|
|
271
|
-
tuesday: string;
|
|
272
|
-
wednesday: string;
|
|
273
|
-
thursday: string;
|
|
274
|
-
friday: string;
|
|
275
|
-
saturday: string;
|
|
276
|
-
sun: string;
|
|
277
|
-
mon: string;
|
|
278
|
-
tue: string;
|
|
279
|
-
wed: string;
|
|
280
|
-
thu: string;
|
|
281
|
-
fri: string;
|
|
282
|
-
sat: string;
|
|
283
|
-
january: string;
|
|
284
|
-
february: string;
|
|
285
|
-
march: string;
|
|
286
|
-
april: string;
|
|
287
|
-
may: string;
|
|
288
|
-
june: string;
|
|
289
|
-
july: string;
|
|
290
|
-
august: string;
|
|
291
|
-
september: string;
|
|
292
|
-
october: string;
|
|
293
|
-
november: string;
|
|
294
|
-
december: string;
|
|
295
269
|
}
|
|
296
270
|
type TranslationKey = keyof Translations;
|
|
297
271
|
type TranslatorFunction = (key: TranslationKey | string) => string;
|
|
@@ -342,14 +316,14 @@ interface DateRange {
|
|
|
342
316
|
start: Dayjs;
|
|
343
317
|
end: Dayjs;
|
|
344
318
|
}
|
|
345
|
-
interface
|
|
346
|
-
/** Start date/time of the
|
|
319
|
+
interface CellInfo {
|
|
320
|
+
/** Start date/time of the cell */
|
|
347
321
|
start: Dayjs;
|
|
348
|
-
/** End date/time of the
|
|
322
|
+
/** End date/time of the cell */
|
|
349
323
|
end: Dayjs;
|
|
350
|
-
/**
|
|
351
|
-
|
|
352
|
-
/** 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) */
|
|
353
327
|
allDay?: boolean;
|
|
354
328
|
}
|
|
355
329
|
/**
|
|
@@ -420,7 +394,15 @@ interface IlamyCalendarProps {
|
|
|
420
394
|
* Callback when a calendar cell is clicked.
|
|
421
395
|
* Provides cell information including start/end dates and optional resourceId.
|
|
422
396
|
*/
|
|
423
|
-
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;
|
|
424
406
|
/**
|
|
425
407
|
* Callback when the calendar view changes (month, week, day, year).
|
|
426
408
|
* Useful for syncing with external state or analytics.
|
|
@@ -547,6 +529,12 @@ interface IlamyCalendarProps {
|
|
|
547
529
|
*/
|
|
548
530
|
hideNonBusinessHours?: boolean;
|
|
549
531
|
/**
|
|
532
|
+
* Whether to hide the iCalendar button in the calendar header.
|
|
533
|
+
* Applies to both desktop and mobile header layouts.
|
|
534
|
+
* @default false
|
|
535
|
+
*/
|
|
536
|
+
hideExportButton?: boolean;
|
|
537
|
+
/**
|
|
550
538
|
* Custom class names for overriding default calendar element styles.
|
|
551
539
|
* Allows fine-grained control over the appearance of different calendar elements.
|
|
552
540
|
* @example { disabledCell: "bg-gray-100 text-gray-400" }
|
|
@@ -693,4 +681,4 @@ interface UseIlamyCalendarContextReturn {
|
|
|
693
681
|
*/
|
|
694
682
|
declare function useIlamyCalendarContext(): UseIlamyCalendarContextReturn;
|
|
695
683
|
declare const defaultTranslations: Translations;
|
|
696
|
-
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 };
|