@mantine-vue/schedule 3.1.0 → 3.2.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/cjs/index.cjs +6101 -3638
- package/cjs/index.cjs.map +1 -1
- package/esm/index.mjs +6045 -3632
- package/esm/index.mjs.map +1 -1
- package/lib/component-props.d.ts +181 -214
- package/lib/components/CurrentTimeIndicator/CurrentTimeIndicator.d.ts +8 -114
- package/lib/components/CurrentTimeIndicator/CurrentTimeIndicator.types.d.ts +89 -0
- package/lib/components/CurrentTimeIndicator/CurrentTimeIndicator.vue.d.ts +20 -0
- package/lib/components/DayView/DayView.d.ts +10 -212
- package/lib/components/DayView/DayView.types.d.ts +65 -0
- package/lib/components/DayView/DayView.vue.d.ts +51 -0
- package/lib/components/DragContext/DragContext.d.ts +43 -5
- package/lib/components/MobileMonthView/MobileMonthView.d.ts +10 -171
- package/lib/components/MobileMonthView/MobileMonthView.types.d.ts +110 -0
- package/lib/components/MobileMonthView/MobileMonthView.vue.d.ts +44 -0
- package/lib/components/MonthView/MonthView.d.ts +10 -174
- package/lib/components/MonthView/MonthView.types.d.ts +125 -0
- package/lib/components/MonthView/MonthView.vue.d.ts +56 -0
- package/lib/components/MoreEvents/MoreEvents.d.ts +9 -65
- package/lib/components/MoreEvents/MoreEvents.types.d.ts +62 -0
- package/lib/components/MoreEvents/MoreEvents.vue.d.ts +23 -0
- package/lib/components/ResourcesDayView/ResourcesDayView.d.ts +10 -346
- package/lib/components/ResourcesDayView/ResourcesDayView.types.d.ts +308 -0
- package/lib/components/ResourcesDayView/ResourcesDayView.vue.d.ts +53 -0
- package/lib/components/ResourcesMonthView/ResourcesMonthView.d.ts +10 -279
- package/lib/components/ResourcesMonthView/ResourcesMonthView.types.d.ts +233 -0
- package/lib/components/ResourcesMonthView/ResourcesMonthView.vue.d.ts +52 -0
- package/lib/components/ResourcesMonthView/get-resources-month-view-layout/get-resources-month-view-layout.d.ts +54 -0
- package/lib/components/ResourcesMonthView/index.d.ts +1 -0
- package/lib/components/ResourcesSchedule/ResourcesSchedule.d.ts +9 -201
- package/lib/components/ResourcesSchedule/ResourcesSchedule.types.d.ts +159 -0
- package/lib/components/ResourcesSchedule/ResourcesSchedule.vue.d.ts +44 -0
- package/lib/components/ResourcesWeekView/ResourcesWeekView.d.ts +10 -412
- package/lib/components/ResourcesWeekView/ResourcesWeekView.types.d.ts +314 -0
- package/lib/components/ResourcesWeekView/ResourcesWeekView.vue.d.ts +58 -0
- package/lib/components/Schedule/Schedule.d.ts +9 -134
- package/lib/components/Schedule/Schedule.types.d.ts +153 -0
- package/lib/components/Schedule/Schedule.vue.d.ts +50 -0
- package/lib/components/ScheduleEvent/ScheduleEvent.d.ts +11 -88
- package/lib/components/ScheduleEvent/ScheduleEvent.types.d.ts +109 -0
- package/lib/components/ScheduleEvent/ScheduleEvent.vue.d.ts +24 -0
- package/lib/components/ScheduleHeader/HeaderControl/HeaderControl.d.ts +36 -0
- package/lib/components/ScheduleHeader/HeaderControl/HeaderControl.types.d.ts +44 -0
- package/lib/components/ScheduleHeader/HeaderControl/HeaderControl.vue.d.ts +14 -0
- package/lib/components/ScheduleHeader/HeaderControl/ScheduleHeaderNext.vue.d.ts +11 -0
- package/lib/components/ScheduleHeader/HeaderControl/ScheduleHeaderPrevious.vue.d.ts +11 -0
- package/lib/components/ScheduleHeader/HeaderControl/ScheduleHeaderToday.vue.d.ts +11 -0
- package/lib/components/ScheduleHeader/HeaderControl/index.d.ts +1 -2
- package/lib/components/ScheduleHeader/MonthYearSelect/MonthYearSelect.d.ts +8 -0
- package/lib/components/ScheduleHeader/MonthYearSelect/MonthYearSelect.types.d.ts +70 -0
- package/lib/components/ScheduleHeader/MonthYearSelect/MonthYearSelect.vue.d.ts +21 -0
- package/lib/components/ScheduleHeader/MonthYearSelect/index.d.ts +1 -2
- package/lib/components/ScheduleHeader/ScheduleHeader.context.d.ts +12 -0
- package/lib/components/ScheduleHeader/ScheduleHeader.d.ts +20 -364
- package/lib/components/ScheduleHeader/ScheduleHeader.types.d.ts +28 -0
- package/lib/components/ScheduleHeader/ScheduleHeader.vue.d.ts +11 -0
- package/lib/components/ScheduleHeader/ScheduleHeaderBase.d.ts +37 -75
- package/lib/components/ScheduleHeader/ScheduleHeaderBase.types.d.ts +54 -0
- package/lib/components/ScheduleHeader/ScheduleHeaderBase.vue.d.ts +21 -0
- package/lib/components/ScheduleHeader/ViewSelect/ViewSelect.d.ts +8 -0
- package/lib/components/ScheduleHeader/ViewSelect/ViewSelect.types.d.ts +39 -0
- package/lib/components/ScheduleHeader/ViewSelect/ViewSelect.vue.d.ts +16 -0
- package/lib/components/ScheduleHeader/ViewSelect/index.d.ts +1 -2
- package/lib/components/ScheduleHeader/index.d.ts +4 -0
- package/lib/components/WeekView/WeekView.d.ts +10 -294
- package/lib/components/WeekView/WeekView.types.d.ts +129 -0
- package/lib/components/WeekView/WeekView.vue.d.ts +60 -0
- package/lib/components/YearView/YearView.d.ts +9 -151
- package/lib/components/YearView/YearView.types.d.ts +87 -0
- package/lib/components/YearView/YearView.vue.d.ts +35 -0
- package/lib/components/shared.d.ts +71 -141
- package/lib/components/use-slot-drag-select.d.ts +7 -9
- package/lib/components/use-slot-drop-target.d.ts +38 -0
- package/lib/hooks/use-event-resize.d.ts +1 -1
- package/lib/hooks/use-horizontal-event-resize.d.ts +2 -156
- package/lib/index.d.mts +1 -0
- package/lib/index.d.ts +1 -0
- package/package.json +4 -4
- package/styles.css +44 -54
- package/styles.layer.css +44 -54
|
@@ -1,212 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
type: PropType<DateLabelFormat>;
|
|
12
|
-
default: string;
|
|
13
|
-
};
|
|
14
|
-
withAllDaySlot: {
|
|
15
|
-
type: BooleanConstructor;
|
|
16
|
-
default: boolean;
|
|
17
|
-
};
|
|
18
|
-
allDaySlotHeight: {
|
|
19
|
-
type: PropType<CSSProperties["height"]>;
|
|
20
|
-
default: number;
|
|
21
|
-
};
|
|
22
|
-
maxAllDayEvents: {
|
|
23
|
-
type: NumberConstructor;
|
|
24
|
-
default: number;
|
|
25
|
-
};
|
|
26
|
-
moreEventsProps: PropType<Partial<MoreEventsProps>>;
|
|
27
|
-
startTime: {
|
|
28
|
-
type: StringConstructor;
|
|
29
|
-
default: string;
|
|
30
|
-
};
|
|
31
|
-
endTime: {
|
|
32
|
-
type: StringConstructor;
|
|
33
|
-
default: string;
|
|
34
|
-
};
|
|
35
|
-
slotLabelFormat: {
|
|
36
|
-
type: PropType<DateLabelFormat>;
|
|
37
|
-
default: string;
|
|
38
|
-
};
|
|
39
|
-
withCurrentTimeIndicator: {
|
|
40
|
-
type: BooleanConstructor;
|
|
41
|
-
default: undefined;
|
|
42
|
-
};
|
|
43
|
-
withCurrentTimeBubble: {
|
|
44
|
-
type: BooleanConstructor;
|
|
45
|
-
default: boolean;
|
|
46
|
-
};
|
|
47
|
-
getCurrentTime: PropType<() => import("../..").AnyDateValue>;
|
|
48
|
-
slotHeight: {
|
|
49
|
-
type: PropType<CSSProperties["height"]>;
|
|
50
|
-
default: number;
|
|
51
|
-
};
|
|
52
|
-
highlightBusinessHours: BooleanConstructor;
|
|
53
|
-
businessHours: PropType<import("../..").BusinessHoursValue>;
|
|
54
|
-
withEventsDragAndDrop: BooleanConstructor;
|
|
55
|
-
onEventDrop: PropType<(data: import("../../component-props").EventDropData) => void>;
|
|
56
|
-
canDragEvent: PropType<(event: import("../..").ScheduleEventData) => boolean>;
|
|
57
|
-
onEventDragStart: PropType<(event: import("../..").ScheduleEventData) => void>;
|
|
58
|
-
onEventDragEnd: PropType<() => void>;
|
|
59
|
-
onTimeSlotClick: PropType<(data: import("../../component-props").TimeSlotClickData) => void>;
|
|
60
|
-
onAllDaySlotClick: PropType<(date: import("../..").DateStringValue, nativeEvent: MouseEvent) => void>;
|
|
61
|
-
withDragSlotSelect: BooleanConstructor;
|
|
62
|
-
onSlotDragEnd: FunctionConstructor;
|
|
63
|
-
startScrollTime: StringConstructor;
|
|
64
|
-
onExternalEventDrop: FunctionConstructor;
|
|
65
|
-
withEventResize: BooleanConstructor;
|
|
66
|
-
onEventResize: PropType<(data: import("../../component-props").EventDropData) => void>;
|
|
67
|
-
canResizeEvent: PropType<(event: import("../..").ScheduleEventData) => boolean>;
|
|
68
|
-
date: {
|
|
69
|
-
type: PropType<Date | import("../..").DateStringValue>;
|
|
70
|
-
required: boolean;
|
|
71
|
-
};
|
|
72
|
-
onDateChange: PropType<(date: import("../..").DateStringValue) => void>;
|
|
73
|
-
events: PropType<import("../..").ScheduleEventData[]>;
|
|
74
|
-
locale: StringConstructor;
|
|
75
|
-
radius: PropType<string | number>;
|
|
76
|
-
labels: ObjectConstructor;
|
|
77
|
-
mode: {
|
|
78
|
-
type: PropType<import("../..").ScheduleMode>;
|
|
79
|
-
default: string;
|
|
80
|
-
};
|
|
81
|
-
withHeader: {
|
|
82
|
-
type: BooleanConstructor;
|
|
83
|
-
default: boolean;
|
|
84
|
-
};
|
|
85
|
-
onViewChange: PropType<(view: import("../..").ScheduleViewLevel) => void>;
|
|
86
|
-
previousControlProps: PropType<import("../../component-props").NativeButtonProps>;
|
|
87
|
-
nextControlProps: PropType<import("../../component-props").NativeButtonProps>;
|
|
88
|
-
todayControlProps: PropType<import("../../component-props").NativeButtonProps>;
|
|
89
|
-
viewSelectProps: ObjectConstructor;
|
|
90
|
-
renderEventBody: PropType<import("../ScheduleEvent").RenderEventBody>;
|
|
91
|
-
renderEvent: PropType<import("../ScheduleEvent").RenderEvent>;
|
|
92
|
-
onEventClick: PropType<(event: import("../..").ScheduleEventData, nativeEvent: MouseEvent) => void>;
|
|
93
|
-
recurrenceExpansionLimit: {
|
|
94
|
-
type: NumberConstructor;
|
|
95
|
-
default: number;
|
|
96
|
-
};
|
|
97
|
-
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
98
|
-
[key: string]: any;
|
|
99
|
-
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
100
|
-
intervalMinutes: {
|
|
101
|
-
type: NumberConstructor;
|
|
102
|
-
default: number;
|
|
103
|
-
};
|
|
104
|
-
headerFormat: {
|
|
105
|
-
type: PropType<DateLabelFormat>;
|
|
106
|
-
default: string;
|
|
107
|
-
};
|
|
108
|
-
withAllDaySlot: {
|
|
109
|
-
type: BooleanConstructor;
|
|
110
|
-
default: boolean;
|
|
111
|
-
};
|
|
112
|
-
allDaySlotHeight: {
|
|
113
|
-
type: PropType<CSSProperties["height"]>;
|
|
114
|
-
default: number;
|
|
115
|
-
};
|
|
116
|
-
maxAllDayEvents: {
|
|
117
|
-
type: NumberConstructor;
|
|
118
|
-
default: number;
|
|
119
|
-
};
|
|
120
|
-
moreEventsProps: PropType<Partial<MoreEventsProps>>;
|
|
121
|
-
startTime: {
|
|
122
|
-
type: StringConstructor;
|
|
123
|
-
default: string;
|
|
124
|
-
};
|
|
125
|
-
endTime: {
|
|
126
|
-
type: StringConstructor;
|
|
127
|
-
default: string;
|
|
128
|
-
};
|
|
129
|
-
slotLabelFormat: {
|
|
130
|
-
type: PropType<DateLabelFormat>;
|
|
131
|
-
default: string;
|
|
132
|
-
};
|
|
133
|
-
withCurrentTimeIndicator: {
|
|
134
|
-
type: BooleanConstructor;
|
|
135
|
-
default: undefined;
|
|
136
|
-
};
|
|
137
|
-
withCurrentTimeBubble: {
|
|
138
|
-
type: BooleanConstructor;
|
|
139
|
-
default: boolean;
|
|
140
|
-
};
|
|
141
|
-
getCurrentTime: PropType<() => import("../..").AnyDateValue>;
|
|
142
|
-
slotHeight: {
|
|
143
|
-
type: PropType<CSSProperties["height"]>;
|
|
144
|
-
default: number;
|
|
145
|
-
};
|
|
146
|
-
highlightBusinessHours: BooleanConstructor;
|
|
147
|
-
businessHours: PropType<import("../..").BusinessHoursValue>;
|
|
148
|
-
withEventsDragAndDrop: BooleanConstructor;
|
|
149
|
-
onEventDrop: PropType<(data: import("../../component-props").EventDropData) => void>;
|
|
150
|
-
canDragEvent: PropType<(event: import("../..").ScheduleEventData) => boolean>;
|
|
151
|
-
onEventDragStart: PropType<(event: import("../..").ScheduleEventData) => void>;
|
|
152
|
-
onEventDragEnd: PropType<() => void>;
|
|
153
|
-
onTimeSlotClick: PropType<(data: import("../../component-props").TimeSlotClickData) => void>;
|
|
154
|
-
onAllDaySlotClick: PropType<(date: import("../..").DateStringValue, nativeEvent: MouseEvent) => void>;
|
|
155
|
-
withDragSlotSelect: BooleanConstructor;
|
|
156
|
-
onSlotDragEnd: FunctionConstructor;
|
|
157
|
-
startScrollTime: StringConstructor;
|
|
158
|
-
onExternalEventDrop: FunctionConstructor;
|
|
159
|
-
withEventResize: BooleanConstructor;
|
|
160
|
-
onEventResize: PropType<(data: import("../../component-props").EventDropData) => void>;
|
|
161
|
-
canResizeEvent: PropType<(event: import("../..").ScheduleEventData) => boolean>;
|
|
162
|
-
date: {
|
|
163
|
-
type: PropType<Date | import("../..").DateStringValue>;
|
|
164
|
-
required: boolean;
|
|
165
|
-
};
|
|
166
|
-
onDateChange: PropType<(date: import("../..").DateStringValue) => void>;
|
|
167
|
-
events: PropType<import("../..").ScheduleEventData[]>;
|
|
168
|
-
locale: StringConstructor;
|
|
169
|
-
radius: PropType<string | number>;
|
|
170
|
-
labels: ObjectConstructor;
|
|
171
|
-
mode: {
|
|
172
|
-
type: PropType<import("../..").ScheduleMode>;
|
|
173
|
-
default: string;
|
|
174
|
-
};
|
|
175
|
-
withHeader: {
|
|
176
|
-
type: BooleanConstructor;
|
|
177
|
-
default: boolean;
|
|
178
|
-
};
|
|
179
|
-
onViewChange: PropType<(view: import("../..").ScheduleViewLevel) => void>;
|
|
180
|
-
previousControlProps: PropType<import("../../component-props").NativeButtonProps>;
|
|
181
|
-
nextControlProps: PropType<import("../../component-props").NativeButtonProps>;
|
|
182
|
-
todayControlProps: PropType<import("../../component-props").NativeButtonProps>;
|
|
183
|
-
viewSelectProps: ObjectConstructor;
|
|
184
|
-
renderEventBody: PropType<import("../ScheduleEvent").RenderEventBody>;
|
|
185
|
-
renderEvent: PropType<import("../ScheduleEvent").RenderEvent>;
|
|
186
|
-
onEventClick: PropType<(event: import("../..").ScheduleEventData, nativeEvent: MouseEvent) => void>;
|
|
187
|
-
recurrenceExpansionLimit: {
|
|
188
|
-
type: NumberConstructor;
|
|
189
|
-
default: number;
|
|
190
|
-
};
|
|
191
|
-
}>> & Readonly<{}>, {
|
|
192
|
-
mode: import("../..").ScheduleMode;
|
|
193
|
-
withHeader: boolean;
|
|
194
|
-
startTime: string;
|
|
195
|
-
endTime: string;
|
|
196
|
-
intervalMinutes: number;
|
|
197
|
-
slotHeight: import("csstype").Property.Height<string | number> | undefined;
|
|
198
|
-
highlightBusinessHours: boolean;
|
|
199
|
-
recurrenceExpansionLimit: number;
|
|
200
|
-
withEventsDragAndDrop: boolean;
|
|
201
|
-
withDragSlotSelect: boolean;
|
|
202
|
-
withEventResize: boolean;
|
|
203
|
-
headerFormat: DateLabelFormat;
|
|
204
|
-
withAllDaySlot: boolean;
|
|
205
|
-
allDaySlotHeight: import("csstype").Property.Height<string | number> | undefined;
|
|
206
|
-
maxAllDayEvents: number;
|
|
207
|
-
slotLabelFormat: DateLabelFormat;
|
|
208
|
-
withCurrentTimeIndicator: boolean;
|
|
209
|
-
withCurrentTimeBubble: boolean;
|
|
210
|
-
}, SlotsType<EventSlots>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
211
|
-
export type { DayViewProps };
|
|
212
|
-
export type DayViewStylesNames = 'dayView' | 'dayViewInner' | 'dayViewScrollArea' | 'dayViewAllDay' | 'dayViewAllDayEvents' | 'dayViewSlot' | 'dayViewSlots' | 'dayViewTimeSlots' | 'dayViewSlotLabel' | 'dayViewSlotLabels' | 'dayViewBackgroundEvent';
|
|
1
|
+
export declare const DayView: import("@mantine-vue/core").MantineComponent<{
|
|
2
|
+
props: Omit<import("./DayView.types").DayViewProps, "rootRef">;
|
|
3
|
+
slots: import("./DayView.types").DayViewSlots;
|
|
4
|
+
emits: import("./DayView.types").DayViewEmits;
|
|
5
|
+
ref: HTMLDivElement;
|
|
6
|
+
element: "div";
|
|
7
|
+
stylesNames: import("./DayView.types").DayViewStylesNames;
|
|
8
|
+
vars: import("./DayView.types").DayViewCssVariables;
|
|
9
|
+
}>;
|
|
10
|
+
export type { DayViewCssVariables, DayViewEmits, DayViewFactory, DayViewOwnProps, DayViewOwnStylesNames, DayViewProps, DayViewSlots, DayViewStylesNames, } from './DayView.types';
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { CSSProperties } from 'vue';
|
|
2
|
+
import type { BoxProps, Factory, ScrollAreaProps } from '@mantine-vue/core';
|
|
3
|
+
import type { StylesApiProps } from '@mantine-vue/core/styles-api';
|
|
4
|
+
import type { EventSlots, ForwardedProps, TimeViewEmits, TimeViewOwnProps } from '../../component-props';
|
|
5
|
+
import type { DateLabelFormat } from '../../types';
|
|
6
|
+
import type { CurrentTimeIndicatorStylesNames } from '../CurrentTimeIndicator/CurrentTimeIndicator.types';
|
|
7
|
+
import type { MoreEventsEmits, MoreEventsProps, MoreEventsStylesNames } from '../MoreEvents/MoreEvents.types';
|
|
8
|
+
import type { ScheduleEventStylesNames } from '../ScheduleEvent/ScheduleEvent.types';
|
|
9
|
+
import type { CombinedScheduleHeaderStylesNames, ScheduleHeaderStylesNames } from '../ScheduleHeader/ScheduleHeader.types';
|
|
10
|
+
import type { MonthYearSelectStylesNames } from '../ScheduleHeader/MonthYearSelect/MonthYearSelect.types';
|
|
11
|
+
export type DayViewOwnStylesNames = 'dayView' | 'dayViewInner' | 'dayViewScrollArea' | 'dayViewAllDay' | 'dayViewAllDayEvents' | 'dayViewSlot' | 'dayViewSlots' | 'dayViewTimeSlots' | 'dayViewSlotLabel' | 'dayViewSlotLabels' | 'dayViewBackgroundEvent';
|
|
12
|
+
/**
|
|
13
|
+
* `DayView` forwards `classNames` and `styles` to the components it renders, so their
|
|
14
|
+
* selectors are part of its Styles API. The month/year select is excluded because the day
|
|
15
|
+
* header shows a plain title instead.
|
|
16
|
+
*/
|
|
17
|
+
export type DayViewStylesNames = DayViewOwnStylesNames | MoreEventsStylesNames | ScheduleEventStylesNames | Exclude<CombinedScheduleHeaderStylesNames, MonthYearSelectStylesNames> | CurrentTimeIndicatorStylesNames | ScheduleHeaderStylesNames;
|
|
18
|
+
export type DayViewCssVariables = {
|
|
19
|
+
dayView: '--day-view-radius' | '--day-view-slot-height' | '--day-view-all-day-slot-height';
|
|
20
|
+
};
|
|
21
|
+
export type DayViewSlots = EventSlots;
|
|
22
|
+
/** Props declared by `DayView` itself. See `DayViewProps` for the full public type. */
|
|
23
|
+
export interface DayViewOwnProps extends TimeViewOwnProps, StylesApiProps<DayViewFactory> {
|
|
24
|
+
/**
|
|
25
|
+
* Length of one time slot in minutes.
|
|
26
|
+
* @default 15
|
|
27
|
+
*/
|
|
28
|
+
intervalMinutes?: number;
|
|
29
|
+
/**
|
|
30
|
+
* Format of the date shown in the header.
|
|
31
|
+
* @default 'MMMM D, YYYY'
|
|
32
|
+
*/
|
|
33
|
+
headerFormat?: DateLabelFormat;
|
|
34
|
+
/**
|
|
35
|
+
* If set, an all-day row is rendered above the time slots.
|
|
36
|
+
* @default true
|
|
37
|
+
*/
|
|
38
|
+
withAllDaySlot?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Height of the all-day row.
|
|
41
|
+
* @default 44
|
|
42
|
+
*/
|
|
43
|
+
allDaySlotHeight?: CSSProperties['height'];
|
|
44
|
+
/**
|
|
45
|
+
* Number of all-day events shown before the rest collapse into a "more" control.
|
|
46
|
+
* @default 3
|
|
47
|
+
*/
|
|
48
|
+
maxAllDayEvents?: number;
|
|
49
|
+
/** Props passed to the `MoreEvents` control of the all-day row. */
|
|
50
|
+
moreEventsProps?: ForwardedProps<MoreEventsProps, MoreEventsEmits>;
|
|
51
|
+
/** Props passed to the `ScrollArea` that wraps the time grid. */
|
|
52
|
+
scrollAreaProps?: ForwardedProps<ScrollAreaProps>;
|
|
53
|
+
}
|
|
54
|
+
export interface DayViewProps extends Omit<BoxProps, keyof DayViewOwnProps>, DayViewOwnProps {
|
|
55
|
+
}
|
|
56
|
+
export type DayViewEmits = TimeViewEmits;
|
|
57
|
+
export type DayViewFactory = Factory<{
|
|
58
|
+
props: Omit<DayViewProps, 'rootRef'>;
|
|
59
|
+
slots: DayViewSlots;
|
|
60
|
+
emits: DayViewEmits;
|
|
61
|
+
ref: HTMLDivElement;
|
|
62
|
+
element: 'div';
|
|
63
|
+
stylesNames: DayViewStylesNames;
|
|
64
|
+
vars: DayViewCssVariables;
|
|
65
|
+
}>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { ScheduleEventData } from '../../types';
|
|
2
|
+
import type { DayViewOwnProps } from './DayView.types';
|
|
3
|
+
declare const defaultProps: {
|
|
4
|
+
readonly mode: "default";
|
|
5
|
+
readonly withHeader: true;
|
|
6
|
+
readonly recurrenceExpansionLimit: 2000;
|
|
7
|
+
readonly startTime: "00:00:00";
|
|
8
|
+
readonly endTime: "23:59:59";
|
|
9
|
+
readonly intervalMinutes: 15;
|
|
10
|
+
readonly slotLabelFormat: "HH:mm";
|
|
11
|
+
readonly withCurrentTimeBubble: true;
|
|
12
|
+
readonly slotHeight: 64;
|
|
13
|
+
readonly headerFormat: "MMMM D, YYYY";
|
|
14
|
+
readonly withAllDaySlot: true;
|
|
15
|
+
readonly allDaySlotHeight: 44;
|
|
16
|
+
readonly maxAllDayEvents: 3;
|
|
17
|
+
};
|
|
18
|
+
declare const varsResolver: (theme: import("@mantine-vue/core").MantineTheme, props: any, ctx: Record<string, any>) => Record<string, Record<string, string | undefined>>;
|
|
19
|
+
export { defaultProps, varsResolver };
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
21
|
+
export default _default;
|
|
22
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<DayViewOwnProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
23
|
+
dateChange: (date: string) => any;
|
|
24
|
+
eventDragStart: (event: ScheduleEventData) => any;
|
|
25
|
+
eventDragEnd: () => any;
|
|
26
|
+
eventClick: (event: ScheduleEventData, nativeEvent: MouseEvent) => any;
|
|
27
|
+
viewChange: (view: import("../..").ScheduleViewLevel) => any;
|
|
28
|
+
eventDrop: (data: import("../..").EventDropData) => any;
|
|
29
|
+
timeSlotClick: (data: import("../..").TimeSlotClickData) => any;
|
|
30
|
+
allDaySlotClick: (date: string, nativeEvent: MouseEvent) => any;
|
|
31
|
+
slotDragEnd: (rangeStart: string, rangeEnd: string) => any;
|
|
32
|
+
externalEventDrop: (dataTransfer: DataTransfer, dropDateTime: string) => any;
|
|
33
|
+
eventResize: (data: import("../..").EventDropData) => any;
|
|
34
|
+
}, string, import("vue").PublicProps, Readonly<DayViewOwnProps> & Readonly<{
|
|
35
|
+
onDateChange?: ((date: string) => any) | undefined;
|
|
36
|
+
onEventDragStart?: ((event: ScheduleEventData) => any) | undefined;
|
|
37
|
+
onEventDragEnd?: (() => any) | undefined;
|
|
38
|
+
onEventClick?: ((event: ScheduleEventData, nativeEvent: MouseEvent) => any) | undefined;
|
|
39
|
+
onViewChange?: ((view: import("../..").ScheduleViewLevel) => any) | undefined;
|
|
40
|
+
onEventDrop?: ((data: import("../..").EventDropData) => any) | undefined;
|
|
41
|
+
onTimeSlotClick?: ((data: import("../..").TimeSlotClickData) => any) | undefined;
|
|
42
|
+
onAllDaySlotClick?: ((date: string, nativeEvent: MouseEvent) => any) | undefined;
|
|
43
|
+
onSlotDragEnd?: ((rangeStart: string, rangeEnd: string) => any) | undefined;
|
|
44
|
+
onExternalEventDrop?: ((dataTransfer: DataTransfer, dropDateTime: string) => any) | undefined;
|
|
45
|
+
onEventResize?: ((data: import("../..").EventDropData) => any) | undefined;
|
|
46
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, import("../..").EventSlots>;
|
|
47
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
48
|
+
new (): {
|
|
49
|
+
$slots: S;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
@@ -1,11 +1,49 @@
|
|
|
1
|
-
import { type InjectionKey } from 'vue';
|
|
1
|
+
import { type InjectionKey, type ShallowRef } from 'vue';
|
|
2
2
|
import type { DropTarget, ScheduleEventData } from '../../types';
|
|
3
3
|
export interface DragContextValue {
|
|
4
|
-
draggedEvent: ScheduleEventData | null;
|
|
5
|
-
dragOverTarget: DropTarget | null;
|
|
6
|
-
isDragging: boolean;
|
|
7
|
-
isSlotDragging: boolean;
|
|
4
|
+
readonly draggedEvent: ScheduleEventData | null;
|
|
5
|
+
readonly dragOverTarget: DropTarget | null;
|
|
6
|
+
readonly isDragging: boolean;
|
|
7
|
+
readonly isSlotDragging: boolean;
|
|
8
8
|
}
|
|
9
9
|
export declare const DragContext: InjectionKey<DragContextValue>;
|
|
10
10
|
export declare function provideDragContext(value: DragContextValue): void;
|
|
11
|
+
/**
|
|
12
|
+
* Reads the drag state of the surrounding view. Components rendered outside a schedule get an
|
|
13
|
+
* idle state rather than `undefined`, so they never have to null-check it.
|
|
14
|
+
*/
|
|
11
15
|
export declare function useDragContext(): DragContextValue;
|
|
16
|
+
export interface ScheduleDragState {
|
|
17
|
+
draggedEvent: ShallowRef<ScheduleEventData | null>;
|
|
18
|
+
startEventDrag: (event: ScheduleEventData) => void;
|
|
19
|
+
/**
|
|
20
|
+
* Ends the drag. Safe to call more than once: only the first call after a `startEventDrag`
|
|
21
|
+
* takes effect, so the component's own `dragend` and the document safety net cannot both
|
|
22
|
+
* report the same drag.
|
|
23
|
+
*/
|
|
24
|
+
endEventDrag: () => void;
|
|
25
|
+
}
|
|
26
|
+
export interface ProvideScheduleDragStateInput {
|
|
27
|
+
/** Slot the pointer is currently over, owned by the view because it also drives the highlight. */
|
|
28
|
+
dragOverTarget?: () => DropTarget | null;
|
|
29
|
+
isSlotDragging?: () => boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Called exactly once per drag, however it ended: dropped, cancelled, or ended after the
|
|
32
|
+
* dragged element was already replaced. Use it to clear view-local drag state.
|
|
33
|
+
*/
|
|
34
|
+
onDragEnd?: () => void;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Publishes the view's drag state to the events it renders, so an event can tell that *some*
|
|
38
|
+
* other event is being dragged and dim itself.
|
|
39
|
+
*
|
|
40
|
+
* The context is a getter-backed object rather than a snapshot: it is provided once during
|
|
41
|
+
* `setup`, and every read stays reactive as the drag progresses.
|
|
42
|
+
*
|
|
43
|
+
* The end of a drag is detected on `document` rather than only through the dragged event's own
|
|
44
|
+
* `dragend`. A successful drop usually makes the consumer move the event, which re-renders it
|
|
45
|
+
* under a different key: the original element is gone by the time the browser would fire
|
|
46
|
+
* `dragend` on it, so that event never arrives. Relying on it alone would leave the schedule
|
|
47
|
+
* stuck in the dragging state, with every event non-interactive.
|
|
48
|
+
*/
|
|
49
|
+
export declare function provideScheduleDragState(input?: ProvideScheduleDragStateInput): ScheduleDragState;
|
|
@@ -1,171 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
mode: ScheduleMode;
|
|
12
|
-
date: Date | DateStringValue;
|
|
13
|
-
defaultHeader: VNodeChild;
|
|
14
|
-
}) => VNodeChild;
|
|
15
|
-
}
|
|
16
|
-
export declare const MobileMonthView: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
17
|
-
selectedDate: PropType<Date | DateStringValue | null>;
|
|
18
|
-
defaultSelectedDate: PropType<Date | DateStringValue | null>;
|
|
19
|
-
onSelectedDateChange: PropType<MobileMonthViewProps["onSelectedDateChange"]>;
|
|
20
|
-
withWeekNumbers: BooleanConstructor;
|
|
21
|
-
withWeekDays: {
|
|
22
|
-
type: BooleanConstructor;
|
|
23
|
-
default: boolean;
|
|
24
|
-
};
|
|
25
|
-
firstDayOfWeek: {
|
|
26
|
-
type: PropType<DayOfWeek>;
|
|
27
|
-
default: number;
|
|
28
|
-
};
|
|
29
|
-
weekdayFormat: {
|
|
30
|
-
type: PropType<DateLabelFormat>;
|
|
31
|
-
default: string;
|
|
32
|
-
};
|
|
33
|
-
weekendDays: {
|
|
34
|
-
type: PropType<DayOfWeek[]>;
|
|
35
|
-
default: () => number[];
|
|
36
|
-
};
|
|
37
|
-
getWeekNumberProps: PropType<MobileMonthViewProps["getWeekNumberProps"]>;
|
|
38
|
-
getDayProps: PropType<MobileMonthViewProps["getDayProps"]>;
|
|
39
|
-
onDayClick: PropType<MobileMonthViewProps["onDayClick"]>;
|
|
40
|
-
onWeekNumberClick: PropType<MobileMonthViewProps["onWeekNumberClick"]>;
|
|
41
|
-
consistentWeeks: {
|
|
42
|
-
type: BooleanConstructor;
|
|
43
|
-
default: boolean;
|
|
44
|
-
};
|
|
45
|
-
highlightToday: {
|
|
46
|
-
type: BooleanConstructor;
|
|
47
|
-
default: boolean;
|
|
48
|
-
};
|
|
49
|
-
withOutsideDays: BooleanConstructor;
|
|
50
|
-
eventsHeaderFormat: {
|
|
51
|
-
type: PropType<DateLabelFormat>;
|
|
52
|
-
default: string;
|
|
53
|
-
};
|
|
54
|
-
onYearClick: PropType<() => void>;
|
|
55
|
-
renderHeader: PropType<MobileMonthViewProps["renderHeader"]>;
|
|
56
|
-
date: {
|
|
57
|
-
type: PropType<Date | DateStringValue>;
|
|
58
|
-
required: boolean;
|
|
59
|
-
};
|
|
60
|
-
onDateChange: PropType<(date: DateStringValue) => void>;
|
|
61
|
-
events: PropType<ScheduleEventData[]>;
|
|
62
|
-
locale: StringConstructor;
|
|
63
|
-
radius: PropType<string | number>;
|
|
64
|
-
labels: ObjectConstructor;
|
|
65
|
-
mode: {
|
|
66
|
-
type: PropType<ScheduleMode>;
|
|
67
|
-
default: string;
|
|
68
|
-
};
|
|
69
|
-
withHeader: {
|
|
70
|
-
type: BooleanConstructor;
|
|
71
|
-
default: boolean;
|
|
72
|
-
};
|
|
73
|
-
onViewChange: PropType<(view: import("../..").ScheduleViewLevel) => void>;
|
|
74
|
-
previousControlProps: PropType<import("../../component-props").NativeButtonProps>;
|
|
75
|
-
nextControlProps: PropType<import("../../component-props").NativeButtonProps>;
|
|
76
|
-
todayControlProps: PropType<import("../../component-props").NativeButtonProps>;
|
|
77
|
-
viewSelectProps: ObjectConstructor;
|
|
78
|
-
renderEventBody: PropType<import("../ScheduleEvent").RenderEventBody>;
|
|
79
|
-
renderEvent: PropType<import("../ScheduleEvent").RenderEvent>;
|
|
80
|
-
onEventClick: PropType<(event: ScheduleEventData, nativeEvent: MouseEvent) => void>;
|
|
81
|
-
recurrenceExpansionLimit: {
|
|
82
|
-
type: NumberConstructor;
|
|
83
|
-
default: number;
|
|
84
|
-
};
|
|
85
|
-
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
86
|
-
[key: string]: any;
|
|
87
|
-
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
88
|
-
selectedDate: PropType<Date | DateStringValue | null>;
|
|
89
|
-
defaultSelectedDate: PropType<Date | DateStringValue | null>;
|
|
90
|
-
onSelectedDateChange: PropType<MobileMonthViewProps["onSelectedDateChange"]>;
|
|
91
|
-
withWeekNumbers: BooleanConstructor;
|
|
92
|
-
withWeekDays: {
|
|
93
|
-
type: BooleanConstructor;
|
|
94
|
-
default: boolean;
|
|
95
|
-
};
|
|
96
|
-
firstDayOfWeek: {
|
|
97
|
-
type: PropType<DayOfWeek>;
|
|
98
|
-
default: number;
|
|
99
|
-
};
|
|
100
|
-
weekdayFormat: {
|
|
101
|
-
type: PropType<DateLabelFormat>;
|
|
102
|
-
default: string;
|
|
103
|
-
};
|
|
104
|
-
weekendDays: {
|
|
105
|
-
type: PropType<DayOfWeek[]>;
|
|
106
|
-
default: () => number[];
|
|
107
|
-
};
|
|
108
|
-
getWeekNumberProps: PropType<MobileMonthViewProps["getWeekNumberProps"]>;
|
|
109
|
-
getDayProps: PropType<MobileMonthViewProps["getDayProps"]>;
|
|
110
|
-
onDayClick: PropType<MobileMonthViewProps["onDayClick"]>;
|
|
111
|
-
onWeekNumberClick: PropType<MobileMonthViewProps["onWeekNumberClick"]>;
|
|
112
|
-
consistentWeeks: {
|
|
113
|
-
type: BooleanConstructor;
|
|
114
|
-
default: boolean;
|
|
115
|
-
};
|
|
116
|
-
highlightToday: {
|
|
117
|
-
type: BooleanConstructor;
|
|
118
|
-
default: boolean;
|
|
119
|
-
};
|
|
120
|
-
withOutsideDays: BooleanConstructor;
|
|
121
|
-
eventsHeaderFormat: {
|
|
122
|
-
type: PropType<DateLabelFormat>;
|
|
123
|
-
default: string;
|
|
124
|
-
};
|
|
125
|
-
onYearClick: PropType<() => void>;
|
|
126
|
-
renderHeader: PropType<MobileMonthViewProps["renderHeader"]>;
|
|
127
|
-
date: {
|
|
128
|
-
type: PropType<Date | DateStringValue>;
|
|
129
|
-
required: boolean;
|
|
130
|
-
};
|
|
131
|
-
onDateChange: PropType<(date: DateStringValue) => void>;
|
|
132
|
-
events: PropType<ScheduleEventData[]>;
|
|
133
|
-
locale: StringConstructor;
|
|
134
|
-
radius: PropType<string | number>;
|
|
135
|
-
labels: ObjectConstructor;
|
|
136
|
-
mode: {
|
|
137
|
-
type: PropType<ScheduleMode>;
|
|
138
|
-
default: string;
|
|
139
|
-
};
|
|
140
|
-
withHeader: {
|
|
141
|
-
type: BooleanConstructor;
|
|
142
|
-
default: boolean;
|
|
143
|
-
};
|
|
144
|
-
onViewChange: PropType<(view: import("../..").ScheduleViewLevel) => void>;
|
|
145
|
-
previousControlProps: PropType<import("../../component-props").NativeButtonProps>;
|
|
146
|
-
nextControlProps: PropType<import("../../component-props").NativeButtonProps>;
|
|
147
|
-
todayControlProps: PropType<import("../../component-props").NativeButtonProps>;
|
|
148
|
-
viewSelectProps: ObjectConstructor;
|
|
149
|
-
renderEventBody: PropType<import("../ScheduleEvent").RenderEventBody>;
|
|
150
|
-
renderEvent: PropType<import("../ScheduleEvent").RenderEvent>;
|
|
151
|
-
onEventClick: PropType<(event: ScheduleEventData, nativeEvent: MouseEvent) => void>;
|
|
152
|
-
recurrenceExpansionLimit: {
|
|
153
|
-
type: NumberConstructor;
|
|
154
|
-
default: number;
|
|
155
|
-
};
|
|
156
|
-
}>> & Readonly<{}>, {
|
|
157
|
-
mode: ScheduleMode;
|
|
158
|
-
withHeader: boolean;
|
|
159
|
-
firstDayOfWeek: DayOfWeek;
|
|
160
|
-
highlightToday: boolean;
|
|
161
|
-
weekendDays: DayOfWeek[];
|
|
162
|
-
weekdayFormat: DateLabelFormat;
|
|
163
|
-
withWeekNumbers: boolean;
|
|
164
|
-
consistentWeeks: boolean;
|
|
165
|
-
withOutsideDays: boolean;
|
|
166
|
-
recurrenceExpansionLimit: number;
|
|
167
|
-
withWeekDays: boolean;
|
|
168
|
-
eventsHeaderFormat: DateLabelFormat;
|
|
169
|
-
}, SlotsType<MobileMonthViewSlots>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
170
|
-
export type { MobileMonthViewProps };
|
|
171
|
-
export type MobileMonthViewStylesNames = 'mobileMonthView' | 'mobileMonthViewHeader' | 'mobileMonthViewHeaderBackButton' | 'mobileMonthViewHeaderLabel' | 'mobileMonthViewCalendar' | 'mobileMonthViewWeekdays' | 'mobileMonthViewWeekdaysCorner' | 'mobileMonthViewWeekday' | 'mobileMonthViewWeek' | 'mobileMonthViewWeekNumber' | 'mobileMonthViewDay' | 'mobileMonthViewDayIndicators' | 'mobileMonthViewDayIndicator' | 'mobileMonthViewEventsList' | 'mobileMonthViewEventsHeader' | 'mobileMonthViewEvent' | 'mobileMonthViewEventBody' | 'mobileMonthViewEventColor' | 'mobileMonthViewEventTitle' | 'mobileMonthViewEventTime' | 'mobileMonthViewNoEvents';
|
|
1
|
+
export declare const MobileMonthView: import("@mantine-vue/core").MantineComponent<{
|
|
2
|
+
props: Omit<import("./MobileMonthView.types").MobileMonthViewProps, "rootRef">;
|
|
3
|
+
slots: import("./MobileMonthView.types").MobileMonthViewSlots;
|
|
4
|
+
emits: import("./MobileMonthView.types").MobileMonthViewEmits;
|
|
5
|
+
ref: HTMLDivElement;
|
|
6
|
+
element: "div";
|
|
7
|
+
stylesNames: import("./MobileMonthView.types").MobileMonthViewStylesNames;
|
|
8
|
+
vars: import("./MobileMonthView.types").MobileMonthViewCssVariables;
|
|
9
|
+
}>;
|
|
10
|
+
export type { MobileMonthViewCssVariables, MobileMonthViewEmits, MobileMonthViewFactory, MobileMonthViewHeaderPayload, MobileMonthViewOwnProps, MobileMonthViewProps, MobileMonthViewSlots, MobileMonthViewStylesNames, } from './MobileMonthView.types';
|