@innosolutions/inno-calendar 1.0.72 → 2.0.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/CHANGELOG.md +116 -0
- package/LICENSE +48 -48
- package/README.md +333 -305
- package/dist/components/event/event-card.d.ts +4 -28
- 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 +22 -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/multi-day-banner.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/week-all-day-row.d.ts.map +1 -1
- 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 +39 -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 +155 -149
- 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 +33 -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 +228 -234
- package/dist/index.mjs.map +1 -1
- package/dist/inno-calendar-DFEaWcSi.cjs +11 -0
- package/dist/inno-calendar-DFEaWcSi.cjs.map +1 -0
- package/dist/inno-calendar-R7LPGSJU.js +7454 -0
- package/dist/inno-calendar-R7LPGSJU.js.map +1 -0
- package/dist/lib/index.cjs +1 -1
- package/dist/lib/index.mjs +1 -1
- package/dist/position-utils-BH6T1FL5.js +1125 -0
- package/dist/position-utils-BH6T1FL5.js.map +1 -0
- package/dist/position-utils-BVt-Bp93.cjs +2 -0
- package/dist/position-utils-BVt-Bp93.cjs.map +1 -0
- package/dist/styles/index.css +1 -1
- package/dist/use-slot-selection-CSsSyfAi.cjs +2 -0
- package/dist/use-slot-selection-CSsSyfAi.cjs.map +1 -0
- package/dist/use-slot-selection-CT1z9v9X.js +357 -0
- package/dist/use-slot-selection-CT1z9v9X.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 +108 -104
- package/dist/z-layers-CpHPAMdp.js +637 -0
- package/dist/z-layers-CpHPAMdp.js.map +1 -0
- package/dist/z-layers-D1DivrJg.cjs +2 -0
- package/dist/z-layers-D1DivrJg.cjs.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,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
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inno-calendar.d.ts","sourceRoot":"","sources":["../../src/components/inno-calendar.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"inno-calendar.d.ts","sourceRoot":"","sources":["../../src/components/inno-calendar.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAEN,KAAK,SAAS,EAOd,MAAM,OAAO,CAAC;AAEf,OAAO,EAAoB,KAAK,WAAW,EAAE,MAAM,mCAAmC,CAAC;AACvF,OAAO,EAAqB,KAAK,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAGhG,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,KAAK,EACX,aAAa,EACb,qBAAqB,EACrB,kBAAkB,EAClB,aAAa,EACb,qBAAqB,EACrB,aAAa,EACb,gBAAgB,EAChB,sBAAsB,EACtB,aAAa,EAEb,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAkB,KAAK,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACpF,OAAO,EAAe,KAAK,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAKjF,OAAO,EAGN,KAAK,aAAa,EAMlB,MAAM,SAAS,CAAC;AAMjB;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,i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AAC;AAExB,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface FieldLayerProps {
|
|
3
|
+
/** What the panel hangs from. */
|
|
4
|
+
anchorRef: React.RefObject<HTMLElement | null>;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
/** Take the trigger's width — right for a list of completions. */
|
|
8
|
+
matchWidth?: boolean | undefined;
|
|
9
|
+
className?: string | undefined;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* One transient menu at a time, across components that cannot see each other:
|
|
13
|
+
* a pill's list, the date calendar, the recurrence dropdown. Claiming the slot
|
|
14
|
+
* closes whoever held it; the returned release forgets the claim on unmount.
|
|
15
|
+
*
|
|
16
|
+
* Module-level on purpose — outside-click listeners alone cannot give this
|
|
17
|
+
* guarantee, because a menu that opens in the same gesture attaches its
|
|
18
|
+
* dismiss listener a tick later.
|
|
19
|
+
*/
|
|
20
|
+
export declare function claimMenuSlot(close: () => void): () => void;
|
|
21
|
+
export declare function FieldLayer({ anchorRef, onClose, children, matchWidth, className, }: FieldLayerProps): import('react').ReactPortal | null;
|
|
22
|
+
//# sourceMappingURL=field-layer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field-layer.d.ts","sourceRoot":"","sources":["../../../src/components/primitives/field-layer.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,KAAK,SAAS,EAAgD,MAAM,OAAO,CAAC;AAKrF,MAAM,WAAW,eAAe;IAC/B,iCAAiC;IACjC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAC/C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,SAAS,CAAC;IACpB,kEAAkE;IAClE,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/B;AAKD;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAM3D;AAED,wBAAgB,UAAU,CAAC,EAC1B,SAAS,EACT,OAAO,EACP,QAAQ,EACR,UAAU,EACV,SAAS,GACT,EAAE,eAAe,sCA+EjB"}
|
|
@@ -5,5 +5,8 @@ export { CalendarTimeline } from './calendar-timeline';
|
|
|
5
5
|
export { MultiDayBanner, type MultiDayBannerProps } from './multi-day-banner';
|
|
6
6
|
export { ScrollNavigator, type ScrollNavigatorProps } from './scroll-navigator';
|
|
7
7
|
export { WeekAllDayRow, type WeekAllDayRowProps } from './week-all-day-row';
|
|
8
|
+
export { type IRecurrence, type IRecurrenceLabels, type IRecurrenceSupport, RecurrenceField, type RecurrenceFieldProps, recurrencePresets, type TRecurrenceFreq, type TWeekday, weekdayOf, weekdayOrdinal, } from './recurrence-field';
|
|
9
|
+
export { FieldLayer, type FieldLayerProps } from './field-layer';
|
|
10
|
+
export { type IWhenLabels, WhenRow, type WhenRowProps } from './when-row';
|
|
8
11
|
export { DaySlot, type DaySlotProps, SelectableSlot, type SelectableSlotProps, TimeSlot, type TimeSlotProps, } from './selectable-slot';
|
|
9
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/primitives/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EACN,OAAO,EACP,KAAK,YAAY,EACjB,cAAc,EACd,KAAK,mBAAmB,EACxB,QAAQ,EACR,KAAK,aAAa,GAClB,MAAM,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/primitives/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EACN,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,eAAe,EACf,KAAK,oBAAoB,EACzB,iBAAiB,EACjB,KAAK,eAAe,EACpB,KAAK,QAAQ,EACb,SAAS,EACT,cAAc,GACd,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,EAAE,KAAK,WAAW,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1E,OAAO,EACN,OAAO,EACP,KAAK,YAAY,EACjB,cAAc,EACd,KAAK,mBAAmB,EACxB,QAAQ,EACR,KAAK,aAAa,GAClB,MAAM,mBAAmB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multi-day-banner.d.ts","sourceRoot":"","sources":["../../../src/components/primitives/multi-day-banner.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,KAAK,SAAS,EAAyB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"multi-day-banner.d.ts","sourceRoot":"","sources":["../../../src/components/primitives/multi-day-banner.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,KAAK,SAAS,EAAyB,MAAM,OAAO,CAAC;AAE9D,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAYrE,MAAM,WAAW,mBAAmB,CAAC,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACnE,kCAAkC;IAClC,MAAM,EAAE,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC;IAC/B,4DAA4D;IAC5D,IAAI,EAAE,IAAI,CAAC;IACX,0DAA0D;IAC1D,YAAY,CAAC,EAAE,aAAa,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC;IAChD;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;OAGG;IACH,aAAa,CAAC,EACX,CAAC,CAAC,KAAK,EAAE;QAAE,KAAK,EAAE,aAAa,CAAC,KAAK,CAAC,CAAC;QAAC,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,SAAS,CAAC,GAC5E,SAAS,CAAC;IACb,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAyJD,wBAAgB,cAAc,CAAC,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAC/D,MAAM,EACN,IAAI,EACJ,YAAY,EACZ,cAAsB,EACtB,aAAa,EACb,SAAS,GACT,EAAE,mBAAmB,CAAC,KAAK,CAAC,kDAkC5B;AAED,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { CalendarEvent, ISelectionResult } from '../../core/types';
|
|
3
|
+
/** What the card was opened for. */
|
|
4
|
+
export interface IEventFormArgs<TData = Record<string, unknown>> {
|
|
5
|
+
/** The slot: where it starts, where it ends, and whose column it was in. */
|
|
6
|
+
selection: ISelectionResult;
|
|
7
|
+
/** The event being edited, when the card was opened on one. */
|
|
8
|
+
event?: CalendarEvent<TData> | undefined;
|
|
9
|
+
}
|
|
10
|
+
/** What the card gives back. */
|
|
11
|
+
export interface IEventFormActions {
|
|
12
|
+
/** Dismiss the card — after a save, or from your own Cancel. */
|
|
13
|
+
close: () => void;
|
|
14
|
+
/**
|
|
15
|
+
* Ask for the wider card. "More options" is yours, so the width has to be
|
|
16
|
+
* too: only your form knows whether it has more to show.
|
|
17
|
+
*/
|
|
18
|
+
expand: (wide: boolean) => void;
|
|
19
|
+
}
|
|
20
|
+
export type TEventFormRenderer<TData = Record<string, unknown>> = (args: IEventFormArgs<TData>, actions: IEventFormActions) => ReactNode;
|
|
21
|
+
export interface QuickCreateProps<TData = Record<string, unknown>> {
|
|
22
|
+
args: IEventFormArgs<TData>;
|
|
23
|
+
/**
|
|
24
|
+
* Where to put the card. Omit it — opening from a link, say — and it places
|
|
25
|
+
* itself near the top of the viewport instead.
|
|
26
|
+
*
|
|
27
|
+
* `align` says what `x` means: `center` for a drag, where the card wants to
|
|
28
|
+
* sit under the pointer, and `end` for a landmark it should sit *beside*
|
|
29
|
+
* rather than cover — the current-time line, a day cell. It still slides
|
|
30
|
+
* back into view when the chosen side has no room.
|
|
31
|
+
*/
|
|
32
|
+
anchor?: {
|
|
33
|
+
x: number;
|
|
34
|
+
y: number;
|
|
35
|
+
align?: 'center' | 'start' | 'end';
|
|
36
|
+
} | undefined;
|
|
37
|
+
/** Everything inside the card. */
|
|
38
|
+
render: TEventFormRenderer<TData>;
|
|
39
|
+
/** For the close button, which is the card's own. */
|
|
40
|
+
closeLabel?: string | undefined;
|
|
41
|
+
onClose: () => void;
|
|
42
|
+
}
|
|
43
|
+
export declare function QuickCreate<TData = Record<string, unknown>>({ args, anchor, render, closeLabel, onClose, }: QuickCreateProps<TData>): import('react').ReactPortal | null;
|
|
44
|
+
//# sourceMappingURL=quick-create.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quick-create.d.ts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OAAO,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,wBAAgB,WAAW,CAAC,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAC5D,IAAI,EACJ,MAAM,EACN,MAAM,EACN,UAAoB,EACpB,OAAO,GACP,EAAE,gBAAgB,CAAC,KAAK,CAAC,sCAgPzB"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recurrence, the way Google asks for it: a dropdown of presets read off the
|
|
3
|
+
* event's own start date, and a Custom dialog for everything else.
|
|
4
|
+
*
|
|
5
|
+
* The value is a plain rule — frequency, interval, weekdays, an end — not the
|
|
6
|
+
* column names of anybody's database. Consumers map it on the way out, which is
|
|
7
|
+
* what lets one calendar sit in front of an RRULE store and a bespoke one.
|
|
8
|
+
*
|
|
9
|
+
* `supports` exists because backends differ in what they can *keep*. Offering
|
|
10
|
+
* "monthly on the second Wednesday" to a store that only records "monthly"
|
|
11
|
+
* produces an event that silently repeats on the wrong days.
|
|
12
|
+
*/
|
|
13
|
+
export type TRecurrenceFreq = 'daily' | 'weekly' | 'monthly' | 'yearly';
|
|
14
|
+
export type TWeekday = 'MO' | 'TU' | 'WE' | 'TH' | 'FR' | 'SA' | 'SU';
|
|
15
|
+
export interface IRecurrence {
|
|
16
|
+
freq: TRecurrenceFreq;
|
|
17
|
+
/** Every N days/weeks/months/years. */
|
|
18
|
+
interval: number;
|
|
19
|
+
/** Weekly only. */
|
|
20
|
+
byWeekday?: TWeekday[];
|
|
21
|
+
/**
|
|
22
|
+
* Monthly only: the same date each month, or the same weekday-of-month
|
|
23
|
+
* ("the second Wednesday").
|
|
24
|
+
*/
|
|
25
|
+
monthly?: 'date' | 'weekday';
|
|
26
|
+
/** ISO `yyyy-mm-dd`. Mutually exclusive with `count`. */
|
|
27
|
+
until?: string | null;
|
|
28
|
+
/** Number of occurrences. Mutually exclusive with `until`. */
|
|
29
|
+
count?: number | null;
|
|
30
|
+
}
|
|
31
|
+
export interface IRecurrenceSupport {
|
|
32
|
+
freqs?: TRecurrenceFreq[];
|
|
33
|
+
/** "Monthly on the second Wednesday". @default true */
|
|
34
|
+
monthlyByWeekday?: boolean;
|
|
35
|
+
/** Ending after N occurrences. @default true */
|
|
36
|
+
count?: boolean;
|
|
37
|
+
/** Ending on a date. @default true */
|
|
38
|
+
until?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Every rule must end. Google's default is "Never", which only works where a
|
|
41
|
+
* series is a rule the server evaluates; a store that materialises each
|
|
42
|
+
* occurrence as a row cannot hold an infinite one, and will reject it.
|
|
43
|
+
*
|
|
44
|
+
* With this on, "Never" is not offered and presets carry `defaultUntil`.
|
|
45
|
+
* @default false
|
|
46
|
+
*/
|
|
47
|
+
requireEnd?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* How far a preset runs when `requireEnd` is set. @default one year out
|
|
50
|
+
*/
|
|
51
|
+
defaultUntil?: (start: Date) => string;
|
|
52
|
+
}
|
|
53
|
+
export interface IRecurrenceLabels {
|
|
54
|
+
doesNotRepeat: string;
|
|
55
|
+
daily: string;
|
|
56
|
+
/** "Weekly on Wednesday" */
|
|
57
|
+
weeklyOn: (weekday: string) => string;
|
|
58
|
+
/** "Monthly on the second Wednesday" */
|
|
59
|
+
monthlyOnWeekday: (ordinal: number, weekday: string) => string;
|
|
60
|
+
/** "Monthly on day 12" */
|
|
61
|
+
monthlyOnDate: (day: number) => string;
|
|
62
|
+
/** "Annually on 12 August" */
|
|
63
|
+
annuallyOn: (date: string) => string;
|
|
64
|
+
everyWeekday: string;
|
|
65
|
+
custom: string;
|
|
66
|
+
/** The pill's text once a custom rule is set. */
|
|
67
|
+
summary: (rule: IRecurrence) => string;
|
|
68
|
+
customTitle: string;
|
|
69
|
+
repeatEvery: string;
|
|
70
|
+
repeatOn: string;
|
|
71
|
+
ends: string;
|
|
72
|
+
never: string;
|
|
73
|
+
endsOn: string;
|
|
74
|
+
endsAfter: string;
|
|
75
|
+
occurrences: string;
|
|
76
|
+
cancel: string;
|
|
77
|
+
done: string;
|
|
78
|
+
unit: Record<TRecurrenceFreq, string>;
|
|
79
|
+
}
|
|
80
|
+
/** Which occurrence of its weekday a date is — the 2nd Wednesday, say. */
|
|
81
|
+
export declare function weekdayOrdinal(date: Date): number;
|
|
82
|
+
export declare const weekdayOf: (date: Date) => TWeekday;
|
|
83
|
+
/** The presets Google offers, all of them read off the start date. */
|
|
84
|
+
export declare function recurrencePresets(start: Date, labels: IRecurrenceLabels, locale?: string, supports?: IRecurrenceSupport): {
|
|
85
|
+
rule: IRecurrence | null;
|
|
86
|
+
label: string;
|
|
87
|
+
}[];
|
|
88
|
+
export interface RecurrenceFieldProps {
|
|
89
|
+
/** `null` means it does not repeat. */
|
|
90
|
+
value: IRecurrence | null;
|
|
91
|
+
onChange: (rule: IRecurrence | null) => void;
|
|
92
|
+
/** The presets are read off this — "Weekly on Wednesday" needs the day. */
|
|
93
|
+
start: Date;
|
|
94
|
+
locale?: string | undefined;
|
|
95
|
+
weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | undefined;
|
|
96
|
+
/** What the consumer's store can actually keep. */
|
|
97
|
+
supports?: IRecurrenceSupport | undefined;
|
|
98
|
+
labels?: Partial<IRecurrenceLabels> | undefined;
|
|
99
|
+
disabled?: boolean | undefined;
|
|
100
|
+
}
|
|
101
|
+
export declare function RecurrenceField({ value, onChange, start, locale, weekStartsOn, supports, labels, disabled, }: RecurrenceFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
102
|
+
//# sourceMappingURL=recurrence-field.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recurrence-field.d.ts","sourceRoot":"","sources":["../../../src/components/primitives/recurrence-field.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AASH,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAC;AACxE,MAAM,MAAM,QAAQ,GAAG,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AG,SAAS,CAAC;IACrD,mDAAmD;IACnD,QAAQ,CAAC,EAAE,kBAAkB,GAAG,SAAS,CAAC;IAC1C,MAAM,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,GAAG,SAAS,CAAC;IAChD,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC/B;AAED,wBAAgB,eAAe,CAAC,EAC/B,KAAK,EACL,QAAQ,EACR,KAAK,EACL,MAAM,EACN,YAAY,EACZ,QAAQ,EACR,MAAM,EACN,QAAQ,GACR,EAAE,oBAAoB,2CAkHtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"week-all-day-row.d.ts","sourceRoot":"","sources":["../../../src/components/primitives/week-all-day-row.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,EAAE,KAAK,SAAS,EAAkC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"week-all-day-row.d.ts","sourceRoot":"","sources":["../../../src/components/primitives/week-all-day-row.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,EAAE,KAAK,SAAS,EAAkC,MAAM,OAAO,CAAC;AAEvE,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAuBrE,MAAM,WAAW,kBAAkB,CAAC,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAClE,8CAA8C;IAC9C,MAAM,EAAE,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC;IAC/B,4EAA4E;IAC5E,QAAQ,EAAE,IAAI,EAAE,CAAC;IACjB,uEAAuE;IACvE,eAAe,EAAE,MAAM,CAAC;IACxB,iDAAiD;IACjD,iBAAiB,EAAE,MAAM,CAAC;IAC1B,kEAAkE;IAClE,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,gEAAgE;IAChE,YAAY,CAAC,EAAE,aAAa,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC;IAChD;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;;;;;OAQG;IACH,aAAa,CAAC,EACX,CAAC,CAAC,KAAK,EAAE;QAAE,KAAK,EAAE,aAAa,CAAC,KAAK,CAAC,CAAC;QAAC,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,SAAS,CAAC,GAC5E,SAAS,CAAC;IACb,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AA4RD,wBAAgB,aAAa,CAAC,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAC9D,MAAM,EACN,QAAQ,EACR,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,YAAY,EACZ,cAAsB,EACtB,aAAa,EACb,SAAS,GACT,EAAE,kBAAkB,CAAC,KAAK,CAAC,kDAgI3B;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface IWhenLabels {
|
|
3
|
+
allDay: string;
|
|
4
|
+
startDate: string;
|
|
5
|
+
startTime: string;
|
|
6
|
+
endTime: string;
|
|
7
|
+
endDate: string;
|
|
8
|
+
/**
|
|
9
|
+
* "1 h 30" beside an end time. A function because plurals and word order
|
|
10
|
+
* belong to the consumer's i18n, not to a calendar.
|
|
11
|
+
*/
|
|
12
|
+
duration: (minutes: number) => string;
|
|
13
|
+
}
|
|
14
|
+
export interface WhenRowProps {
|
|
15
|
+
start: Date;
|
|
16
|
+
end: Date;
|
|
17
|
+
allDay?: boolean | undefined;
|
|
18
|
+
/** Only the keys that moved. */
|
|
19
|
+
onChange: (next: {
|
|
20
|
+
start?: Date;
|
|
21
|
+
end?: Date;
|
|
22
|
+
allDay?: boolean;
|
|
23
|
+
}) => void;
|
|
24
|
+
locale?: string | undefined;
|
|
25
|
+
/** @default false — 24-hour */
|
|
26
|
+
hour12?: boolean | undefined;
|
|
27
|
+
/** Granularity of the time lists. @default 15 */
|
|
28
|
+
step?: number | undefined;
|
|
29
|
+
weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | undefined;
|
|
30
|
+
labels?: Partial<IWhenLabels> | undefined;
|
|
31
|
+
/** Hide the All-day checkbox for domains where every event has a time. */
|
|
32
|
+
showAllDay?: boolean | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Rendered under the All-day checkbox — the recurrence pill, which Google
|
|
35
|
+
* groups with the time because changing the date changes what it can say.
|
|
36
|
+
*/
|
|
37
|
+
children?: ReactNode;
|
|
38
|
+
disabled?: boolean | undefined;
|
|
39
|
+
}
|
|
40
|
+
export declare function WhenRow({ start, end, allDay, onChange, locale, hour12, step, weekStartsOn, labels, showAllDay, children, disabled, }: WhenRowProps): import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
//# sourceMappingURL=when-row.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"when-row.d.ts","sourceRoot":"","sources":["../../../src/components/primitives/when-row.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAGH,OAAO,EAAE,KAAK,SAAS,EAA+B,MAAM,OAAO,CAAC;AASpE,MAAM,WAAW,WAAW;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;CACtC;AAgBD,MAAM,WAAW,YAAY;IAC5B,KAAK,EAAE,IAAI,CAAC;IACZ,GAAG,EAAE,IAAI,CAAC;IACV,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7B,gCAAgC;IAChC,QAAQ,EAAE,CAAC,IAAI,EAAE;QAAE,KAAK,CAAC,EAAE,IAAI,CAAC;QAAC,GAAG,CAAC,EAAE,IAAI,CAAC;QAAC,MAAM,CAAC,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAC;IACzE,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,+BAA+B;IAC/B,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7B,iDAAiD;IACjD,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,YAAY,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC;IACrD,MAAM,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,GAAG,SAAS,CAAC;IAC1C,0EAA0E;IAC1E,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACjC;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC/B;AAkRD,wBAAgB,OAAO,CAAC,EACvB,KAAK,EACL,GAAG,EACH,MAAc,EACd,QAAQ,EACR,MAAM,EACN,MAAM,EACN,IAAS,EACT,YAAY,EACZ,MAAM,EACN,UAAiB,EACjB,QAAQ,EACR,QAAQ,GACR,EAAE,YAAY,2CAuLd"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The built-in settings panel.
|
|
3
|
+
*
|
|
4
|
+
* The package already owns these preferences — slot duration, visible hours,
|
|
5
|
+
* working hours, badge style — and persists them. Until now it shipped the
|
|
6
|
+
* state without the UI, so every consuming app rebuilt the same four controls
|
|
7
|
+
* on top of the same context. This is that UI, once.
|
|
8
|
+
*
|
|
9
|
+
* Anything a consumer locks through `preferencesConfig.locked` is hidden rather
|
|
10
|
+
* than shown disabled: a control you are not allowed to touch is noise.
|
|
11
|
+
*/
|
|
12
|
+
export interface CalendarSettingsLabels {
|
|
13
|
+
title: string;
|
|
14
|
+
interval: string;
|
|
15
|
+
dayStart: string;
|
|
16
|
+
dayEnd: string;
|
|
17
|
+
workingHoursOnly: string;
|
|
18
|
+
eventStyle: string;
|
|
19
|
+
badgeDot: string;
|
|
20
|
+
badgeColored: string;
|
|
21
|
+
badgeMixed: string;
|
|
22
|
+
minutes: string;
|
|
23
|
+
}
|
|
24
|
+
export interface CalendarSettingsProps {
|
|
25
|
+
labels?: Partial<CalendarSettingsLabels> | undefined;
|
|
26
|
+
}
|
|
27
|
+
export declare function CalendarSettings({ labels }: CalendarSettingsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
28
|
+
//# sourceMappingURL=calendar-settings.d.ts.map
|