@memobit/libs 1.0.51 → 1.0.53
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.css +1 -1
- package/dist/index.d.ts +73 -0
- package/dist/index.esm.js +5821 -5374
- package/dist/version.json +4 -4
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -309,6 +309,37 @@ export declare interface CalendarDateRange {
|
|
|
309
309
|
end: Date;
|
|
310
310
|
}
|
|
311
311
|
|
|
312
|
+
/** A day cell's worth of events, already split into all-day and timed. */
|
|
313
|
+
export declare interface CalendarDayBucket<T = unknown> {
|
|
314
|
+
date: Date;
|
|
315
|
+
allDay: CalendarEvent<T>[];
|
|
316
|
+
timed: CalendarEvent<T>[];
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
export declare interface CalendarEvent<T = unknown> {
|
|
320
|
+
id: string | number;
|
|
321
|
+
/** Local start. On an all-day event the time part is ignored. */
|
|
322
|
+
start: Date;
|
|
323
|
+
/** Local end. Defaults to `start` + `defaultDurationMinutes`. */
|
|
324
|
+
end?: Date;
|
|
325
|
+
/** Renders in the all-day row of the week view and without a time in the month view. */
|
|
326
|
+
allDay?: boolean;
|
|
327
|
+
title: string;
|
|
328
|
+
variant?: CalendarEventVariant;
|
|
329
|
+
/** Overrides the variant's colour. Any CSS colour — pass a theme token where possible. */
|
|
330
|
+
color?: string;
|
|
331
|
+
/** Set false to pin an event in place while drag-to-reschedule is on. */
|
|
332
|
+
draggable?: boolean;
|
|
333
|
+
/** Caller payload, handed straight back on every callback. */
|
|
334
|
+
data?: T;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* Visual treatment for a chip. `ghost` is for events that are computed rather than
|
|
339
|
+
* stored — a projected recurrence, say — so they read as "expected" not "booked".
|
|
340
|
+
*/
|
|
341
|
+
export declare type CalendarEventVariant = 'default' | 'accent' | 'success' | 'warning' | 'danger' | 'muted' | 'ghost' | 'done';
|
|
342
|
+
|
|
312
343
|
export declare const CalendarHeatmap: FC<CalendarHeatmapProps>;
|
|
313
344
|
|
|
314
345
|
export declare interface CalendarHeatmapDataPoint {
|
|
@@ -1040,6 +1071,7 @@ export declare interface DateRangePickerProps {
|
|
|
1040
1071
|
alwaysOpen?: boolean;
|
|
1041
1072
|
autoClose?: boolean;
|
|
1042
1073
|
presets?: DateRangePreset[];
|
|
1074
|
+
firstDayOfWeek?: 0 | 1;
|
|
1043
1075
|
}
|
|
1044
1076
|
|
|
1045
1077
|
export declare interface DateRangePreset {
|
|
@@ -1229,6 +1261,45 @@ declare interface ErrorBoundaryState {
|
|
|
1229
1261
|
error: Error | null;
|
|
1230
1262
|
}
|
|
1231
1263
|
|
|
1264
|
+
export declare function EventCalendar<T>({ className, date, dayEndHour, dayStartHour, defaultDurationMinutes, emptyLabel, events, firstDayOfWeek, headerExtra, hourHeight, maxEventsPerDay, onDateChange, onDayClick, onEventClick, onEventDrop, onViewChange, renderEvent, showHeader, view, }: EventCalendarProps<T>): JSX.Element;
|
|
1265
|
+
|
|
1266
|
+
export declare interface EventCalendarProps<T = unknown> {
|
|
1267
|
+
events: CalendarEvent<T>[];
|
|
1268
|
+
/** Controlled view. Falls back to internal state when `onViewChange` is omitted. */
|
|
1269
|
+
view?: EventCalendarView;
|
|
1270
|
+
onViewChange?: (view: EventCalendarView) => void;
|
|
1271
|
+
/** Controlled anchor date — the month or week on screen. */
|
|
1272
|
+
date?: Date;
|
|
1273
|
+
onDateChange?: (date: Date) => void;
|
|
1274
|
+
firstDayOfWeek?: 0 | 1;
|
|
1275
|
+
onEventClick?: (event: CalendarEvent<T>) => void;
|
|
1276
|
+
/** Fires on the empty part of a day cell (month) or an hour slot (week). */
|
|
1277
|
+
onDayClick?: (date: Date) => void;
|
|
1278
|
+
/**
|
|
1279
|
+
* Enables drag-to-reschedule. `nextStart` keeps the original time of day in month
|
|
1280
|
+
* view, and snaps to the dropped hour slot in week view.
|
|
1281
|
+
*/
|
|
1282
|
+
onEventDrop?: (event: CalendarEvent<T>, nextStart: Date) => void;
|
|
1283
|
+
renderEvent?: (event: CalendarEvent<T>) => ReactNode;
|
|
1284
|
+
/** Chips shown in a month cell before the rest collapse behind "+N more". */
|
|
1285
|
+
maxEventsPerDay?: number;
|
|
1286
|
+
showHeader?: boolean;
|
|
1287
|
+
/** Extra controls rendered in the header, between the title and the view switch. */
|
|
1288
|
+
headerExtra?: ReactNode;
|
|
1289
|
+
/** First and last hour rendered by the week view. */
|
|
1290
|
+
dayStartHour?: number;
|
|
1291
|
+
dayEndHour?: number;
|
|
1292
|
+
/** Height of one hour row in the week view, in pixels. */
|
|
1293
|
+
hourHeight?: number;
|
|
1294
|
+
/** Assumed length of a timed event with no `end`. */
|
|
1295
|
+
defaultDurationMinutes?: number;
|
|
1296
|
+
className?: string;
|
|
1297
|
+
/** Shown in a month cell's place when the whole period has no events. */
|
|
1298
|
+
emptyLabel?: string;
|
|
1299
|
+
}
|
|
1300
|
+
|
|
1301
|
+
export declare type EventCalendarView = 'month' | 'week';
|
|
1302
|
+
|
|
1232
1303
|
declare interface ExternalButtonConfig extends ButtonProps {
|
|
1233
1304
|
text: string;
|
|
1234
1305
|
}
|
|
@@ -1695,6 +1766,7 @@ declare interface InputTimeProps {
|
|
|
1695
1766
|
label?: string;
|
|
1696
1767
|
max?: string;
|
|
1697
1768
|
min?: string;
|
|
1769
|
+
minuteStep?: number;
|
|
1698
1770
|
onBlur?: (event: FocusEvent_2<HTMLInputElement>) => void;
|
|
1699
1771
|
onChange?: (value: string | undefined) => void;
|
|
1700
1772
|
onClick?: (event: MouseEvent_2<HTMLInputElement>) => void;
|
|
@@ -1704,6 +1776,7 @@ declare interface InputTimeProps {
|
|
|
1704
1776
|
required?: boolean;
|
|
1705
1777
|
success?: string;
|
|
1706
1778
|
value?: string;
|
|
1779
|
+
withClock?: boolean;
|
|
1707
1780
|
}
|
|
1708
1781
|
|
|
1709
1782
|
export declare const InputUrl: ForwardRefExoticComponent<InputUrlProps & RefAttributes<HTMLInputElement>>;
|