@innosolutions/inno-calendar 1.0.72 → 2.0.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/CHANGELOG.md +93 -0
- package/LICENSE +48 -48
- package/README.md +333 -305
- package/dist/components/event/event-card.d.ts +3 -27
- package/dist/components/event/event-card.d.ts.map +1 -1
- package/dist/components/header/calendar-header.d.ts +14 -3
- package/dist/components/header/calendar-header.d.ts.map +1 -1
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.d.ts +7 -6
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.mjs +48 -57
- package/dist/components/index.mjs.map +1 -1
- package/dist/components/inno-calendar.d.ts +139 -72
- package/dist/components/inno-calendar.d.ts.map +1 -1
- package/dist/components/primitives/field-layer.d.ts +12 -0
- package/dist/components/primitives/field-layer.d.ts.map +1 -0
- package/dist/components/primitives/index.d.ts +3 -0
- package/dist/components/primitives/index.d.ts.map +1 -1
- package/dist/components/primitives/quick-create.d.ts +44 -0
- package/dist/components/primitives/quick-create.d.ts.map +1 -0
- package/dist/components/primitives/recurrence-field.d.ts +102 -0
- package/dist/components/primitives/recurrence-field.d.ts.map +1 -0
- package/dist/components/primitives/when-row.d.ts +41 -0
- package/dist/components/primitives/when-row.d.ts.map +1 -0
- package/dist/components/shell/calendar-settings.d.ts +28 -0
- package/dist/components/shell/calendar-settings.d.ts.map +1 -0
- package/dist/components/shell/calendar-sidebar.d.ts +27 -0
- package/dist/components/shell/calendar-sidebar.d.ts.map +1 -0
- package/dist/components/shell/filter-panel.d.ts +10 -0
- package/dist/components/shell/filter-panel.d.ts.map +1 -0
- package/dist/components/shell/index.d.ts +5 -0
- package/dist/components/shell/index.d.ts.map +1 -0
- package/dist/components/shell/mini-month.d.ts +16 -0
- package/dist/components/shell/mini-month.d.ts.map +1 -0
- package/dist/components/ui/index.d.ts +0 -2
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/views/agenda-view.d.ts +14 -15
- package/dist/components/views/agenda-view.d.ts.map +1 -1
- package/dist/components/views/day-events-expansion.d.ts +1 -1
- package/dist/components/views/day-events-expansion.d.ts.map +1 -1
- package/dist/components/views/day-view.d.ts +2 -6
- package/dist/components/views/day-view.d.ts.map +1 -1
- package/dist/components/views/index.d.ts +2 -1
- package/dist/components/views/index.d.ts.map +1 -1
- package/dist/components/views/month-view.d.ts +2 -12
- package/dist/components/views/month-view.d.ts.map +1 -1
- package/dist/components/views/resource-columns-view.d.ts +23 -0
- package/dist/components/views/resource-columns-view.d.ts.map +1 -0
- package/dist/components/views/timeline-view.d.ts +2 -6
- package/dist/components/views/timeline-view.d.ts.map +1 -1
- package/dist/components/views/week-view.d.ts +10 -6
- package/dist/components/views/week-view.d.ts.map +1 -1
- package/dist/components/views/year-view.d.ts +2 -6
- package/dist/components/views/year-view.d.ts.map +1 -1
- package/dist/core/constants.d.ts +32 -1
- package/dist/core/constants.d.ts.map +1 -1
- package/dist/core/context/drag-drop-context.d.ts +15 -1
- package/dist/core/context/drag-drop-context.d.ts.map +1 -1
- package/dist/core/context/event-card-context.d.ts +16 -0
- package/dist/core/context/event-card-context.d.ts.map +1 -0
- package/dist/core/context/inno-calendar-provider.d.ts +10 -1
- package/dist/core/context/inno-calendar-provider.d.ts.map +1 -1
- package/dist/core/context/slot-selection-context.d.ts +16 -0
- package/dist/core/context/slot-selection-context.d.ts.map +1 -1
- package/dist/core/index.cjs +1 -1
- package/dist/core/index.d.ts +3 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.mjs +160 -155
- package/dist/core/index.mjs.map +1 -1
- package/dist/core/types.d.ts +44 -514
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/utils/date-input.d.ts +8 -0
- package/dist/core/utils/date-input.d.ts.map +1 -0
- package/dist/core/utils/grid-utils.d.ts.map +1 -1
- package/dist/core/utils/index.d.ts +1 -0
- package/dist/core/utils/index.d.ts.map +1 -1
- package/dist/core/utils/time-format.d.ts +24 -0
- package/dist/core/utils/time-format.d.ts.map +1 -0
- package/dist/core/utils/view-storage.d.ts +2 -2
- package/dist/core/utils/view-storage.d.ts.map +1 -1
- package/dist/core/z-layers.d.ts +21 -0
- package/dist/core/z-layers.d.ts.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +227 -234
- package/dist/index.mjs.map +1 -1
- package/dist/inno-calendar-B6qXIqxY.js +7433 -0
- package/dist/inno-calendar-B6qXIqxY.js.map +1 -0
- package/dist/inno-calendar-BnCt65PZ.cjs +11 -0
- package/dist/inno-calendar-BnCt65PZ.cjs.map +1 -0
- package/dist/lib/index.cjs +1 -1
- package/dist/lib/index.mjs +1 -1
- package/dist/position-utils-BzSoogFQ.cjs +2 -0
- package/dist/position-utils-BzSoogFQ.cjs.map +1 -0
- package/dist/position-utils-CBSmf90e.js +1106 -0
- package/dist/position-utils-CBSmf90e.js.map +1 -0
- package/dist/styles/index.css +1 -1
- package/dist/use-slot-selection-CxPvMluJ.cjs +2 -0
- package/dist/use-slot-selection-CxPvMluJ.cjs.map +1 -0
- package/dist/use-slot-selection-IXHnP8C1.js +357 -0
- package/dist/use-slot-selection-IXHnP8C1.js.map +1 -0
- package/dist/utils-B6yFEsav.js +9 -0
- package/dist/utils-B6yFEsav.js.map +1 -0
- package/dist/utils-IjLH3w2e.cjs +2 -0
- package/dist/utils-IjLH3w2e.cjs.map +1 -0
- package/dist/utils.cjs +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.mjs +99 -96
- package/dist/z-layers-Bavypndz.cjs +2 -0
- package/dist/z-layers-Bavypndz.cjs.map +1 -0
- package/dist/z-layers-r5PdtThu.js +637 -0
- package/dist/z-layers-r5PdtThu.js.map +1 -0
- package/package.json +117 -138
- package/AGENT.md +0 -1783
- package/dist/agenda-widget-B0t3TCcV.js +0 -4141
- package/dist/agenda-widget-B0t3TCcV.js.map +0 -1
- package/dist/agenda-widget-i2tjGr5U.cjs +0 -2
- package/dist/agenda-widget-i2tjGr5U.cjs.map +0 -1
- package/dist/components/calendar.d.ts +0 -45
- package/dist/components/calendar.d.ts.map +0 -1
- package/dist/components/event/event-page-transition.d.ts +0 -32
- package/dist/components/event/event-page-transition.d.ts.map +0 -1
- package/dist/components/filters/calendar-filter-sidebar.d.ts +0 -54
- package/dist/components/filters/calendar-filter-sidebar.d.ts.map +0 -1
- package/dist/components/filters/index.d.ts +0 -9
- package/dist/components/filters/index.d.ts.map +0 -1
- package/dist/components/filters/schedule-type-filter.d.ts +0 -31
- package/dist/components/filters/schedule-type-filter.d.ts.map +0 -1
- package/dist/components/filters/user-filter.d.ts +0 -31
- package/dist/components/filters/user-filter.d.ts.map +0 -1
- package/dist/components/header/components/index.d.ts +0 -8
- package/dist/components/header/components/index.d.ts.map +0 -1
- package/dist/components/integrated-calendar.d.ts +0 -37
- package/dist/components/integrated-calendar.d.ts.map +0 -1
- package/dist/components/settings/badge-variant-setting.d.ts +0 -25
- package/dist/components/settings/badge-variant-setting.d.ts.map +0 -1
- package/dist/components/settings/index.d.ts +0 -10
- package/dist/components/settings/index.d.ts.map +0 -1
- package/dist/components/settings/slot-duration-setting.d.ts +0 -20
- package/dist/components/settings/slot-duration-setting.d.ts.map +0 -1
- package/dist/components/settings/visible-hours-setting.d.ts +0 -23
- package/dist/components/settings/visible-hours-setting.d.ts.map +0 -1
- package/dist/components/settings/working-hours-setting.d.ts +0 -41
- package/dist/components/settings/working-hours-setting.d.ts.map +0 -1
- package/dist/components/ui/dialog.d.ts +0 -35
- package/dist/components/ui/dialog.d.ts.map +0 -1
- package/dist/components/ui/select.d.ts +0 -12
- package/dist/components/ui/select.d.ts.map +0 -1
- package/dist/components/widget/agenda-dropdown.d.ts +0 -20
- package/dist/components/widget/agenda-dropdown.d.ts.map +0 -1
- package/dist/components/widget/agenda-widget.d.ts +0 -27
- package/dist/components/widget/agenda-widget.d.ts.map +0 -1
- package/dist/components/widget/index.d.ts +0 -6
- package/dist/components/widget/index.d.ts.map +0 -1
- package/dist/index-D2U2F80P.cjs +0 -2
- package/dist/index-D2U2F80P.cjs.map +0 -1
- package/dist/index-DtaLkIY8.js +0 -2777
- package/dist/index-DtaLkIY8.js.map +0 -1
- package/dist/position-utils-D_KpwRus.js +0 -1053
- package/dist/position-utils-D_KpwRus.js.map +0 -1
- package/dist/position-utils-ksZ_IjXC.cjs +0 -2
- package/dist/position-utils-ksZ_IjXC.cjs.map +0 -1
- package/dist/presets/default/default-calendar.d.ts +0 -44
- package/dist/presets/default/default-calendar.d.ts.map +0 -1
- package/dist/presets/default/index.d.ts +0 -2
- package/dist/presets/default/index.d.ts.map +0 -1
- package/dist/presets/index.cjs +0 -2
- package/dist/presets/index.cjs.map +0 -1
- package/dist/presets/index.d.ts +0 -3
- package/dist/presets/index.d.ts.map +0 -1
- package/dist/presets/index.mjs +0 -6
- package/dist/presets/index.mjs.map +0 -1
- package/dist/presets/tailwind/index.d.ts +0 -2
- package/dist/presets/tailwind/index.d.ts.map +0 -1
- package/dist/presets/tailwind/tailwind-calendar.d.ts +0 -122
- package/dist/presets/tailwind/tailwind-calendar.d.ts.map +0 -1
- package/dist/slot-selection-context-CLYZU6ul.cjs +0 -2
- package/dist/slot-selection-context-CLYZU6ul.cjs.map +0 -1
- package/dist/slot-selection-context-Ct5cVcKW.js +0 -611
- package/dist/slot-selection-context-Ct5cVcKW.js.map +0 -1
- package/dist/tailwind-calendar-BbUb61uY.cjs +0 -2
- package/dist/tailwind-calendar-BbUb61uY.cjs.map +0 -1
- package/dist/tailwind-calendar-DrwGVSF-.js +0 -400
- package/dist/tailwind-calendar-DrwGVSF-.js.map +0 -1
- package/dist/use-calendar-BK0nQYJq.cjs +0 -2
- package/dist/use-calendar-BK0nQYJq.cjs.map +0 -1
- package/dist/use-calendar-DJI35SSd.js +0 -175
- package/dist/use-calendar-DJI35SSd.js.map +0 -1
- package/dist/use-slot-selection-CCE11R4j.cjs +0 -2
- package/dist/use-slot-selection-CCE11R4j.cjs.map +0 -1
- package/dist/use-slot-selection-CX1w8EdM.js +0 -188
- package/dist/use-slot-selection-CX1w8EdM.js.map +0 -1
- package/dist/week-view-BXmaRChB.cjs +0 -11
- package/dist/week-view-BXmaRChB.cjs.map +0 -1
- package/dist/week-view-BeasFcyR.js +0 -3520
- package/dist/week-view-BeasFcyR.js.map +0 -1
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
-
import { CalendarEvent, TBadgeVariant, TEventColor
|
|
3
|
-
/**
|
|
4
|
-
* Get color classes for an event - matches agenda-v2 styling
|
|
5
|
-
* Uses soft backgrounds with darker text for better readability
|
|
6
|
-
*/
|
|
2
|
+
import { CalendarEvent, TBadgeVariant, TEventColor } from '../../core/types';
|
|
7
3
|
export declare function getEventColorClasses(color?: TEventColor): {
|
|
8
4
|
bg: string;
|
|
9
5
|
text: string;
|
|
10
6
|
dot: string;
|
|
11
7
|
dotFill: string;
|
|
12
8
|
border: string;
|
|
13
|
-
accentBorder: string;
|
|
14
9
|
};
|
|
15
10
|
/**
|
|
16
11
|
* Props for the {@link EventCard} component.
|
|
@@ -104,27 +99,8 @@ export interface EventCardProps<TData = Record<string, unknown>> {
|
|
|
104
99
|
* @default 400
|
|
105
100
|
*/
|
|
106
101
|
pageTransitionDuration?: number;
|
|
107
|
-
/**
|
|
108
|
-
* How event details are displayed when the user clicks this card.
|
|
109
|
-
*
|
|
110
|
-
* - `'popover'` — (Default) Radix popover anchored to the card
|
|
111
|
-
* - `'dialog'` — Centered modal dialog overlay
|
|
112
|
-
* - `'sheet'` — Slide-in side panel from the right
|
|
113
|
-
* - `'custom'` — No built-in container; uses `renderEventDetail` callback
|
|
114
|
-
*
|
|
115
|
-
* @default 'popover'
|
|
116
|
-
*/
|
|
117
|
-
eventDetailMode?: TEventDetailMode;
|
|
118
|
-
/**
|
|
119
|
-
* Custom renderer for event details when `eventDetailMode` is `'custom'`.
|
|
120
|
-
* Also used as inner content for `'dialog'` and `'sheet'` modes if provided.
|
|
121
|
-
*/
|
|
122
|
-
renderEventDetail?: (props: {
|
|
123
|
-
event: CalendarEvent<TData>;
|
|
124
|
-
onClose: () => void;
|
|
125
|
-
}) => ReactNode;
|
|
126
102
|
}
|
|
127
|
-
export declare function EventCard<TData = Record<string, unknown>>({ event, variant, badgeVariant, onClick, className, showTime, showDescription, showParticipants, style, disablePopover, renderPopover, enableDrag, enablePageTransition, pageTransitionDuration: _pageTransitionDuration,
|
|
103
|
+
export declare function EventCard<TData = Record<string, unknown>>({ event, variant, badgeVariant, onClick, className, showTime, showDescription, showParticipants, style, disablePopover, renderPopover, enableDrag, enablePageTransition, pageTransitionDuration: _pageTransitionDuration, }: EventCardProps<TData>): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
128
104
|
export interface EventBlockProps<TData = Record<string, unknown>> {
|
|
129
105
|
/** The event to display */
|
|
130
106
|
event: CalendarEvent<TData>;
|
|
@@ -135,7 +111,7 @@ export interface EventBlockProps<TData = Record<string, unknown>> {
|
|
|
135
111
|
width: number;
|
|
136
112
|
minWidth?: number;
|
|
137
113
|
};
|
|
138
|
-
/** Pixels per hour
|
|
114
|
+
/** Pixels per hour */
|
|
139
115
|
hourHeight?: number;
|
|
140
116
|
/** Badge variant for coloring style */
|
|
141
117
|
badgeVariant?: TBadgeVariant;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-card.d.ts","sourceRoot":"","sources":["../../../src/components/event/event-card.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,SAAS,EAKf,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"event-card.d.ts","sourceR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,gBAAgB,CAAC,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAChE,KAAK,EACL,QAAQ,EACR,OAAO,EACP,KAAK,EACL,OAAO,EACP,SAAS,EACT,cAAsB,EACtB,aAAa,GACd,EAAE,qBAAqB,CAAC,KAAK,CAAC,2CAuE9B;AA0BD,eAAe,SAAS,CAAC"}
|
|
@@ -14,13 +14,13 @@ export interface CalendarHeaderProps<TData = Record<string, unknown>> {
|
|
|
14
14
|
/** Navigate next */
|
|
15
15
|
onNavigateNext?: () => void;
|
|
16
16
|
/** Navigate callback (legacy) */
|
|
17
|
-
onNavigate?: (direction:
|
|
17
|
+
onNavigate?: (direction: 'prev' | 'next' | 'today') => void;
|
|
18
18
|
/** View change callback */
|
|
19
19
|
onViewChange?: (view: TCalendarView) => void;
|
|
20
20
|
/** Add event callback */
|
|
21
21
|
onAddEvent?: () => void;
|
|
22
22
|
/** Available calendar views to show */
|
|
23
|
-
availableViews?: TCalendarView[];
|
|
23
|
+
availableViews?: readonly TCalendarView[];
|
|
24
24
|
/** Show timeline views dropdown */
|
|
25
25
|
showTimelineViews?: boolean;
|
|
26
26
|
/** Available timeline views */
|
|
@@ -31,12 +31,21 @@ export interface CalendarHeaderProps<TData = Record<string, unknown>> {
|
|
|
31
31
|
showSettings?: boolean;
|
|
32
32
|
/** Filter row content */
|
|
33
33
|
filterContent?: ReactNode;
|
|
34
|
+
/**
|
|
35
|
+
* Rendered before "Today". The calendar puts the sidebar's sheet trigger
|
|
36
|
+
* here at the widths where the rail itself is hidden.
|
|
37
|
+
*/
|
|
38
|
+
leadingAction?: ReactNode;
|
|
34
39
|
/** Additional actions to render */
|
|
35
40
|
actions?: ReactNode;
|
|
36
41
|
/** Additional CSS classes */
|
|
37
42
|
className?: string;
|
|
38
43
|
/** Week starts on (0 = Sunday, 1 = Monday) */
|
|
39
44
|
weekStartsOn?: 0 | 1;
|
|
45
|
+
/** Intl locale for the toolbar title. */
|
|
46
|
+
locale?: string;
|
|
47
|
+
/** Text of the Today pill. @default 'Today' */
|
|
48
|
+
todayLabel?: string;
|
|
40
49
|
/**
|
|
41
50
|
* Granular header visibility configuration.
|
|
42
51
|
* When provided, individual keys override `showTimelineViews`, `showSettings`,
|
|
@@ -49,6 +58,8 @@ export interface CalendarHeaderProps<TData = Record<string, unknown>> {
|
|
|
49
58
|
labels?: {
|
|
50
59
|
today?: string;
|
|
51
60
|
day?: string;
|
|
61
|
+
/** Quoted: a key cannot start with a digit unquoted. */
|
|
62
|
+
'4day'?: string;
|
|
52
63
|
week?: string;
|
|
53
64
|
month?: string;
|
|
54
65
|
year?: string;
|
|
@@ -58,6 +69,6 @@ export interface CalendarHeaderProps<TData = Record<string, unknown>> {
|
|
|
58
69
|
resourceView?: string;
|
|
59
70
|
};
|
|
60
71
|
}
|
|
61
|
-
export declare function CalendarHeader<TData = Record<string, unknown>>({ currentDate, view,
|
|
72
|
+
export declare function CalendarHeader<TData = Record<string, unknown>>({ currentDate, view, onNavigateToday, onNavigatePrev, onNavigateNext, onNavigate, onViewChange, onAddEvent: _onAddEvent, availableViews, showTimelineViews: _showTimelineViews, timelineViews: _timelineViews, settingsContent, showSettings, filterContent, leadingAction, actions, className, weekStartsOn, locale, todayLabel, headerConfig, labels, }: CalendarHeaderProps<TData>): import("react/jsx-runtime").JSX.Element;
|
|
62
73
|
export default CalendarHeader;
|
|
63
74
|
//# sourceMappingURL=calendar-header.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar-header.d.ts","sourceRoot":"","sources":["../../../src/components/header/calendar-header.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,KAAK,SAAS,EAAW,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"calendar-header.d.ts","sourceRoot":"","sources":["../../../src/components/header/calendar-header.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,KAAK,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
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../inno-calendar-BnCt65PZ.cjs");exports.AgendaView=e.AgendaView;exports.Button=e.Button;exports.CalendarHeader=e.CalendarHeader;exports.CalendarSettings=e.CalendarSettings;exports.CalendarSidebar=e.CalendarSidebar;exports.DateNavigator=e.DateNavigator;exports.DayEventsExpansion=e.DayEventsExpansion;exports.DaySlot=e.DaySlot;exports.DayView=e.DayView;exports.EventBlock=e.EventBlock;exports.EventCard=e.EventCard;exports.EventPopover=e.EventPopover;exports.FieldLayer=e.FieldLayer;exports.FilterPanel=e.FilterPanel;exports.InnoCalendar=e.InnoCalendar;exports.IntegratedCalendar=e.InnoCalendar;exports.MiniMonth=e.MiniMonth;exports.MonthView=e.MonthView;exports.MultiDayBanner=e.MultiDayBanner;exports.MultiDayEventBar=e.MultiDayEventBar;exports.Popover=e.Popover;exports.PopoverAnchor=e.PopoverAnchor;exports.PopoverContent=e.PopoverContent;exports.PopoverTrigger=e.PopoverTrigger;exports.QuickCreate=e.QuickCreate;exports.RecurrenceField=e.RecurrenceField;exports.Sheet=e.Sheet;exports.SheetClose=e.SheetClose;exports.SheetContent=e.SheetContent;exports.SheetDescription=e.SheetDescription;exports.SheetHeader=e.SheetHeader;exports.SheetTitle=e.SheetTitle;exports.SheetTrigger=e.SheetTrigger;exports.SidebarSheet=e.SidebarSheet;exports.TimeSlot=e.TimeSlot;exports.TimelineView=e.TimelineView;exports.TodayButton=e.TodayButton;exports.Tooltip=e.Tooltip;exports.TooltipContent=e.TooltipContent;exports.TooltipProvider=e.TooltipProvider;exports.TooltipTrigger=e.TooltipTrigger;exports.WeekView=e.WeekView;exports.WhenRow=e.WhenRow;exports.YearView=e.YearView;exports.buttonVariants=e.buttonVariants;exports.getEventColorClasses=e.getEventColorClasses;exports.recurrencePresets=e.recurrencePresets;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -10,14 +10,15 @@
|
|
|
10
10
|
* - View components (Day, Week, Month, Agenda)
|
|
11
11
|
* - Header controls
|
|
12
12
|
*/
|
|
13
|
-
export { Calendar, type CalendarProps } from './calendar';
|
|
14
13
|
export { EventBlock, type EventBlockProps, EventCard, type EventCardProps, EventPopover, type EventPopoverProps, getEventColorClasses, type IEventParticipant, type IEventPopoverLabels, type IPopoverEvent, MultiDayEventBar, type MultiDayEventBarProps, } from './event';
|
|
15
14
|
export { CalendarHeader, type CalendarHeaderProps, DateNavigator, type DateNavigatorProps, TodayButton, type TodayButtonProps, } from './header';
|
|
16
15
|
export { InnoCalendar, InnoCalendar as IntegratedCalendar, type InnoCalendarProps, type InnoCalendarProps as IntegratedCalendarProps, } from './inno-calendar';
|
|
17
16
|
export { DaySlot, type DaySlotProps, MultiDayBanner, type MultiDayBannerProps, TimeSlot, } from './primitives';
|
|
18
|
-
export {
|
|
19
|
-
export {
|
|
20
|
-
export {
|
|
21
|
-
export {
|
|
22
|
-
export {
|
|
17
|
+
export { FieldLayer, type FieldLayerProps } from './primitives/field-layer';
|
|
18
|
+
export { type IEventFormActions, type IEventFormArgs, QuickCreate, type QuickCreateProps, type TEventFormRenderer, } from './primitives/quick-create';
|
|
19
|
+
export { type IRecurrence, type IRecurrenceLabels, type IRecurrenceSupport, RecurrenceField, type RecurrenceFieldProps, recurrencePresets, type TRecurrenceFreq, type TWeekday, } from './primitives/recurrence-field';
|
|
20
|
+
export { type IWhenLabels, WhenRow, type WhenRowProps } from './primitives/when-row';
|
|
21
|
+
export { Button, type ButtonProps, buttonVariants, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Sheet, SheetClose, SheetContent, SheetDescription, SheetHeader, SheetTitle, SheetTrigger, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from './ui';
|
|
22
|
+
export { AgendaView, type AgendaViewProps, DayEventsExpansion, type DayEventsExpansionProps, DayView, type DayViewProps, type IAgendaLabels, MonthView, type MonthViewProps, TimelineView, type TimelineViewProps, WeekView, type WeekViewProps, YearView, type YearViewProps, } from './views';
|
|
23
|
+
export * from './shell';
|
|
23
24
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EACN,UAAU,EACV,KAAK,eAAe,EACpB,SAAS,EACT,KAAK,cAAc,EACnB,YAAY,EACZ,KAAK,iBAAiB,EACtB,oBAAoB,EACpB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,gBAAgB,EAChB,KAAK,qBAAqB,GAC1B,MAAM,SAAS,CAAC;AAEjB,OAAO,EACN,cAAc,EACd,KAAK,mBAAmB,EACxB,aAAa,EACb,KAAK,kBAAkB,EACvB,WAAW,EACX,KAAK,gBAAgB,GACrB,MAAM,UAAU,CAAC;AAElB,OAAO,EACN,YAAY,EAEZ,YAAY,IAAI,kBAAkB,EAClC,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,IAAI,uBAAuB,GACjD,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACN,OAAO,EACP,KAAK,YAAY,EACjB,cAAc,EACd,KAAK,mBAAmB,EACxB,QAAQ,GACR,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC5E,OAAO,EACN,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,WAAW,EACX,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,GACvB,MAAM,2BAA2B,CAAC;AAGnC,OAAO,EACN,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,eAAe,EACf,KAAK,oBAAoB,EACzB,iBAAiB,EACjB,KAAK,eAAe,EACpB,KAAK,QAAQ,GACb,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,KAAK,WAAW,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErF,OAAO,EACN,MAAM,EACN,KAAK,WAAW,EAChB,cAAc,EACd,OAAO,EACP,aAAa,EACb,cAAc,EACd,cAAc,EACd,KAAK,EACL,UAAU,EACV,YAAY,EACZ,gBAAgB,EAChB,WAAW,EACX,UAAU,EACV,YAAY,EACZ,OAAO,EACP,cAAc,EACd,eAAe,EACf,cAAc,GACd,MAAM,MAAM,CAAC;AAEd,OAAO,EACN,UAAU,EACV,KAAK,eAAe,EACpB,kBAAkB,EAClB,KAAK,uBAAuB,EAC5B,OAAO,EACP,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,SAAS,EACT,KAAK,cAAc,EACnB,YAAY,EACZ,KAAK,iBAAiB,EACtB,QAAQ,EACR,KAAK,aAAa,EAClB,QAAQ,EACR,KAAK,aAAa,GAClB,MAAM,SAAS,CAAC;AAKjB,cAAc,SAAS,CAAC"}
|
|
@@ -1,60 +1,51 @@
|
|
|
1
|
-
import { A as s,
|
|
2
|
-
import { A as u, B as V, C as w, D as y, a as B, b as c, c as A, d as H, e as P, f as W, g as b, h as m, i as F, j as I, E as k, k as x, M, l as U, m as f, P as _, n as G, o as K, p as N, S as O, q as R, r as Y, s as j, t as q, u as z, v as L, T as J, w as Q, x as X, y as Z, z as $, F as aa, W as ea, G as sa, H as ta } from "../week-view-BeasFcyR.js";
|
|
1
|
+
import { A as s, B as t, C as r, a as o, b as n, D as i, c as l, d, e as v, E as C, f as S, g as h, F as p, h as g, I as T, I as c, M as u, i as P, j as w, k as y, P as D, l as E, m as V, n as B, Q as M, R as b, S as k, o as m, p as F, q as I, r as x, s as A, t as H, u as R, T as W, v as f, w as L, x as Q, y as Y, z as j, G as q, W as z, H as G, Y as J, J as K, K as N, L as O } from "../inno-calendar-B6qXIqxY.js";
|
|
3
2
|
export {
|
|
4
|
-
s as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
o as
|
|
8
|
-
|
|
9
|
-
i as
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
aa as TooltipTrigger,
|
|
52
|
-
T as UserFilter,
|
|
53
|
-
C as VisibleHoursSetting,
|
|
54
|
-
ea as WeekView,
|
|
55
|
-
v as WorkingHoursSetting,
|
|
56
|
-
E as YearView,
|
|
57
|
-
sa as buttonVariants,
|
|
58
|
-
ta as getEventColorClasses
|
|
3
|
+
s as AgendaView,
|
|
4
|
+
t as Button,
|
|
5
|
+
r as CalendarHeader,
|
|
6
|
+
o as CalendarSettings,
|
|
7
|
+
n as CalendarSidebar,
|
|
8
|
+
i as DateNavigator,
|
|
9
|
+
l as DayEventsExpansion,
|
|
10
|
+
d as DaySlot,
|
|
11
|
+
v as DayView,
|
|
12
|
+
C as EventBlock,
|
|
13
|
+
S as EventCard,
|
|
14
|
+
h as EventPopover,
|
|
15
|
+
p as FieldLayer,
|
|
16
|
+
g as FilterPanel,
|
|
17
|
+
T as InnoCalendar,
|
|
18
|
+
c as IntegratedCalendar,
|
|
19
|
+
u as MiniMonth,
|
|
20
|
+
P as MonthView,
|
|
21
|
+
w as MultiDayBanner,
|
|
22
|
+
y as MultiDayEventBar,
|
|
23
|
+
D as Popover,
|
|
24
|
+
E as PopoverAnchor,
|
|
25
|
+
V as PopoverContent,
|
|
26
|
+
B as PopoverTrigger,
|
|
27
|
+
M as QuickCreate,
|
|
28
|
+
b as RecurrenceField,
|
|
29
|
+
k as Sheet,
|
|
30
|
+
m as SheetClose,
|
|
31
|
+
F as SheetContent,
|
|
32
|
+
I as SheetDescription,
|
|
33
|
+
x as SheetHeader,
|
|
34
|
+
A as SheetTitle,
|
|
35
|
+
H as SheetTrigger,
|
|
36
|
+
R as SidebarSheet,
|
|
37
|
+
W as TimeSlot,
|
|
38
|
+
f as TimelineView,
|
|
39
|
+
L as TodayButton,
|
|
40
|
+
Q as Tooltip,
|
|
41
|
+
Y as TooltipContent,
|
|
42
|
+
j as TooltipProvider,
|
|
43
|
+
q as TooltipTrigger,
|
|
44
|
+
z as WeekView,
|
|
45
|
+
G as WhenRow,
|
|
46
|
+
J as YearView,
|
|
47
|
+
K as buttonVariants,
|
|
48
|
+
N as getEventColorClasses,
|
|
49
|
+
O as recurrencePresets
|
|
59
50
|
};
|
|
60
51
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { IDropResult } from '../core/context/drag-drop-context';
|
|
3
|
+
import { TEventCardRenderer } from '../core/context/event-card-context';
|
|
3
4
|
import { IPreferencesConfig } from '../core/preferences';
|
|
4
|
-
import { CalendarEvent,
|
|
5
|
+
import { CalendarEvent, ICalendarHeaderConfig, ICalendarRefHandle, ICalendarUser, IResourceColumnConfig, IScheduleType, ISelectionResult, IViewPersistenceConfig, TCalendarView } from '../core/types';
|
|
6
|
+
import { CalendarHeaderProps } from './header/calendar-header';
|
|
7
|
+
import { TEventFormRenderer } from './primitives/quick-create';
|
|
8
|
+
import { IAgendaLabels } from './views';
|
|
5
9
|
/**
|
|
6
10
|
* Props for the main `<InnoCalendar>` component.
|
|
7
11
|
*
|
|
@@ -18,13 +22,13 @@ import { CalendarEvent, ICalendarClassNames, ICalendarHeaderConfig, ICalendarRef
|
|
|
18
22
|
* initialView="week"
|
|
19
23
|
* onEventClick={(e) => openDialog(e)}
|
|
20
24
|
* onSlotSelect={(sel) => createEvent(sel.startDate, sel.endDate)}
|
|
21
|
-
*
|
|
25
|
+
* eventDetail={(event, { close }) => <MyDetail event={event} onClose={close} />}
|
|
22
26
|
* />
|
|
23
27
|
* ```
|
|
24
28
|
*/
|
|
25
29
|
export interface InnoCalendarProps<TEventData extends Record<string, unknown> = Record<string, unknown>> {
|
|
26
|
-
/**
|
|
27
|
-
events
|
|
30
|
+
/** The events to display. */
|
|
31
|
+
events?: CalendarEvent<TEventData>[];
|
|
28
32
|
/** Users / participants available for filtering and resource views */
|
|
29
33
|
users?: ICalendarUser[];
|
|
30
34
|
/**
|
|
@@ -63,15 +67,30 @@ export interface InnoCalendarProps<TEventData extends Record<string, unknown> =
|
|
|
63
67
|
/** Initial date the calendar navigates to. @default `new Date()` */
|
|
64
68
|
initialDate?: Date;
|
|
65
69
|
/** Pre-selected user filter. `'all'` shows all users. @default 'all' */
|
|
66
|
-
initialSelectedUserId?: string |
|
|
70
|
+
initialSelectedUserId?: string | 'all';
|
|
67
71
|
/** Pre-selected schedule type IDs for client-side filtering */
|
|
68
72
|
initialScheduleTypeIds?: number[];
|
|
69
73
|
/** Pre-selected participant IDs for client-side filtering */
|
|
70
74
|
initialParticipantIds?: string[];
|
|
71
75
|
/** Working-hours view override from URL or consumer logic */
|
|
72
|
-
initialWorkingHoursView?:
|
|
76
|
+
initialWorkingHoursView?: 'default' | 'enabled' | 'disabled';
|
|
73
77
|
/** Pre-filled search query for text filtering */
|
|
74
78
|
initialSearchQuery?: string;
|
|
79
|
+
/**
|
|
80
|
+
* View-persistence configuration. By default the calendar reads the user's
|
|
81
|
+
* last selected view from localStorage on mount and writes back on every
|
|
82
|
+
* change. Pass `{ enabled: false }` to opt out, or `{ storageKey: '...' }`
|
|
83
|
+
* to scope persistence per context — one key per tab, say, so each tab
|
|
84
|
+
* remembers its own view.
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* ```tsx
|
|
88
|
+
* <InnoCalendar viewPersistence={{ enabled: false }} />
|
|
89
|
+
* ```
|
|
90
|
+
*
|
|
91
|
+
* @see {@link IViewPersistenceConfig}
|
|
92
|
+
*/
|
|
93
|
+
viewPersistence?: IViewPersistenceConfig;
|
|
75
94
|
/**
|
|
76
95
|
* Preferences configuration (defaults, locked keys, storage key).
|
|
77
96
|
* See `IPreferencesConfig` for full details.
|
|
@@ -82,7 +101,20 @@ export interface InnoCalendarProps<TEventData extends Record<string, unknown> =
|
|
|
82
101
|
/** Fires when a user clicks an empty time slot */
|
|
83
102
|
onSlotClick?: (date: Date, hour?: number) => void;
|
|
84
103
|
/** Fires after a user drags to select a time range */
|
|
85
|
-
|
|
104
|
+
/**
|
|
105
|
+
* A drag finished. Given this, you own what happens next and the built-in
|
|
106
|
+
* card never opens.
|
|
107
|
+
*
|
|
108
|
+
* `anchor` is where the drag ended, in viewport coordinates — the same point
|
|
109
|
+
* the built-in card places itself against. Without it a consumer's own card
|
|
110
|
+
* has to guess, and lands centred instead of beside the slot.
|
|
111
|
+
*/
|
|
112
|
+
onSlotSelect?: (selection: ISelectionResult, meta: {
|
|
113
|
+
anchor: {
|
|
114
|
+
x: number;
|
|
115
|
+
y: number;
|
|
116
|
+
};
|
|
117
|
+
}) => void;
|
|
86
118
|
/** Fires when the header "Add" button is clicked */
|
|
87
119
|
onAddEvent?: () => void;
|
|
88
120
|
/** Fires after an event is drag-dropped to a new time/resource */
|
|
@@ -93,6 +125,8 @@ export interface InnoCalendarProps<TEventData extends Record<string, unknown> =
|
|
|
93
125
|
onViewChange?: (view: TCalendarView) => void;
|
|
94
126
|
/** Additional CSS classes on the root container */
|
|
95
127
|
className?: string;
|
|
128
|
+
/** Intl locale for dates and times in built-in surfaces. @default browser */
|
|
129
|
+
locale?: string;
|
|
96
130
|
/** Whether to render the built-in header bar. @default true */
|
|
97
131
|
showHeader?: boolean;
|
|
98
132
|
/** Minimum drag-selection length in minutes. @default 30 */
|
|
@@ -106,7 +140,7 @@ export interface InnoCalendarProps<TEventData extends Record<string, unknown> =
|
|
|
106
140
|
*
|
|
107
141
|
* @default 'expand'
|
|
108
142
|
*/
|
|
109
|
-
showMoreMode?:
|
|
143
|
+
showMoreMode?: 'dayView' | 'popover' | 'expand';
|
|
110
144
|
/**
|
|
111
145
|
* When `true`, clicking "+N more" in month view opens a popover
|
|
112
146
|
* listing all day events instead of navigating to day view.
|
|
@@ -121,116 +155,149 @@ export interface InnoCalendarProps<TEventData extends Record<string, unknown> =
|
|
|
121
155
|
*/
|
|
122
156
|
isLoading?: boolean;
|
|
123
157
|
/**
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
158
|
+
* Draw the detail yourself — what opens when an event is clicked.
|
|
159
|
+
*
|
|
160
|
+
* The third of the trio, beside `eventCard` and `eventForm`: the chip, the
|
|
161
|
+
* detail, the form. The calendar supplies the popover it sits in, placed
|
|
162
|
+
* beside the event; this is what goes inside. Omit it for the built-in one.
|
|
163
|
+
*
|
|
164
|
+
* `edit` is present only when an `eventForm` is there to open.
|
|
128
165
|
*
|
|
129
166
|
* @example
|
|
130
167
|
* ```tsx
|
|
131
|
-
*
|
|
132
|
-
* <
|
|
168
|
+
* eventDetail={(agenda, { close, edit }) => (
|
|
169
|
+
* <EventDetail agenda={agenda} onClose={close} onEdit={edit} />
|
|
133
170
|
* )}
|
|
134
171
|
* ```
|
|
135
172
|
*/
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
173
|
+
eventDetail?: (event: CalendarEvent<TEventData>, actions: {
|
|
174
|
+
close: () => void;
|
|
175
|
+
edit?: (() => void) | undefined;
|
|
139
176
|
}) => ReactNode;
|
|
140
177
|
/**
|
|
141
|
-
*
|
|
142
|
-
*
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
*
|
|
147
|
-
*
|
|
178
|
+
* Everything inside the event card.
|
|
179
|
+
*
|
|
180
|
+
* The calendar supplies the surface — floated beside the slot, draggable,
|
|
181
|
+
* dismissed on Escape or a click outside, a sheet on a phone — and hands you
|
|
182
|
+
* what it was opened for: the slot, and the event when there is one. The
|
|
183
|
+
* title, the categories, the time, the fields and the buttons are all yours,
|
|
184
|
+
* because they are all about what an event *is*, which only you know.
|
|
185
|
+
*
|
|
186
|
+
* `expand(true)` widens the card, for when your own "More options" opens.
|
|
187
|
+
*
|
|
188
|
+
* @example
|
|
189
|
+
* ```tsx
|
|
190
|
+
* eventForm={({ selection, event }, { close }) => (
|
|
191
|
+
* <EventForm selection={selection} event={event} onDone={close} />
|
|
192
|
+
* )}
|
|
193
|
+
* ```
|
|
148
194
|
*/
|
|
149
|
-
|
|
195
|
+
eventForm?: TEventFormRenderer<TEventData>;
|
|
150
196
|
/**
|
|
151
|
-
*
|
|
152
|
-
*
|
|
197
|
+
* The filters, rendered by you.
|
|
198
|
+
*
|
|
199
|
+
* The calendar owns where they live — a column beside the grid on a wide
|
|
200
|
+
* screen, a sheet you pull out below one — and nothing else. What a filter is,
|
|
201
|
+
* how it is searched and what it sends are all yours, the same way the event
|
|
202
|
+
* card and the form are.
|
|
203
|
+
*
|
|
204
|
+
* `close` puts the sheet away, for a filter that applies on tap.
|
|
153
205
|
*
|
|
154
206
|
* @example
|
|
155
207
|
* ```tsx
|
|
156
|
-
*
|
|
157
|
-
*
|
|
208
|
+
* filters={({ close }) => <AgendaFilters onDone={close} />}
|
|
209
|
+
* labels={{ filters: t('labels.filters') }}
|
|
158
210
|
* ```
|
|
211
|
+
*/
|
|
212
|
+
filters?: (actions: {
|
|
213
|
+
close: () => void;
|
|
214
|
+
}) => ReactNode;
|
|
215
|
+
/**
|
|
216
|
+
* Every word the calendar says.
|
|
159
217
|
*
|
|
160
|
-
*
|
|
218
|
+
* One prop rather than three: `headerLabels`, `agendaLabels` and a filters
|
|
219
|
+
* title were the same kind of thing arriving by three routes, and a fourth
|
|
220
|
+
* region would have wanted a fourth.
|
|
161
221
|
*/
|
|
162
|
-
|
|
222
|
+
labels?: {
|
|
223
|
+
header?: Partial<CalendarHeaderProps['labels']>;
|
|
224
|
+
agenda?: Partial<IAgendaLabels>;
|
|
225
|
+
/** Heading above the filter rail. */
|
|
226
|
+
filters?: string;
|
|
227
|
+
};
|
|
163
228
|
/**
|
|
164
|
-
*
|
|
165
|
-
*
|
|
166
|
-
*
|
|
229
|
+
* Draw the event chip yourself.
|
|
230
|
+
*
|
|
231
|
+
* Receives your event — typed by this calendar's `TEventData` — and returns
|
|
232
|
+
* what goes inside the chip. The shell around it stays the calendar's: it is
|
|
233
|
+
* what gets positioned in the grid, dragged, resized and clicked to open the
|
|
234
|
+
* popover, so an app that owned it too would have to re-implement all of it
|
|
235
|
+
* to keep the grid working.
|
|
167
236
|
*
|
|
168
237
|
* @example
|
|
169
238
|
* ```tsx
|
|
170
|
-
* <InnoCalendar
|
|
171
|
-
*
|
|
239
|
+
* <InnoCalendar<AgendaData>
|
|
240
|
+
* eventCard={(agenda) => <EventCard agenda={agenda} />}
|
|
172
241
|
* />
|
|
173
242
|
* ```
|
|
174
|
-
*
|
|
175
|
-
* @see {@link IResourceColumnConfig}
|
|
176
243
|
*/
|
|
177
|
-
|
|
244
|
+
eventCard?: TEventCardRenderer<TEventData>;
|
|
178
245
|
/**
|
|
179
|
-
*
|
|
180
|
-
* user's last selected view from localStorage on mount and writes back
|
|
181
|
-
* on every change. Pass `{ enabled: false }` to opt out completely, or
|
|
182
|
-
* `{ storageKey: '...' }` to scope persistence per context (e.g. one key
|
|
183
|
-
* per tab so each tab remembers its own view independently).
|
|
246
|
+
* Draw the event form yourself — the rows below the card's time row.
|
|
184
247
|
*
|
|
185
|
-
*
|
|
186
|
-
*
|
|
187
|
-
*
|
|
188
|
-
* ```
|
|
248
|
+
* Receives the draft, the setters, whether "More options" is open and a way
|
|
249
|
+
* to tell Save it may not proceed. The card keeps the title, the categories,
|
|
250
|
+
* the time and the buttons; everything past that is yours.
|
|
189
251
|
*
|
|
190
|
-
* @example
|
|
252
|
+
* @example
|
|
191
253
|
* ```tsx
|
|
192
|
-
* <InnoCalendar
|
|
193
|
-
*
|
|
254
|
+
* <InnoCalendar<AgendaData>
|
|
255
|
+
* eventForm={(draft) => <EventForm {...draft} />}
|
|
194
256
|
* />
|
|
195
257
|
* ```
|
|
196
|
-
*
|
|
197
|
-
* @see {@link IViewPersistenceConfig}
|
|
198
258
|
*/
|
|
199
|
-
viewPersistence?: IViewPersistenceConfig;
|
|
200
259
|
/**
|
|
201
|
-
*
|
|
260
|
+
* Fine-grained visibility control for header sections.
|
|
261
|
+
* Each key defaults to `true` when omitted, so you only specify what to hide.
|
|
202
262
|
*
|
|
203
|
-
*
|
|
204
|
-
*
|
|
205
|
-
*
|
|
206
|
-
*
|
|
263
|
+
* @example
|
|
264
|
+
* ```tsx
|
|
265
|
+
* // Hide settings gear and resource views
|
|
266
|
+
* <InnoCalendar headerConfig={{ showSettings: false, showResourceViews: false }} />
|
|
267
|
+
* ```
|
|
207
268
|
*
|
|
208
|
-
* @
|
|
269
|
+
* @see {@link ICalendarHeaderConfig}
|
|
209
270
|
*/
|
|
210
|
-
|
|
271
|
+
headerConfig?: ICalendarHeaderConfig;
|
|
211
272
|
/**
|
|
212
|
-
*
|
|
213
|
-
*
|
|
214
|
-
*
|
|
273
|
+
* Visual configuration for the resource (left) column in timeline /
|
|
274
|
+
* resource views. Pick a name-rendering variant and toggle the avatar
|
|
275
|
+
* without writing a custom `resourceHeader` slot.
|
|
215
276
|
*
|
|
216
277
|
* @example
|
|
217
278
|
* ```tsx
|
|
218
279
|
* <InnoCalendar
|
|
219
|
-
*
|
|
220
|
-
* renderEventDetail={({ event, onClose }) => (
|
|
221
|
-
* <MyEventDrawer event={event} onClose={onClose} />
|
|
222
|
-
* )}
|
|
280
|
+
* resourceColumnConfig={{ variant: 'marquee', showAvatar: false }}
|
|
223
281
|
* />
|
|
224
282
|
* ```
|
|
283
|
+
*
|
|
284
|
+
* @see {@link IResourceColumnConfig}
|
|
225
285
|
*/
|
|
226
|
-
|
|
227
|
-
event: CalendarEvent<TEventData>;
|
|
228
|
-
onClose: () => void;
|
|
229
|
-
}) => ReactNode;
|
|
286
|
+
resourceColumnConfig?: IResourceColumnConfig;
|
|
230
287
|
/** Custom React content rendered inside the settings dropdown panel */
|
|
231
288
|
settingsContent?: ReactNode;
|
|
232
289
|
/** Custom React content rendered as the filter sidebar / row */
|
|
233
290
|
filterContent?: ReactNode;
|
|
291
|
+
/**
|
|
292
|
+
* Show Google's left rail — Create button, mini month navigator, then
|
|
293
|
+
* `sidebarContent`. Hidden below `lg`, where the grid takes the full width.
|
|
294
|
+
* @default false
|
|
295
|
+
*/
|
|
296
|
+
showSidebar?: boolean;
|
|
297
|
+
/** Rendered under the mini month. Filters and calendar toggles live here. */
|
|
298
|
+
sidebarContent?: ReactNode;
|
|
299
|
+
/** Label for the sidebar's Create button. @default 'Create' */
|
|
300
|
+
createLabel?: string;
|
|
234
301
|
/** Custom header actions (replaces the default "+" add button) */
|
|
235
302
|
headerActions?: ReactNode;
|
|
236
303
|
/**
|