@ilamy/calendar 1.3.2 → 1.4.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
@@ -177,6 +177,11 @@ interface Resource {
177
177
  backgroundColor?: string;
178
178
  /** Optional position for resource display */
179
179
  position?: number;
180
+ /**
181
+ * Configuration for resource-specific business hours.
182
+ * If provided, these will be used instead of the global business hours for this resource.
183
+ */
184
+ businessHours?: BusinessHours | BusinessHours[];
180
185
  }
181
186
  interface Translations {
182
187
  today: string;
@@ -530,6 +535,15 @@ interface IlamyCalendarProps {
530
535
  * ```
531
536
  */
532
537
  renderCurrentTimeIndicator?: (props: RenderCurrentTimeIndicatorProps) => React3.ReactNode;
538
+ /**
539
+ * Days of the week to hide from the week view.
540
+ * Hidden days won't render as columns, giving remaining days more space.
541
+ * Only applies to vertical week views (regular and resource vertical).
542
+ * Does not affect month, day, year, or resource horizontal week views.
543
+ * @default []
544
+ * @example ['saturday', 'sunday'] // Hide weekends
545
+ */
546
+ hiddenDays?: WeekDays[];
533
547
  }
534
548
  declare const IlamyCalendar: React4.FC<IlamyCalendarProps>;
535
549
  declare const isRecurringEvent: (event: CalendarEvent) => boolean;
@@ -540,9 +554,10 @@ interface GenerateRecurringEventsProps {
540
554
  endDate: dayjs2.Dayjs;
541
555
  }
542
556
  declare const generateRecurringEvents: ({ event, currentEvents, startDate, endDate }: GenerateRecurringEventsProps) => CalendarEvent[];
557
+ import React5 from "react";
558
+ declare const IlamyResourceCalendar: React5.FC<IlamyResourceCalendarProps>;
543
559
  /**
544
- * Simplified calendar context type for external use
545
- * Contains only the most commonly used calendar operations
560
+ * Publicly exposed calendar context properties.
546
561
  */
547
562
  interface UseIlamyCalendarContextReturn {
548
563
  readonly currentDate: dayjs2.Dayjs;
@@ -552,6 +567,7 @@ interface UseIlamyCalendarContextReturn {
552
567
  readonly selectedEvent: CalendarEvent | null;
553
568
  readonly selectedDate: dayjs2.Dayjs | null;
554
569
  readonly firstDayOfWeek: number;
570
+ readonly resources: Resource[];
555
571
  readonly setCurrentDate: (date: dayjs2.Dayjs) => void;
556
572
  readonly selectDate: (date: dayjs2.Dayjs) => void;
557
573
  readonly setView: (view: CalendarView) => void;
@@ -563,19 +579,13 @@ interface UseIlamyCalendarContextReturn {
563
579
  readonly deleteEvent: (eventId: string | number) => void;
564
580
  readonly openEventForm: (eventData?: Partial<CalendarEvent>) => void;
565
581
  readonly closeEventForm: () => void;
582
+ readonly getEventsForResource: (resourceId: string | number) => CalendarEvent[];
566
583
  readonly businessHours?: BusinessHours | BusinessHours[];
567
584
  }
568
- declare const useIlamyCalendarContext: () => UseIlamyCalendarContextReturn;
569
- import React5 from "react";
570
- declare const IlamyResourceCalendar: React5.FC<IlamyResourceCalendarProps>;
571
585
  /**
572
- * Simplified resource calendar context type for external use
586
+ * Public hook exported for library users.
587
+ * Returns a limited set of commonly used properties and methods.
573
588
  */
574
- interface UseIlamyResourceCalendarContextReturn extends UseIlamyCalendarContextReturn {
575
- readonly events: CalendarEvent[];
576
- readonly resources: Resource[];
577
- readonly getEventsForResource: (resourceId: string | number) => CalendarEvent[];
578
- }
579
- declare const useIlamyResourceCalendarContext: () => UseIlamyResourceCalendarContextReturn;
589
+ declare function useIlamyCalendarContext(): UseIlamyCalendarContextReturn;
580
590
  declare const defaultTranslations: Translations;
581
- export { useIlamyResourceCalendarContext, useIlamyCalendarContext, isRecurringEvent, generateRecurringEvents, defaultTranslations, Weekday, WeekDays, UseIlamyResourceCalendarContextReturn, UseIlamyCalendarContextReturn, TranslatorFunction, Translations, TranslationKey, TimeFormat, Resource, RenderCurrentTimeIndicatorProps, RRuleOptions, RRule, IlamyResourceCalendarProps, IlamyResourceCalendar, IlamyCalendarProps, IlamyCalendar, Frequency, EventFormProps, CellClickInfo, CalendarView, CalendarEvent, BusinessHours };
591
+ export { useIlamyCalendarContext, isRecurringEvent, generateRecurringEvents, defaultTranslations, Weekday, WeekDays, UseIlamyCalendarContextReturn, TranslatorFunction, Translations, TranslationKey, TimeFormat, Resource, RenderCurrentTimeIndicatorProps, RRuleOptions, RRule, IlamyResourceCalendarProps, IlamyResourceCalendar, IlamyCalendarProps, IlamyCalendar, Frequency, EventFormProps, CellClickInfo, CalendarView, CalendarEvent, BusinessHours };